| Electronic Components Datasheet Search |
|
PM0051 Datasheet(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0051 Datasheet(HTML) 22 Page - STMicroelectronics |
|
22 / 27 page ![]() Programming STM8 Flash microcontrollers PM0051 22/27 Doc ID 14614 Rev 3 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: If a byte program operation is interrupted by a reset, the data programmed in the memory may be corrupted. 4.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. 4.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 is used to prevent the Flash program memory from being read and modified in ICP/SWIM mode. Refer to Section 3.1: Readout protection for a detailed description of readout protection. ● UBC The UBC option byte is used to program the size of the write protected user boot code area. The boot area always includes the reset and interrupt vectors and can go up to the full program memory size. The boot area size granularity is of one page. Refer to Section 3.2: User Boot Code area protection for a detailed description of the UBC area. 4.5.2 How to program the option bytes To enhance security on STM8 devices, option bytes must be programmed twice, once in a regular form and once in a complemented form. If both values are not complementary, the default value is forced, ensuring a safe configuration. Option bytes can be modified both in user/IAP mode and ICP mode (using the SWIM), except for the readout protection which can only be removed in ICP mode. In ICP mode, the OPT and NOPT bits of the FLASH_CR2 and FLASH_NCR2 registers must be set to their active state before attempting to modify the option bytes (OPT = 1 and NOPT = 0). |
|
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 |