English
Language : 

STM8AL318X Datasheet, PDF (61/131 Pages) STMicroelectronics – Automotive 8-bit ultra-low-power MCU, 64 Kbyte Flash, RTC, LCD, data EEPROM, timers, USARTs, I2C, SPIs, ADC, DAC, COMPs
STM8AL318x STM8AL3L8x
7
Option byte
Option byte
Option byte 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 byte can be modified in ICP mode (with SWIM) by accessing the EEPROM
address. See Table 12 for details on option byte addresses.
The option byte can also be modified ‘on the fly’ by the application in IAP mode, except for
the ROP, UBC and PCODESIZE values which are only taken into account when they are
modified in ICP mode (with the SWIM).
Refer to the STM8AL318x/STM8AL3L8x Flash programming manual (PM0054) and STM8
SWIM and Debug Manual (UM0470) for information on SWIM programming procedures.
Table 12. Option byte addresses
Option
Option bits
Factory
Address Option name byte
default
No.
7
6
5
4
3
2
1
0 setting
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
00 4808
00 4809
PCODESIZE
Independent
watchdog
option
Number of
stabilization
clock cycles for
HSE and LSE
oscillators
OPT2
OPT3
[3:0]
OPT4
Reserved
PCODE[7:0]
WWDG WWDG IWDG IWDG
_HALT _HW _HALT _HW
0x00
0x00
Reserved
LSECNT[1:0] HSECNT[1:0] 0x00
00 480A
00 480B
00 480C
Brownout reset OPT5
(BOR)
[3:0]
Bootloader
option byte
(OPTBL)
OPTBL
[15:0]
Reserved
BOR_TH
OPTBL[15:0]
BOR_
ON
0x01
0x00
0x00
DocID027179 Rev 6
61/131
63