Datasheet

DocID15962 Rev 13 57/131
STM8L151xx, STM8L152xx Option bytes
59
7 Option bytes
Option bytes contain configurations for device hardware features as well as the memory
protection of the device. They are stored in a dedicated memory block.
All option bytes can be modified in ICP mode (with SWIM) by accessing the EEPROM
address. See Table 12 for details on option byte addresses.
The option bytes can also be modified ‘on the fly’ by the application in IAP mode, except for
the ROP and UBC values which can only be taken into account when they are modified in
ICP mode (with the SWIM).
Refer to the STM8L15x Flash programming manual (PM0054) and STM8 SWIM and Debug
Manual (UM0470) for information on SWIM programming procedures.
Table 12. Option byte addresses
Addr. Option name
Option
byte
No.
Option bits Factory
default
setting
76543210
0x00 4800
Read-out
protection
(ROP)
OPT0 ROP[7:0] 0xAA
0x00 4802
UBC (User
Boot code size)
OPT1 UBC[7:0] 0x00
0x00 4807 Reserved 0x00
0x00 4808
Independent
watchdog
option
OPT3
[3:0]
Reserved
WWDG
_HALT
WWDG
_HW
IWDG
_HALT
IWDG
_HW
0x00
0x00 4809
Number of
stabilization
clock cycles for
HSE and LSE
oscillators
OPT4 Reserved LSECNT[1:0] HSECNT[1:0] 0x00
0x00 480A
Brownout reset
(BOR)
OPT5
[3:0]
Reserved BOR_TH
BOR_
ON
0x00
0x00 480B Bootloader
option bytes
(OPTBL)
OPTBL
[15:0]
OPTBL[15:0]
0x00
0x00 480C 0x00