| 전자부품 데이터시트 검색엔진 |
|
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++) |
|
|
링크 URL |
| 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 |