Loads on click. Unloads only if this page sits in the background.

Symbol & Footprint

Schematic Symbol

Open full view ↗
Loads on click. Unloads only if this page sits in the background.

PCB Footprint

Open full view ↗
Loads on click. Unloads only if this page sits in the background.
Loads on click. Unloads only if this page sits in the background.
Download PDF
Contents

README

markdown

STM8L151K4T6

STMicroelectronics · Microcontrollers (MCU/MPU/SOC) · LQFP-32(7x7)

STM8L151K4T6 from STMicroelectronics, in a LQFP-32(7x7). Pinout and pin descriptions extracted from the manufacturer datasheet by ds2sf; symbol, footprint, and 3D from KiCad-official CAD.

Pinout

Pin Name Type Function
1 NRST/PA1 bidirectional Active-low external reset input with internal pull-up (RPU typ. 45 kΩ); when reconfigured as PA1 it can only be used as a push-pull general-purpose output, not as an input.
2 PA2/OSC_IN/[USART1_TX]/[SPI1_MISO] bidirectional Port A2 high-sink/source I/O; alternate functions are the 1-16 MHz HSE crystal oscillator input (OSC_IN), remappable USART1 transmit, or remappable SPI1 master-in/slave-out (MISO).
3 PA3/OSC_OUT/[USART1_RX]/[SPI1_MOSI] bidirectional Port A3 high-sink/source I/O; alternate functions are the HSE oscillator output (OSC_OUT), remappable USART1 receive, or remappable SPI1 master-out/slave-in (MOSI).
4 PA4/TIM2_BKIN/[TIM2_TRIG]/LCD_COM0/ADC1_IN2/COMP1_INP bidirectional Port A4 high-sink/source I/O; alternate functions are Timer2 break input, remappable Timer2 trigger, LCD common 0 (STM8L152xx devices only, not present on this non-LCD part), ADC1 analog input channel 2, and Comparator1 positive input.
5 PA5/TIM3_BKIN/[TIM3_TRIG]/LCD_COM1/ADC1_IN1/COMP1_INP bidirectional Port A5 high-sink/source I/O; alternate functions are Timer3 break input, remappable Timer3 trigger, LCD common 1 (STM8L152xx devices only), ADC1 analog input channel 1, and Comparator1 positive input.
6 PA6/[ADC1_TRIG]/LCD_COM2/ADC1_IN0/COMP1_INP bidirectional Port A6 high-sink/source I/O; alternate functions are remappable ADC1 external trigger, LCD common 2 (STM8L152xx devices only), ADC1 analog input channel 0, and Comparator1 positive input.
7 VSS/VSSA/VREF- power_in Combined digital I/O ground, analog ground, and ADC1 negative voltage reference supply pin.
8 VDD/VDDA/VREF+ power_in Combined digital power supply, analog supply voltage, and ADC1 positive voltage reference input; operating range 1.8 V to 3.6 V (down to 1.65 V at power-down).
9 PD0/TIM3_CH2/[ADC1_TRIG]/ADC1_IN22/COMP2_INP/COMP1_INP bidirectional Port D0 high-sink/source I/O (this alternate-function set is used on STM8L151xx non-LCD devices); functions are Timer3 channel 2, remappable ADC1 external trigger, ADC1 analog input channel 22, Comparator2 positive input, and Comparator1 positive input.
10 PD1/TIM1_CH3N/[TIM3_TRIG]/LCD_COM3/ADC1_IN21/COMP2_INP/COMP1_INP bidirectional Port D1 high-sink/source I/O; alternate functions are Timer1 inverted channel 3, remappable Timer3 trigger, LCD common 3 (STM8L152xx devices only), ADC1 analog input channel 21, Comparator2 positive input, and Comparator1 positive input.
11 PD2/TIM1_CH1/LCD_SEG8/ADC1_IN20/COMP1_INP bidirectional Port D2 high-sink/source I/O; alternate functions are Timer1 channel 1, LCD segment 8 (STM8L152xx devices only), ADC1 analog input channel 20, and Comparator1 positive input.
12 PD3/TIM1_TRIG/LCD_SEG9/ADC1_IN19/COMP1_INP bidirectional Port D3 high-sink/source I/O; alternate functions are Timer1 trigger input, LCD segment 9 (STM8L152xx devices only), ADC1 analog input channel 19, and Comparator1 positive input.
13 PB0/TIM2_CH1/LCD_SEG10/ADC1_IN18/COMP1_INP bidirectional Port B0 high-sink/source I/O; alternate functions are Timer2 channel 1, LCD segment 10 (STM8L152xx devices only), ADC1 analog input channel 18, and Comparator1 positive input.
14 PB1/TIM3_CH1/LCD_SEG11/ADC1_IN17/COMP1_INP bidirectional Port B1 high-sink/source I/O; alternate functions are Timer3 channel 1, LCD segment 11 (STM8L152xx devices only), ADC1 analog input channel 17, and Comparator1 positive input.
15 PB2/TIM2_CH2/LCD_SEG12/ADC1_IN16/COMP1_INP bidirectional Port B2 high-sink/source I/O; alternate functions are Timer2 channel 2, LCD segment 12 (STM8L152xx devices only), ADC1 analog input channel 16, and Comparator1 positive input.
16 PB3/[TIM2_TRIG]/TIM1_CH2N/LCD_SEG13/ADC1_IN15/COMP1_INP bidirectional Port B3 high-sink/source I/O; alternate functions are remappable Timer2 trigger, Timer1 inverted channel 2, LCD segment 13 (STM8L152xx devices only), ADC1 analog input channel 15, and Comparator1 positive input.
17 PB4/[SPI1_NSS]/LCD_SEG14/ADC1_IN14/DAC_OUT/COMP1_INP bidirectional Port B4 high-sink/source I/O; alternate functions are remappable SPI1 master/slave select (NSS), LCD segment 14 (STM8L152xx devices only), ADC1 analog input channel 14, DAC analog output, and Comparator1 positive input.
18 PB5/[SPI1_SCK]/LCD_SEG15/ADC1_IN13/DAC_OUT/COMP1_INP bidirectional Port B5 high-sink/source I/O; alternate functions are remappable SPI1 clock (SCK), LCD segment 15 (STM8L152xx devices only), ADC1 analog input channel 13, DAC analog output, and Comparator1 positive input.
19 PB6/[SPI1_MOSI]/LCD_SEG16/ADC1_IN12/COMP1_INP/DAC_OUT bidirectional Port B6 high-sink/source I/O; alternate functions are remappable SPI1 master-out/slave-in (MOSI), LCD segment 16 (STM8L152xx devices only), ADC1 analog input channel 12, Comparator1 positive input, and DAC analog output.
20 PB7/[SPI1_MISO]/LCD_SEG17/ADC1_IN11/COMP1_INP bidirectional Port B7 high-sink/source I/O; alternate functions are remappable SPI1 master-in/slave-out (MISO), LCD segment 17 (STM8L152xx devices only), ADC1 analog input channel 11, and Comparator1 positive input.
21 PD4/TIM1_CH2/LCD_SEG18/ADC1_IN10/COMP1_INP bidirectional Port D4 high-sink/source I/O; alternate functions are Timer1 channel 2, LCD segment 18 (STM8L152xx devices only), ADC1 analog input channel 10, and Comparator1 positive input.
22 PD5/TIM1_CH3/LCD_SEG19/ADC1_IN9/COMP1_INP bidirectional Port D5 high-sink/source I/O; alternate functions are Timer1 channel 3, LCD segment 19 (STM8L152xx devices only), ADC1 analog input channel 9, and Comparator1 positive input.
23 PD6/TIM1_BKIN/LCD_SEG20/ADC1_IN8/RTC_CALIB/VREF_OUT/COMP1_INP bidirectional Port D6 high-sink/source I/O; alternate functions are Timer1 break input, LCD segment 20 (STM8L152xx devices only), ADC1 analog input channel 8, RTC calibration clock output, internal voltage reference output, and Comparator1 positive input.
24 PD7/TIM1_CH1N/LCD_SEG21/ADC1_IN7/RTC_ALARM/VREF_OUT/COMP1_INP bidirectional Port D7 high-sink/source I/O; alternate functions are Timer1 inverted channel 1, LCD segment 21 (STM8L152xx devices only), ADC1 analog input channel 7, RTC alarm output, internal voltage reference output, and Comparator1 positive input.
25 PC0/I2C1_SDA bidirectional Port C0 true open-drain, 5 V tolerant I/O; alternate function is the I2C1 data line (SDA).
26 PC1/I2C1_SCL bidirectional Port C1 true open-drain, 5 V tolerant I/O; alternate function is the I2C1 clock line (SCL).
27 PC2/[USART1_RX]/LCD_SEG22/ADC1_IN6/COMP1_INP/VREF_OUT bidirectional Port C2 high-sink/source I/O; alternate functions are remappable USART1 receive, LCD segment 22 (STM8L152xx devices only), ADC1 analog input channel 6, Comparator1 positive input, and internal voltage reference output.
28 PC3/[USART1_TX]/LCD_SEG23/ADC1_IN5/COMP1_INP/COMP2_INM bidirectional Port C3 high-sink/source I/O; alternate functions are remappable USART1 transmit, LCD segment 23 (STM8L152xx devices only), ADC1 analog input channel 5, Comparator1 positive input, and Comparator2 negative input.
29 PC4/[USART1_CK]/I2C1_SMB/CCO/LCD_SEG24/ADC1_IN4/COMP2_INM/COMP1_INP bidirectional Port C4 high-sink/source I/O; alternate functions are remappable USART1 synchronous clock, I2C1 SMBus alert, configurable clock output (CCO), LCD segment 24 (STM8L152xx devices only), ADC1 analog input channel 4, Comparator2 negative input, and Comparator1 positive input.
30 PC5/OSC32_IN/[SPI1_NSS]/[USART1_TX] bidirectional Port C5 high-sink/source I/O; alternate functions are the 32.768 kHz LSE oscillator input (OSC32_IN), remappable SPI1 master/slave select, or remappable USART1 transmit.
31 PC6/OSC32_OUT/[SPI1_SCK]/[USART1_RX] bidirectional Port C6 high-sink/source I/O; alternate functions are the LSE oscillator output (OSC32_OUT), remappable SPI1 clock, or remappable USART1 receive.
32 PA0/[USART1_CK]/SWIM/BEEP/IR_TIM bidirectional Port A0 I/O with high-sink LED driver capability (up to 80 mA); alternate functions are remappable USART1 synchronous clock, the SWIM single-wire debug/programming interface, beeper output, and infrared timer output.

Key specifications

Parameter Value
Manufacturer STMicroelectronics
Package LQFP-32(7x7)
Category Embedded Processors & Controllers
Pins 32

CAD (KiCad official)

  • Symbol: STM8L151K4T6
  • Footprint: Package_QFP:LQFP-32_7x7mm_P0.8mm
  • 3D model: LQFP-32(7x7) (KiCad packages3D, STEP)
  • 3D model files: stm8l151k4t6-etched.step / stm8l151k4t6-etched.glb carry the MPN laser-etched on the die in a toggleable Adom.LaserEtch group (Fusion-ready); stm8l151k4t6.step / stm8l151k4t6.glb are the bare package body.

Provenance

Data extracted from the manufacturer datasheet, not a distributor listing:

  • Datasheet: STMicroelectronics datasheet (101 pp, sha256 0350409b30234fc9, retrieved 2026-09-22, tier: lcsc)
  • Extractor: parts-factory 2.0.0 / extract_pins 0.2, primary claude-haiku-4-5-20251001 (text), consensus claude-sonnet-5 (agreed), guards: pin_guards 0.1: passed. Pins are checked against the footprint pad set and their cited datasheet pages before publish.
  • CAD: KiCad official libraries (CC-BY-SA 4.0).

Datasheet PDF