STM8L151C2/K2/G2/F2 STM8L151C3/K3/G3/F3 8-bit ultra-low-power MCU, up to 8 KB Flash, up to 256 bytes data EEPROM, RTC, timers, USART, I2C, SPI, ADC, comparators Datasheet - production data Features Operating conditions Operating power supply: 1.65 to 3.6 V LQFP48 (7x7 mm) (without BOR), 1.8 to 3.6 V (with BOR) TSSOP20 (6.4x4.4 mm) Temperature range: -40 to 85 or 125 C Low power features 5 low-power modes: Wait, Low power run, UFQFPN32 (5x5 mm) Low-power wait, Active-halt with RTC, Halt UFQFPN28 (4x4 mm) UFQFPN20 (3x3 mm) Ultra-low leakage per I/0: 50 nA Fast wakeup from Halt: 5 s DMA 2 4 channels supporting ADC, SPI, I C, Advanced STM8 core USART, timers Harvard architecture and 3-stage pipeline 1 channel for memory-to-memory Max freq: 16 MHz, 16 CISC MIPS peak 12-bit ADC up to 1 Msps/28 channels Up to 40 external interrupt sources Temp. sensor and internal ref. voltage Reset and supply management 2 ultra-low-power comparators Low-power, ultra safe BOR reset with 5 selectable thresholds 1 with fixed threshold and 1 rail to rail Ultra-low power POR/PDR Wakeup capability Programmable voltage detector (PVD) Timers Clock management Two 16-bit timers with 2 channels (IC, OC, PWM), quadrature encoder (TIM2, TIM3) 32 kHz and 1-16 MHz crystal oscillators One 8-bit timer with 7-bit prescaler (TIM4) Internal 16 MHz factory-trimmed RC 1 Window and 1 independent watchdog Internal 38 kHz low consumption RC Beeper timer with 1, 2 or 4 kHz frequencies Clock security system Communication interfaces Low power RTC One synchronous serial interface (SPI) BCD calendar with alarm interrupt 2 Fast I C 400 kHz Digital calibration with +/- 0.5 ppm accuracy One USART LSE security system Auto-wakeup from Halt w/ periodic interrupt Up to 41 I/Os, all mappable on interrupt vectors Memories Up to 20 capacitive sensing channels Up to 8 Kbyte of Flash program memory supporting touchkey, proximity touch, linear plus 256 byte of data EEPROM with ECC touch, and rotary touch sensors Flexible write/read protection modes Development support 1 Kbyte of RAM Fast on-chip programming and non- intrusive debugging with SWIM Bootloader using USART 96-bit unique ID July 2018 DS7204 Rev 11 1/123 This is information on a product in full production. www.st.comContents STM8L151x2, STM8L151x3 Contents 1 Introduction 9 2 Description 11 2.1 Device overview 12 2.2 Ultra-low-power continuum 13 3 Functional overview 14 3.1 Low-power modes 15 3.2 Central processing unit STM8 . 15 3.2.1 Advanced STM8 Core 15 3.2.2 Interrupt controller . 16 3.3 Reset and supply management 17 3.3.1 Power supply scheme 17 3.3.2 Power supply supervisor 17 3.3.3 Voltage regulator 17 3.4 Clock management . 18 3.5 Low power real-time clock 19 3.6 Memories . 20 3.7 DMA . 20 3.8 Analog-to-digital converter 20 3.9 Ultra-low-power comparators 20 3.10 System configuration controller and routing interface . 21 3.11 Touch sensing . 21 3.12 Timers . 21 3.12.1 16-bit general purpose timers 22 3.12.2 8-bit basic timer . 22 3.13 Watchdog timers . 22 3.13.1 Window watchdog timer . 22 3.13.2 Independent watchdog timer . 22 3.14 Beeper . 22 3.15 Communication interfaces 23 3.15.1 SPI . 23 2/123 DS7204 Rev 11