| 数据搜索系统,热门电子元器件搜索 |
|
PM0054 数据表(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0054 数据表(HTML) 21 Page - STMicroelectronics |
|
21 / 28 page ![]() PM0054 Programming STM8 Flash microcontrollers Doc ID 15433 Rev 9 21/28 The erase/program cycle lasts longer if the word containing the byte to be programmed is not empty because an erase operation is performed automatically. If the word is empty, the erase operation is not performed. However, if a defined programming time is wanted, the FIX bit in the FLASH_CR1 register forces the programming operation to always erase first whatever the contents of the memory. Therefore a fixed programming time is guaranteed (erase time + write time). To erase a byte location, just write ‘0x00’ to the byte location. Caution: A byte programming operation performs a word (4-byte) access to Flash program memory. If a byte program operation is interrupted by reset, this word programmed in memory may be corrupt. 5.5 Programming the option bytes Option bytes are used to configure the device hardware features as well as the memory protection. They are stored in a dedicated memory block. 5.5.1 Summary of memory dedicated option bytes The Flash program memory includes several option bytes dedicated to memory protection: ● ROP: The ROP option byte can prevent the Flash program memory from being read and modified in ICP/SWIM mode. Refer to Section 4.1: Readout protection for a detailed description of readout protection. ● PCODESIZE ((not available on low density STM8L101x, medium density STM8L05x/15x and medium density STM8AL31xx/3Lxx devices): The PCODESIZE option byte configures the size of the proprietary code area (PCODE) which can be used to store proprietary software libraries. The minimum size of proprietary code area is 1 page (256 bytes) and the maximum size 255 pages. This byte can be modified only in ICP/SWIM mode. Refer to Section 4.2: Proprietary code area protection for a detailed description of the PCODE area, and to Table 11: Comparison of STM8L devices for the devices featuring PCODE area and PCODESIZE option byte. ● UBC: The UBC option byte programs the size of the write-protected user boot code area. The boot area always includes the reset and interrupt vectors and can be the full program memory size. The boot area size granularity is one page. Refer to Section 4.3: User boot code area protection for a detailed description of the UBC area. ● DATASIZE (available only on low density STM8L101x devices): The DATASIZE option byte configures the size of the data EEPROM area. This option byte specifies the number of pages starting from the end of the memory. The maximum size of the data EEPROM area is 2 Kbytes. Refer to Table 11: Comparison of STM8L devices for the devices featuring DATASIZE option byte. 5.5.2 How to program the option bytes Option bytes are stored only once. On low density STM8L101x devices, option bytes can be modified only in ICP/SWIM mode with OPT bit of the FLASH_CR2 register set to ‘1’ (refer to the description of FLASH_CR2 register in the reference manual). |
|
|
链接网址 |
| 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 |