| Electronic Components Datasheet Search |
|
AN1576 Datasheet(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1576 Datasheet(HTML) 9 Page - STMicroelectronics |
|
9 / 15 page ![]() 9/15 HDFLASH DRIVER This function returns the value 03 when successful. 2.1.4 User functions The HDFlash driver allows user specific functions to be executed during a HDFlashWriteBlock or HDFlashEraseSector function. This these operations require several tenths of a millisecond in during which you may have to manage some other tasks: A typical example is to refresh the watchdog, in order to prevent a Reset while the HDFlash is being reprogrammed or erased. For this purpose the driver provides 2 functions named UserWhileWriteBlock and UserWhi- leErase, that you have to define in your firmware. 2.1.5 Programming/Erasing Supply Voltage Management The HDFlash driver does not take into account the management of the external VPP supply. This is because the VPP implementation is totally user specific and cannot be covered by a generic driver. 2.2 DRIVER ARCHITECTURE 2.2.1 Driver principle The HDFlashWriteBlock function works as follows: Once called by the user firmware in sector0, HDFlashWriteBlock and HDFlashEraseSector execute the following sequence: – Load the RAM memory at the current stack pointer with the programming algorithm – Execute this programming algorithm from the RAM – Return to the user firmware in sector 0, just after the HDFlashWriteBlock or HDFlashErase- Sector instruction. At that point the RAM area used by the programming algorithm is released and is available to the user firmware. Note that the stack pointer remains at the value before the HDFlashWriteBlock or HD- FlashEraseSector call. 2.2.2 Memory management The programming algorithm requires 124 bytes and is positioned at the current stack pointer: Part of it can then be loaded into RAM Page 0 (Adjacent to the stack) in case the stack is al- ready filled. Take care that you have at least 124 bytes free in the stack when calling the HDFlashWrite- Block functions. This condition can be satisfied by reducing the number of stacked “Calls” be- tween the main loop and the HDFlashWriteBlock or HDFlashEraseSector function. In addition, 16 bytes in RAM Page 0 (Sort addressing mode) are reserved for the IAP driver in- ternal variables. Their location is 0xF0-0xFF and cannot be changed. |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |