| 数据搜索系统,热门电子元器件搜索 |
|
AN1576 数据表(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1576 数据表(HTML) 13 Page - STMicroelectronics |
|
13 / 15 page ![]() 13/15 HDFLASH DRIVER 2.3.4 Firmware template #include "io72521.h"/* ST72521 memory and registers mapping */ #include "HDFlash_macros.h" /* HDFlash driver software */ unsigned char tempo; /* stabilization delay used by macro */ /********VPP Supply 1ms stabilization delay********************/ #define Vpp_Enable() { \ ClrBit(PADR,1); \ for (tempo=0;tempo<1000;tempo++); } #define Vpp_Disable() SetBit(PADR,1) /* Disable Vpp macro */ void Loop(void); /*************** Main****************************************/ void main(void) { /******************** Initialization ************************/ ST7_Init(); //General initialization while(1) Loop(); } /*****************UserWhileWriteBlock************************ void UserWhileWriteBlock(void) { WDGCR=0x08; //Refresh WATCHDOG Timer } /*************** UserWhileErase ****************************** void UserWhileErase(void) { WDGCR=0x08; //Refresh WATCHDOG Timer } /****Erasing & Reprogramming routines within External ISR*******/ @interrupt void On_SW1(void) { unsigned int cpt; unsigned char *pFlash; unsigned char ProgBuffer[45] @0x9C; SPI_Init(); //initialize SPI communication SPI_Rx(ProgBuffer,2,100,(char)0); //Receive RASS keys from EEPROM RASS_Disable(ProgBuffer[0],ProgBuffer[1]); //Unlock Flash Vpp_Enable(); HDFlashEraseSector(1,1); //Erase Secor 1 for(cpt=0;cpt<2;cpt++) |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |