Skip to main content

We use cookies to understand how you use our site and improve your experience. See our Privacy Policy.

STM8L151F2

8-bit Ultra-Low-Power MCU

The STM8L151F2 is a 8-bit ultra-low-power mcu from STMicroelectronics. View the full STM8L151F2 datasheet below including key specifications, absolute maximum ratings.

STM8L151F2 shares its datasheet with STM8L151C2, whose page lists every part number it covers.

Official STM8L151F2 datasheet (PDF) — the source this page was extracted from.

STM8L151F2 Key Specifications

ParameterValue
ADC12-bit, up to 1 Msps, up to 28 channels
DMA4 channels plus 1 memory-to-memory channel
RAM1 KB
GPIOs18
TimersTwo 16-bit (TIM2, TIM3), one 8-bit (TIM4)
Unique ID96-bit
Comparators2 ultra-low-power
Data EEPROM256 bytes with ECC
Flash Memory4 KB
Supply Voltage1.65V to 3.6V (without BOR), 1.8V to 3.6V (with BOR)
Per-I/O Leakage50 nA
CPU Max Frequency16 MHz (16 CISC MIPS peak)
Internal Oscillators16 MHz HSI, 38 kHz LSI
Fast Wakeup From Halt5 µs
Operating Temperature-40°C to 85°C or 125°C
Communication Interfaces1x SPI, 1x I2C (400 kHz), 1x USART

STM8L151F2 Overview

Part: STM8L151C2/K2/F2 and STM8L151C3/K3/F3 (low-density STM8L151x2/3) — STMicroelectronics

Type: 8-bit ultra-low-power MCU (STM8 core)

Description: 8-bit ultra-low-power STM8 MCU running at up to 16 MHz (16 CISC MIPS peak) with up to 8 KB Flash, 256 bytes data EEPROM, 1 KB RAM, 12-bit ADC and a 1.65–3.6 V supply range.

Operating Conditions:

  • Supply voltage: 1.65–3.6 V (VDD, without BOR); 1.8–3.6 V with BOR; VDDA 1.8–3.6 V when ADC1 is used
  • Operating temperature: -40 to 85 °C (suffix 6); suffix 3 devices extend to 125 °C
  • Max system clock: 16 MHz (1.65 V ≤ VDD < 3.6 V)
  • Junction temperature range: -40 to 105 °C (suffix 6), -40 to 130 °C (suffix 3)

Absolute Maximum Ratings:

  • Max supply voltage (VDD - VSS): 4.0 V (min -0.3 V)
  • Input voltage on true open-drain pins (PC0, PC1): VDD + 4.0 V max
  • Input voltage on any other pin: 4.0 V max
  • Total current into VDD: 80 mA; total current out of VSS: 80 mA
  • Output current sunk by any I/O: 25 mA (80 mA for IR_TIM pin); sourced: -25 mA
  • Max junction temperature: 150 °C
  • Storage temperature: -65 to +150 °C

Key Specs:

  • System clock frequency: 0–16 MHz at 1.65 V ≤ VDD < 3.6 V
  • VDD: 1.65–3.6 V; VDDA: 1.65–3.6 V (ADC1 not used), 1.8–3.6 V (ADC1 used)
  • Power dissipation at TA = 85 °C: 288 mW (LQFP48, UFQFPN32), 250 mW (UFQFPN28), 196 mW (UFQFPN20), 181 mW (TSSOP20)
  • Power dissipation at TA = 125 °C (suffix 3): 77 mW (LQFP48), 185 mW (UFQFPN32), 62 mW (UFQFPN28), 49 mW (UFQFPN20), 45 mW (TSSOP20)
  • Ultra-low leakage per I/O: 50 nA
  • Fast wakeup from Halt: 5 μs
  • Active-halt mode current: 1 μA
  • 12-bit ADC up to 1 Msps, 28 channels

Features:

  • Advanced STM8 core, Harvard architecture, 3-stage pipeline
  • Up to 8 KB Flash, 256 bytes data EEPROM with ECC, 1 KB RAM
  • 5 low-power modes: Wait, Low power run, Low-power wait, Active-halt with RTC, Halt
  • BOR with 5 selectable thresholds, POR/PDR, programmable voltage detector
  • 32 kHz and 1–16 MHz crystal oscillators, internal 16 MHz RC, internal 38 kHz RC, clock security system
  • Low-power RTC with BCD calendar and alarm, digital calibration
  • 4-channel DMA plus 1 memory-to-memory channel
  • 12-bit ADC with temperature sensor and internal reference voltage
  • 2 ultra-low-power comparators
  • Two 16-bit timers, one 8-bit timer, window and independent watchdogs, beeper
  • SPI, fast I²C (400 kHz), USART
  • Up to 41 I/Os, up to 20 capacitive sensing channels
  • SWIM debug interface, USART bootloader, 96-bit unique ID

Applications:

  • Ultra-low-power battery-powered embedded systems
  • Touch-sensing user interfaces

Package:

  • LQFP48 (7 x 7 mm)
  • UFQFPN32 (5 x 5 mm, 0.5 mm pitch)
  • UFQFPN28 (7 x 7 mm, 0.5 mm pitch)
  • UFQFPN20 (3 x 3 mm, 0.5 mm pitch)
  • TSSOP20 (6.5 x 4.4 mm, 0.65 mm pitch)

STM8L151F2 Features

  • Operating conditions
  • -Operating power supply: 1.65 to 3.6 V (without BOR), 1.8 to 3.6 V (with BOR)
  • -Temperature range: -40 to 85 or 125 °C
  • Low power features
  • -5 low-power modes: Wait, Low power run, Low-power wait, Active-halt with RTC, Halt
  • -Ultra-low leakage per I/0: 50 nA
  • -Fast wakeup from Halt: 5 μs
  • Advanced STM8 core
  • -Harvard architecture and 3-stage pipeline
  • -Max freq: 16 MHz, 16 CISC MIPS peak
  • -Up to 40 external interrupt sources
  • Reset and supply management
  • -Low-power, ultra safe BOR reset with 5 selectable thresholds
  • -Ultra-low power POR/PDR
  • -Programmable voltage detector (PVD)
  • Clock management
  • -32 kHz and 1-16 MHz crystal oscillators
  • -Internal 16 MHz factory-trimmed RC
  • -Internal 38 kHz low consumption RC
  • -Clock security system
  • Low power RTC
  • -BCD calendar with alarm interrupt
  • -Digital calibration with +/- 0.5 ppm accuracy
  • -LSE security system
  • -Auto-wakeup from Halt w/ periodic interrupt
  • Memories
  • -Up to 8 Kbyte of Flash program memory plus 256 byte of data EEPROM with ECC
  • -Flexible write/read protection modes
  • -1 Kbyte of RAM

STM8L151F2 Pin Configuration

Figure 3. STM8L151Cx LQFP48 package pinout

Figure 4. STM8L151Kx UFQFPN32 package pinout

49

Figure 5. STM8L151Gx UFQFPN28 package pinout

Figure 6. STM8L151Fx UFQFPN20 package pinout

Figure 7. STM8L151Fx TSSOP20 package pinout

Table 3. Legend/abbreviation for table 4

TypeI= input, O = output, S = power supplyI= input, O = output, S = power supply
LevelOutputHS = high sink/source (20 mA)
LevelFTFive-volt tolerant
Port and control configurationInputfloat = floating, wpu = weak pull-up
Port and control configurationOutputT = true open drain, OD = open drain, PP = push pull
Reset stateBold X (pin state after reset release). Unless otherwise specified, the pin state is the same during the reset phase (i.e. 'under reset') and after internal reset release (i.e. at reset state).Bold X (pin state after reset release). Unless otherwise specified, the pin state is the same during the reset phase (i.e. 'under reset') and after internal reset release (i.e. at reset state).

Table 4. Low-density STM8L151x2/3 pin description

Pin numberPin numberPin numberPin numberPin numberPin nameInputInputInputOutputOutputOutputMain function (after reset)Default alternate
LQFP48UFQFPN32UFQFPN28UFQFPN20TSSOP20TypeI/O levelfloatingwpuExt. interruptHigh sink/sourceODPPMain function (after reset)function
21114NRST/PA1 (1)I/O--X-HS-XResetPA1
32225PA2/OSC_IN/ [USART_TX] (2) / [SPI_MISO] (2)I/O-XXXHSXXPort A2HSE oscillator input / [USARTtransmit] / [SPI master in- slave out] /
43336PA3/OSC_OUT/ [USA RT_RX] (2) /[SPI_MOSI ] (2)I/O-XXXHSXXPort A3HSE oscillator output / [USART receive]/ [SPI master out/slave in] /
544--PA4/TIM2_BKIN/ [TIM2_ETR] (2) ADC1_IN2/ COMP1_INPI/O-XXXHSXXPort A4Timer 2 - break input / [Timer 2 - external trigger] /ADC1 input 2/ Comparator1 positive input
655--PA5/TIM3_BKIN/ [TIM3_ETR] (2) / ADC1_IN1/ COMP1_INPI/O-XXXHSXXPort A5Timer 3 - break input / [Timer 3 - external trigger] /ADC1input 1/ Comparator1 positive input
76---PA6/ADC1_TRIG/ ADC1_IN0/ COMP1_INPI/O-XXXHSXXPort A6ADC1- trigger /ADC1input 0/ Comparator1 positive input
8----PA7I/O-XXXHSXXPort A7-
241312710PB0 (3) /TIM2_CH1/ ADC1_IN18/ COMP1_INPI/O-XXXHSXXPort B0Timer 2 - channel 1 / ADC1_IN18/ Comparator1 positive input

Table 4. Low-density STM8L151x2/3 pin description

49

Table 4. Low-density STM8L151x2/3 pin description (continued)

Pin number - LQFP48Pin number - UFQFPN32Pin number - UFQFPN28Pin number - UFQFPN20Pin number - TSSOP20Pin nameTypeI/O levelInput - floatingInput - wpuInput - Ext. interruptOutput - High sink/sourceOutput - ODOutput - PPMain function (after reset)Default alternate function
251413811PB1/TIM3_CH1/ ADC1_IN17/ COMP1_INPI/O-XXXHSXXPort B1Timer 3 - channel1/ ADC1_IN17/ Comparator1 positive input
261514912PB2/ TIM2_CH2/ ADC1_IN16/ COMP1_INPI/O-XXXHSXXPort B2Timer 2 - channel2 ADC1_IN16/ Comparator1 positive input
2716151013PB3/TIM2_ETR/ ADC1_IN15/RTC_AL ARM (4) / COMP1_INPI/O-XXXHSXXPort B3Timer 2 - external trigger / ADC1_IN15 / RTC_ALARM (4) /Comparator1 positive input
2817161114PB4 (3) /SPI1_NSS/ ADC1_IN14/ COMP1_INPI/O-XXXHSXXPort B4SPI master/slave select / ADC1_IN14/ Comparator1 positive input
2918171215PB5/SPI_SCK/ /ADC1_IN13/ COMP1_INPI/O-XXXHSXXPort B5[SPI clock] / ADC1_IN13/ Comparator 1 positive input
3019181316PB6/SPI1_MOSI/ ADC1_IN12/ COMP1_INPI/O-XXXHSXXPort B6SPI master out/ slave in / ADC1_IN12/ Comparator1 positive input
3120191417PB7/SPI1_MISO/ ADC1_IN11/ COMP1_INPI/O-XXXHSXXPort B7SPI1 master in-slave out/ ADC1_IN11/ Comparator1 positive input
3725211518PC0/I2C_SDAI/OFTXXT (5)Port C0I2C data
3826221619PC1/I2C_SCLI/OFTXXT (5)Port C1I2C clock
412723--PC2/USART_RX/ADC 1_IN6/ COMP1_INPI/O-XXXHSXXPort C2USART receive / ADC1_IN6/ Comparator1 positive input
422824--PC3/USART_TX/ ADC1_IN5/ COMP1_INP/ COMP2_INMI/O-XXXHSXXPort C3USART transmit / ADC1_IN5/ Comparator1 positive input/Comparator 2 negative input

Table 4. Low-density STM8L151x2/3 pin description (continued)

Table 4. Low-density STM8L151x2/3 pin description (continued)

Pin number - LQFP48Pin number - UFQFPN32Pin number - UFQFPN28Pin number - UFQFPN20Pin number - TSSOP20Pin nameTypeI/O levelInput - floatingInput - wpuInput - Ext. interruptOutput - High sink/sourceOutput - ODOutput - PPMain function (after reset)Default alternate function
4329251720PC4/USART_CK]/ I2C_SMB/CCO/ ADC1_IN4/ COMP1_INP/ COMP2_INMI/O-XXXHSXXPort C4USART synchronous clock / I2C1_SMB / Configurable clock output / ADC1_IN4/ Comparator1 positive input/Comparator 2 negative input
443026181PC5/OSC32_IN / [SPI1_NSS] (2) / [USART_TX] (2) / TIM2_CH1 (6)I/O-XXXHSXXPort C5LSE oscillator input / [SPI master/slave select] / [USART transmit]/ Timer 2 -channel 1 (6)
453127192PC6/OSC32_OUT/ [SPI_SCK] (2) / [USART_RX] (2) / TIM2_CH2 (6)I/O-XXXHSXXPort C6LSE oscillator output / [SPI clock] / [USART receive]/ Timer 2 -channel 2 (6)
46----PC7/ADC1_IN3/ COMP1_INP/ COMP2_INMI/O-XXXHSXXPort C7ADC1_IN3/ Comparator1 positive input/Comparator 2 negative input
209869PD0/TIM3_CH2/ [ADC1_TRIG] (2) / ADC1_IN22/ COMP1_INP/ COMP2_INPI/O-XXXHSXXPort D0Timer 3 - channel 2 / [ADC1_Trigger] / ADC1_IN22/ Comparator1 positive input/Comparator 2 positive input
21109--PD1/TIM3_ETR/ ADC1_IN21/ COMP1_INP/ COMP2_INPI/O-XXXHSXXPort D1Timer 3 - external trigger / ADC1_IN21/ Comparator1 positive input/Comparator 2 positive input
221110--PD2/ADC1_IN20/ COMP1_INPI/O-XXXHSXXPort D2ADC1_IN20/ Comparator1 positive input
231211--PD3/ADC1_IN19/ RTC_CALIB (7) / COMP1_INPI/O-XXXHSXXPort D3ADC1_IN19/ RTC calibration (7) / Comparator1 positive input
332120--PD4/ADC1_IN10/ COMP1_INPI/O-XXXHSXXPort D4ADC1_IN10/ Comparator1 positive input

Table 4. Low-density STM8L151x2/3 pin description (continued)

49

Table 4. Low-density STM8L151x2/3 pin description (continued)

Pin number - LQFP48Pin number - UFQFPN32Pin number - UFQFPN28Pin number - UFQFPN20Pin number - TSSOP20Pin nameTypeI/O levelInput - floatingInput - wpuInput - Ext. interruptOutput - High sink/sourceOutput - ODOutput - PPMain function (after reset)Default alternate function
3422---PD5/ ADC1_IN9/ COMP1_INPI/O-XXXHSXXPort D5ADC1_IN9/ Comparator1 positive input
3523---PD6/ADC1_IN8/ RTC_CALIB/ COMP1_INPI/O-XXXHSXXPort D6ADC1_IN8 / RTC calibration/ Comparator1 positive input
3624---PD7 /ADC1_IN7/ RTC_ALARM/ COMP1_INPI/O-XXXHSXXPort D7ADC1_IN7/RTC alarm/ Comparator1 positive input
14----PE0I/O-XXXHSXXPort E0-
15----PE1I/O-XXXHSXXPort E1-
16----PE2I/O-XXXHSXXPort E2-
17----PE3/ADC1_IN26I/O-XXXHSXXPort E3ADC1_IN26
18----PE4/ADC1_IN27I/O-XXXHSXXPort E4ADC1_IN27
19----PE5/ADC1_IN23/ COMP1_INP/ COMP2_INPI/O-XXXHSXXPort E5ADC1_IN23/ Comparator 1 positive input/Comparator 2 positive input
47----PE6/PVD_INI/O-XXXHSXXPort E6PVD_IN
48----PE7/ADC1_IN25I/O-XXXHSXXPort E7ADC1_IN25
32----PF0/ADC1_IN24I/O-XXXHSXXPort F0ADC1_IN24
10----V DDS-------Digital supply voltageDigital supply voltage
-8758V DD /V DDA / V REF+S-------Digital supply voltage / ADC1 positive voltage referenceDigital supply voltage / ADC1 positive voltage reference
97647V SS / V REF- / V SSAS-------Ground voltage / ADC1 negative voltage reference / Analog ground voltageGround voltage / ADC1 negative voltage reference / Analog ground voltage
11----V DDAS-------Analog supply voltageAnalog supply voltage
12----V REF+S-------ADC1 positive voltage referenceADC1 positive voltage reference
13----Reserved--------Pin not connectedPin not connected

