Datasheet
Option bytes STM8L15xx8, STM8L15xR6
62/134 DocID17943 Rev 6
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, UBC and PCODESIZE values which can only be taken into account when they are
modified in ICP mode (with the SWIM).
Refer to the STM8L15x/STM8L16x Flash programming manual (PM0054) and STM8 SWIM
and debug manual (UM0470) for information on SWIM programming procedures.
Table 12. Option byte addresses
Address Option name
Option
byte
No.
Option bits Factory
default
setting
7654 3 2 1 0
00 4800
Read-out
protection
(ROP)
OPT0 ROP[7:0] 0xAA
00 4802
UBC (User
Boot code size)
OPT1 UBC[7:0] 0x00
00 4807 PCODESIZE OPT2 PCODE[7:0] 0x00
00 4808
Independent
watchdog
option
OPT3
[3:0]
Reserved
WWDG
_HALT
WWDG
_HW
IWDG
_HALT
IWDG
_HW
0x00
00 4809
Number of
stabilization
clock cycles for
HSE and LSE
oscillators
OPT4 Reserved LSECNT[1:0] HSECNT[1:0] 0x00
00 480A
Brownout reset
(BOR)
OPT5
[3:0]
Reserved BOR_TH
BOR_
ON
0x00
00 480B Bootloader
option bytes
(OPTBL)
OPTBL
[15:0]
OPTBL[15:0]
0x00
00 480C 0x00