Datasheet

Functional overview STM8L15xx8, STM8L15xR6
18/134 DocID17943 Rev 6
Figure 2. Clock tree diagram
3.5 Low power real-time clock
The real-time clock (RTC) is an independent binary coded decimal (BCD) timer/counter.
Six byte locations contain the second, minute, hour (12/24 hour), week day, date, month,
year, in BCD (binary coded decimal) format. Correction for 28, 29 (leap year), 30, and 31
day months are made automatically. The subsecond field can also be read in binary format.
The calendar can be corrected from 1 to 32767 RTC clock pulses. This allows to make a
synchronization to a master clock.
The RTC offers a digital calibration which allows an accuracy of +/-0.5 ppm.
It provides a programmable alarm and programmable periodic interrupts with wakeup from
Halt capability.
Periodic wakeup time using the 32.768 kHz LSE with the lowest resolution (of 61 µs) is
from min. 122 µs to max. 3.9 s. With a different resolution, the wakeup time can reach
36 hours
Periodic alarms based on the calendar can also be generated from LSE period to every
year
A clock security system detects a failure on LSE, and can provide an interrupt with wakeup
capability. The RTC clock can automatically switch to LSI in case of LSE failure.
The RTC also provides 3 anti-tamper detection pins. This detection embeds a
programmable filter and can wakeup the MCU.
(3%/3#
 -(Z
(3)2#
 -(Z
,3)2#
K (Z
,3%/3#
 K
(
Z
(3)
,3)
24#
PRESCALER

0#,+
TOPERIPHERALS
24##,+
TO,#$
TO)7$'
393#,+
(3%
,3)
,3%
/3#?/54
/3#?/54
/3#?).
/3#?).
CLOCKOUTPUT
##/
PRESCALER

(3)
,3)
(3%
,3%
##/
TOCOREAND
MEMORY
393#,+
0RESCALER

)7$'#,+
24#3%,;=
,3%
#,+"%%03%,;=
TO"%%0
"%%0#,+
AI
#33
CONFIGURABLE

0ERIPHERAL
#LOCKENABLEBITS
TO24#
24##,+
CLOCKENABLEBIT
,#$#,+
TO,#$
393#,+
(ALT
CLOCKENABLEBIT
,#$PERIPHERAL
24##,+
,#$PERIPHERAL
#33?,3%