Table 4. Low-density STM8L151x2/3 pin description (continued)

Table 4. Low-density STM8L151x2/3 pin description (continued)

Pin number - LQFP48Pin number - UFQFPN32Pin number - UFQFPN28Pin number - UFQFPN20Pin number - TSSOP20Pin nameTypeI/O level floatingInputInput - wpuInput - Ext. interruptOutput - High sink/sourceOutput - ODOutput - PPMain function (after reset)Default alternate function
13228203PA0 (8) / [USART_CK] (2) / SWIM/BEEP/IR_TIM (9)I/OXXXHS (9)XXPort A0[USART1 synchronous clock] (2) / SWIM input and output / Beep output / Infrared Timer output
40----V SSIOS-------I/O ground voltageI/O ground voltage
39----V DDIOS-------I/O supply voltageI/O supply voltage
  1. Alternate function remapping option (if the same alternate function is shown twice, it indicates an exclusive choice not a duplication of the function).
  2. A pull-up is applied to PB0 and PB4 during the reset phase. These two pins are input floating after reset release.
  3. 20-pin and 28-pin packages only.
  4. In the open-drain output column, 'T' defines a true open-drain I/O (P-buffer and protection diode to V DD are not implemented).
  5. 20-pin packages only.
  6. 28-pin packages only
  7. The PA0 pin is in input pull-up during the reset phase and after reset release.
  8. High Sink LED driver capability available on PA0.

Note:

The slope control of all GPIO pins, except true open drain pins, can be programmed. By default, the slope control is limited to 2 MHz.

STM8L151F2 Absolute Maximum Ratings

Stresses above the absolute maximum ratings listed in Table 14: Voltage characteristics , Table 15: Current characteristics , and Table 16: Thermal characteristics may cause permanent damage to the device. These are stress ratings only and functional operation of the device at these conditions is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.

Device mission profile (application conditions) is compliant with JEDEC JESD47 Qualification Standard, extended mission profiles are available on demand.

Table 14. Voltage characteristics

SymbolRatingsMinMaxUnit
V DD - V SSExternal supply voltage (including V DD , V DDA , and V DDIO ) (1)- 0.34.0V
V IN (2)Input voltage on true open-drain pins (PC0 and PC1)V SS - 0.3V DD + 4.0V
V IN (2)Input voltage on any other pinV SS - 0.34.0V
V ESDElectrostatic discharge voltagesee Absolute maximum ratings (electrical sensitivity) on page 102see Absolute maximum ratings (electrical sensitivity) on page 102-
  1. VIN maximum must always be respected. Refer to Table 15. for maximum allowed injected current values.

102

Table 15. Current characteristics

SymbolRatingsMax.Unit
I VDDTotal current into V DD power line (source)80mA
I VSSTotal current out of V SS ground line (sink)80mA
I IOOutput current sunk by IR_TIM pin (with high sink LED driver capability)80mA
I IOOutput current sunk by any other I/O and control pin25mA
I IOOutput current sourced by any I/Os and control pin- 25mA
I INJ(PIN)Injected current on true open-drain pins (PC0 and PC1) (1)- 5 / +0mA
I INJ(PIN)Injected current on 3.6 V tolerant pins (1)- 5 / +0mA
I INJ(PIN)Injected current on any other pin (1)- 5 / +5mA
Σ I INJ(PIN)Total injected current (sum of all I/O and control pins) (2)± 25mA

Table 16. Thermal characteristics

SymbolRatingsValueUnit
T STGStorage temperature range-65 to +150° C
T JMaximum junction temperature150° C

Table 16. Thermal characteristics

STM8L151F2 Thermal Information

The maximum chip junction temperature (T Jmax ) must never exceed the values given in Table 17: General operating conditions on page 57 .

