| Electronic Components Datasheet Search |
|
PM0051 Datasheet(PDF) 15 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0051 Datasheet(HTML) 15 Page - STMicroelectronics |
|
15 / 27 page ![]() PM0051 Memory protection strategy Doc ID 14614 Rev 3 15/27 3.2 User Boot Code area protection Whatever the memory content, it is always possible to restart an ICP session after a critical error by applying a reset and restarting the SWIM communication. On the contrary, during IAP sessions, the programming software driver must always be write protected to be able to recover from any critical failure that might happen during programming (such as power failure). The pages where the IAP driver is implemented must be located in the write-protected boot code area (UBC). The application reset and interrupt vectors and the reset routine must also be stored in the UBC. These conditions allow the user software to manage the recovery from potential critical failure by applying a reset and restarting the IAP routine from the protected boot area. The UBC size is defined by the user boot code (UBC) area option byte. This option byte may slightly differ from one product to another. See the following table for the minimum and maximum size of the UBC area. Its maximum size is equal to the full memory size 3.3 Unwanted memory access protection The unwanted memory access protection consists of writing two 8-bit keys in the right order into dedicated MASS key registers. Writing the correct sequence of keys in the program memory MASS key register (FLASH_PUKR) enables the programming of the program memory area excluding the UBC. If wrong keys are provided, a reset must to be generated to be able to reprogram the right keys. Once the write memory protection has been removed, it is possible to reactivate the protection of the area by resetting the PUL bit in FLASH_IAPSR. To enable write access to the data EEPROM area, another specific MASS key register (FLASH_DUKR) and a different key sequence must be used. Once the data EEPROM/option byte area is unlocked, it is possible to reactivate the protection of the area by resetting the DUL bit in FLASH_IAPSR. If wrong keys have been provided to the FLASH_PUKR register, the device must be reset before performing a new key program sequence. However, when wrong keys are provided to the FLASH_DUKR register, new keys can be entered without the device being previously reset. In order to be as effective as possible, the application software must lock again the unwanted memory access protection as soon as the programming is completed. Otherwise, the protection level of the MASS is significantly reduced. To activate the MASS protection again, the user must reset the corresponding bits in the FLASH_IAPSR register (DUL bit for data EEPROM or PUL bit for Flash program memory). Table 6. Recommended minimum and maximum sizes of the UBC area STM8 microcontroller family Recommended minimum size of the UBC area Maximum size of the UBC area Low density STM8S 2 pages = 128 bytes Full memory size Medium density STM8S and STM8A 2 pages = 1 Kbyte Full memory size High density STM8S and STM8A |
|
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 |