Datasheet
STM8L151x2, STM8L151x3 Functional overview
Doc ID 018780 Rev 4 19/112
Figure 2. Low density STM8L15x 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.
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 every second to
every year
OSC_OUT
OSC_IN
HSE
HSI
LSI
LSE
LSE
LSI
HSE OSC
1-16 MHz
HSI RC
1-16 MHz
LSI RC
38 kHz
LSE OSC
32.768 kHz
OSC32_OUT
OSC32_IN
CCO
Configurable
clock output
/1;2;4;8;16;32;64
prescaler
CCO
HSE
HSI
LSI
LSE
/1;2;4;8;16;32;64
prescaler
SYSCLK
SYSCLK to core and
memory
PCLK to
peripherals
Peripheral
Clock
CLKBEEPSEL[1:0]
IWDGCLK
BEEPCLK
RTCCLK
enable (13 bits)
RTCSEL[3:0]
RTC
/1;2;4;8;16;32;64
prescaler
to
BEEP
to
IWDG
to
RTC
MS18281V1
SWIM[3:0]
CCOSEL[3:0]