| 数据搜索系统,热门电子元器件搜索 |
|
AN1496 数据表(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1496 数据表(HTML) 9 Page - STMicroelectronics |
|
9 / 17 page ![]() AN1496 - APPLICATION NOTE 9/ 17 Prog_Error: MOV R7, #0F0h ;load register R7 with Read/Reset command EXTS R11, #1 ;use EXTended addressing for next MOV instruction MOV R12], R7 ;address is don’t care for Read/Reset command ... ;here place specific Error handling code ... ... ;When programming operation finshed succesfully, Flash is set ;back automatically to normal Read Mode Prog_OK: .... .... 2.5 - Erasing Command Example : Performing the Block Erase command We assume that in the initialization phase the lowest 32 Kbyte of Flash memory (sector 0) have been mapped to segment 1. The registers R11/R12 contain an address related to the block to be erased (segment number in R11, segment offset in R12, eg; R11 = 01h, R12= 4000h will erase the Block 1 - first 8 Kbyte block). ; sending of the erasing command to the Flash MOV R5, #01554h ;load auxilary register R5 with command address ;(used in command cycle 1) MOV R6, #02AA8h ;load auxilary register R6 with command address ;(used in command cycle 2) SXCT DPPO, #08h ;push data page pointer 0 and load it to point ;to segment 2 MOV R7, #0A8h ;load register R7 with 1st CI enable command MOV [R5], R7 ;command cycle 1 MOV R13, #054h ;load register R7 with 2nd CI enable command MOV [R6], R7 ;command cycle 2 MOV R13, #080h ;load register R7 with Block Erase command MOV [R5], R7 ;command cycle 3 MOV R7, #0A8h ;load register R7 with 1st CI enable command MOV [R5], R7 ;command cycle 4 MOV R13, #054h ;load register R7 with 2nd CI enable command MOV [R6], R7 ;command cycle 5 POP DPP0 ;restore DPP0: following addressing to the Flash ;will use EXTended instructions ;R11 contains the segment of the block to be erased ;R12 contains the segment offset address of the block MOV R7, #030h ;load register R7 with erase confirm code EXTS R11, #1 ;use EXTended addressing for next MOV instruction MOV [R12], R7 ;command cycle 6: the E/P.C. starts execution of ;Erasing Command after 96us time-out delay ;additional block commands may be sent here before the ;96us time-out expires. |
|
|
链接网址 |
| 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 |