Electronic Components Datasheet Search
  English  ▼

X  

PM0051 Datasheet(PDF) 22 Page - STMicroelectronics

Part # PM0051
Description  How to program STM8S and STM8A Flash program memory and data EEPROM
PDF  27 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

PM0051 Datasheet(HTML) 22 Page - STMicroelectronics

Back Button PM0051 Datasheet HTML 18Page - STMicroelectronics PM0051 Datasheet HTML 19Page - STMicroelectronics PM0051 Datasheet HTML 20Page - STMicroelectronics PM0051 Datasheet HTML 21Page - STMicroelectronics PM0051 Datasheet HTML 22Page - STMicroelectronics PM0051 Datasheet HTML 23Page - STMicroelectronics PM0051 Datasheet HTML 24Page - STMicroelectronics PM0051 Datasheet HTML 25Page - STMicroelectronics PM0051 Datasheet HTML 26Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 22 / 27 page
background image
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).



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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