The maximum chip-junction temperature, T Jmax , in degree Celsius, may be calculated using the following equation:

$$T_{Jmax} = T_{Amax} + (P_{Dmax} \times \Theta_{JA})$$

STM8L151F2 Package Information

Figure 42. LQFP48 - 48-pin, 7 x 7 mm low-profile quad flat package outline

  1. Drawing is not to scale.

119

Table 57. LQFP48 - 48-pin, 7 x 7 mm low-profile quad flat package mechanical data

Symbolmillimeters - Minmillimeters - Typmillimeters - Maxinches (1) - Mininches (1) - Typinches (1) - Max
A--1.600--0.0630
A10.050-0.1500.0020-0.0059
A21.3501.4001.4500.05310.05510.0571
b0.1700.2200.2700.00670.00870.0106
c0.090-0.2000.0035-0.0079
D8.8009.0009.2000.34650.35430.3622
D16.8007.0007.2000.26770.27560.2835
D3-5.500--0.2165-
E8.8009.0009.2000.34650.35430.3622
E16.8007.0007.2000.26770.27560.2835
E3-5.500--0.2165-
e-0.500--0.0197-
L0.4500.6000.7500.01770.02360.0295
L1-1.000--0.0394-
k0°3.5°7°0°3.5°7°
ccc--0.080--0.0031

Table 57. LQFP48 - 48-pin, 7 x 7 mm low-profile quad flat package mechanical data

Figure 43. LQFP48 - 48-pin, 7 x 7 mm low-profile quad flat package recommended footprint

  1. Dimensions are expressed in millimeters.

The following figure gives an example of topside marking orientation versus pin 1 identifier location.

Other optional marking or inset/upset marks, which depend on supply chain operations, are not indicated below.

Figure 44. LQFP48 marking example (package top view)

  1. Parts marked as 'ES', 'E' or accompanied by an Engineering Sample notification letter, are not yet

119

qualified and therefore not yet ready to be used in production and any consequences deriving from such usage will not be at ST charge. In no event, ST will be liable for any customer usage of these engineering samples in production. ST Quality has to be contacted prior to any decision to use these Engineering Samples to run qualification activity.

Variants on the same datasheet

These parts have exact links to the same datasheet. They are candidates to compare, not verified drop-in replacements; check package, pinout and electrical limits.

Part NumberManufacturerPackage
STM8L151C2STMicroelectronicsLQFP-48
STM8L151C3STMicroelectronics—
STM8L151K2STMicroelectronicsUFQFPN32
STM8L151K3STMicroelectronicsUFQFPN32

Other Microcontrollers (MCU)

  • STM32F407VET6 – STMicroelectronics, ARM Cortex-M4 MCU
  • STM32H563ZIT6 – STMicroelectronics, Arm Cortex-M33 32-bit MCU
  • RP2040 – Raspberry Pi, Microcontroller
  • STM32H743VIT6 – STMicroelectronics, Microcontroller Unit (MCU)
  • STM32U575RIT6 – STMicroelectronics, Ultra-low-power Arm Cortex-M33 32-bit MCU
  • STM32L011F4U6 – STMicroelectronics, Ultra-low-power Arm Cortex-M0+ MCU
  • GD32F103C8T6 – GigaDevice, Arm Cortex-M3 32-bit MCU
  • CH32H417QEU6 – WCH, Dual-Core RISC-V Microcontroller

All Microcontrollers (MCU) datasheetsAll STMicroelectronics datasheets (808)

Data on this page is extracted from publicly available manufacturer datasheets using automated tools including AI. It may contain errors or omissions. Always verify specifications against the official manufacturer datasheet before making design or purchasing decisions. See our Terms of Service. Rights holders can submit a takedown request.

Ask your AI agent about the STM8L151F2

Connect SheetsData to Claude, Cursor, Codex or any MCP client and your agent reads this datasheet for you: pinout, limits, register maps and design checks, with the numbers taken from the PDF.

claude mcp add --transport http sheetsdata https://mcp.sheetsdata.com/mcp

Then ask: "Can the STM8L151F2 run from my 12 V rail? Check it against the datasheet limits."

Create a free account $2 of usage every month, no card needed.