Datasheet
Functional overview STM8L151x2, STM8L151x3
22/112 Doc ID 018780 Rev 4
3.12.1 16-bit general purpose timers
● 16-bit autoreload (AR) up/down-counter
● 7-bit prescaler adjustable to fixed power of 2 ratios (1…128)
● 2 individually configurable capture/compare channels
● PWM mode
● Interrupt capability on various events (capture, compare, overflow, break, trigger)
● Synchronization with other timers or external signals (external clock, reset, trigger and
enable)
3.12.2 8-bit basic timer
The 8-bit timer consists of an 8-bit up auto-reload counter driven by a programmable
prescaler. It can be used for timebase generation with interrupt generation on timer overflow.
3.13 Watchdog timers
The watchdog system is based on two independent timers providing maximum security to
the applications.
3.13.1 Window watchdog timer
The window watchdog (WWDG) is used to detect the occurrence of a software fault, usually
generated by external interferences or by unexpected logical conditions, which cause the
application program to abandon its normal sequence.
3.13.2 Independent watchdog timer
The independent watchdog peripheral (IWDG) can be used to resolve processor
malfunctions due to hardware or software failures.
It is clocked by the internal LSI RC clock source, and thus stays active even in case of a
CPU clock failure.
3.14 Beeper
The beeper function outputs a signal on the BEEP pin for sound generation. The signal is in
the range of 1, 2 or 4 kHz.