En DM00034689
En DM00034689
Features
Ultra-low-power platform
1.65 V to 3.6 V power supply LQFP144 (20 20 mm) UFBGA132 WLCSP64
LQFP100 (14 14 mm) (7 7 mm)
-40C to 105C temperature range LQFP64 (10 10 mm) (0.4 mm pitch)
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1 Device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Ultra-low-power device continuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.2 Shared peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.3 Common system strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.4 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Functional overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.1 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 ARM Cortex-M3 core with MPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 Reset and supply management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Power supply schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.2 Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.3 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.4 Boot modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 Clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5 Low-power real-time clock and backup registers . . . . . . . . . . . . . . . . . . . 25
3.6 GPIOs (general-purpose inputs/outputs) . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.7 Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.8 FSMC (flexible static memory controller) . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.9 DMA (direct memory access) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.10 LCD (liquid crystal display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.11 ADC (analog-to-digital converter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.11.1 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.11.2 Internal voltage reference (VREFINT) . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.12 DAC (digital-to-analog converter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.13 Operational amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.14 Ultra-low-power comparators and reference voltage . . . . . . . . . . . . . . . . 29
3.15 System configuration controller and routing interface . . . . . . . . . . . . . . . 29
4 Pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5 Memory mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6 Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1 Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.1 Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.2 Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.3 Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.4 Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.5 Pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.6 Power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.1.7 Optional LCD power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.1.8 Current consumption measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.2 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.3 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.3.1 General operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
List of tables
List of figures
Figure 46. LQFP64, 10 x 10 mm, 64-pin low-profile quad flat package outline . . . . . . . . . . . . . . . . . 136
Figure 47. LQFP64, 10 x 10 mm, 64-pin low-profile quad flat package
recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Figure 48. LQFP64 10 x 10 mm, 64-pin low-profile quad flat package top view example . . . . . . . . . 138
Figure 49. UFBGA132, 7 x 7 mm, 132-ball ultra thin, fine-pitch ball grid array package outline . . . . 139
Figure 50. UFBGA132, 7 x 7 mm, 132-ball ultra thin, fine-pitch ball grid array package
recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Figure 51. UFBGA132, 7 x 7 mm, 132-ball ultra thin, fine-pitch ball grid array package
top view example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Figure 52. WLCSP64, 0.4 mm pitch wafer level chip scale package outline . . . . . . . . . . . . . . . . . . . 142
Figure 53. WLCSP64, 0.4 mm pitch wafer level chip scale package
recommended footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Figure 54. WLCSP64, 0.4 mm pitch wafer level chip scale package top view example . . . . . . . . . . 144
Figure 55. Thermal resistance suffix 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Figure 56. Thermal resistance suffix 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
1 Introduction
This datasheet provides the ordering information and mechanical device characteristics of
the STM32L151xD and STM32L152xD ultra-low-power ARM Cortex-M3 based
microcontroller product line.
The STM32L151xD and STM32L152xD microcontrollers feature 384 Kbytes of Flash
memory.
The ultra-low-power STM32L151xD and STM32L152xD family includes devices in 5
different package types: from 64 pins to 144 pins. Depending on the device chosen,
different sets of peripherals are included, the description below gives an overview of the
complete range of peripherals proposed in this family.
These features make the ultra-low-power STM32L151xD and STM32L152xD
microcontroller family suitable for a wide range of applications:
Medical and handheld equipment
Application control and user interface
PC peripherals, gaming, GPS and sport equipment
Alarm systems, wired and wireless sensors, video intercom
Utility metering
This STM32L151xD and STM32L152xD datasheet should be read in conjunction with the
STM32L1xxxx reference manual (RM0038). The application note Getting started with
STM32L1xxxx hardware development (AN3216) gives a hardware implementation
overview. Both documents are available from the STMicroelectronics website www.st.com.
For information on the ARM Cortex-M3 core please refer to the ARM Cortex-M3
technical reference manual, available from the www.arm.com website. Figure 1 shows the
general block diagram of the device family.
2 Description
RAM (Kbytes) 48
32 bit 1
General-
Timers 6
purpose
Basic 2
SPI 8(3)(1)
I2S 2
Communi- I2C 2
cation
interfaces USART 5
USB 1
SDIO 1
Operation amplifiers 3
12-bit DAC 2
Number of channels 2
Comparators 2
2.2.1 Performance
All families incorporate highly energy-efficient cores with both Harvard architecture and
pipelined execution: advanced STM8 core for STM8L families and ARM Cortex-M3 core for
STM32L family. In addition specific care for the design architecture has been taken to
optimize the mA/DMIPS and mA/MHz ratios.
This allows the ultra-low-power performance to range from 5 up to 33.3 DMIPs.
2.2.4 Features
ST ultra-low-power continuum also lies in feature compatibility:
More than 15 packages with pin count from 20 to 144 pins and size down to 3 x 3 mm
Memory density ranging from 2 to 512 Kbytes
3 Functional overview
#9''
-7$* 6: 9''&25(
SEXV 7UDFH&RQWUROOHU(70 32:(5
9'' 9WR9
1-7567 92/75(* 9VV
-7', 0&38 LEXV
((3520ELW
REO
-7&.6:&/.
,QWHUIDFH
-7066:'$7 .%352*5$0 9UHI
)PD[0+] 'EXV
((3520
-7'2 .%'$7$
.%%227 6XSSO\PRQLWRULQJ
DV$)
%XV0DWUL[06
'8$/%$1.5::
038 6\VWHP 1567
3'5
65$0. 3'5
19,&
#9''
*3'0$FKDQQHOV 26&B,1
$ ;7$/26& 26&B287
' #9''$ 0+]
&/. *3'0$FKDQQHOV
2(1 $+%3&/.
3//
:(1 $3%3&/.
:$,71 +&/. &ORFN
(%$5 0JPW
/%$5 )60& )&/. :'*.
%/1
6XSSO\ 6WDQGE\
5&+6, LQWHUIDFH
PRQLWRULQJ
9''$
%25%JDS %25
966$ 5&06, 26&B,1
;7$/N+]
26&B287
39' ,QW
#5&/6,
9 '' $
57&B287
&DSVHQV 57&9
%DFNXS
$+%)PD[ 0+]
$:8 7$03(5
&203[B,1[ *3&RPS 5HJ
383' %DFNXSLQWHUIDFH
#9''$
#9''
3$>@ *3,23257$
9/&'
9/&' 9WR9
/&'%RRVWHU
3%>@ *3,23257%
7,0(5 FKDQQHOV
3&>@ *3,23257&
7,0(5 FKDQQHOV
3'>@ *3,23257'
7,0(5 FKDQQHOV
3(>@ *3,23257(
5;7;&76576
86$57
*3,23257* 6PDUW&DUGDV$)
3*>@
86$57 5;7;DV$)
(;7,7
$) :.83 $+%$3% $+%$3%
86$57 5;7;DV$)
026,0,62 63,
6&.166DV$) 026,0,626&.166:6&.
63,,6
[[ELW 0&.6'DV$)
5;7;&76576
6PDUW&DUGDV$) 86$57 63,,6 026,0,626&.166:6&.
[[ELW 0&.6'DV$)
86%65$0%
#9''$
$3%)PD[ 0+]
$3%)PD[ 0+]
$)
:LQ:$7&+'2* ,& 6&/6'$
9''5()B$'&
ELW$'& ,) $V$)
Range 1, Range 2
Conversion time up Degraded speed
VDD=VDDA= 1.8 to 2.0 V(1) Not functional or
to 500 Ksps performance
Range 3
CPU Y -- Y -- -- -- -- --
Flash Y Y Y Y -- -- -- --
RAM Y Y Y Y Y -- -- --
Backup Registers Y Y Y Y Y -- Y --
EEPROM Y Y Y Y Y -- -- --
Brown-out rest
Y Y Y Y Y Y Y --
(BOR)
DMA Y Y Y Y -- -- -- --
Programmable
Voltage Detector Y Y Y Y Y Y Y --
(PVD)
Power On Reset
Y Y Y Y Y Y Y --
(POR)
Power Down Rest
Y Y Y Y Y -- Y --
(PDR)
High Speed
Y Y -- -- -- -- -- --
Internal (HSI)
High Speed
Y Y -- -- -- -- -- --
External (HSE)
Low Speed Internal
Y Y Y Y Y -- Y --
(LSI)
Low Speed
Y Y Y Y Y -- Y --
External (LSE)
Multi-Speed
Y Y Y Y -- -- -- --
Internal (MSI)
Inter-Connect
Y Y Y Y -- -- -- --
Controller
RTC Y Y Y Y Y Y Y --
RTC Tamper Y Y Y Y Y Y Y Y
Auto WakeUp
Y Y Y Y Y Y Y Y
(AWU)
LCD Y Y Y Y Y -- -- --
USB Y Y -- -- -- Y -- --
(1)
USART Y Y Y Y Y -- --
SPI Y Y Y Y -- -- -- --
(1)
I2C Y Y Y Y -- -- --
ADC Y Y -- -- -- -- -- --
DAC Y Y Y Y Y -- -- --
Tempsensor Y Y Y Y Y -- -- --
OP amp Y Y Y Y Y -- -- --
Comparators Y Y Y Y Y Y -- --
16-bit and 32-bit
Y Y Y Y -- -- -- --
Timers
IWDG Y Y Y Y Y Y Y Y
WWDG Y Y Y Y -- -- -- --
Touch sensing Y Y -- -- -- -- -- --
Systic Timer Y Y Y Y -- -- --
GPIOs Y Y Y Y Y Y -- 3 pins
Wakeup time to
0 s 0.4 s 3 s 46 s < 8 s 58 s
Run mode
0.475 A 0.305 A
(no RTC) (no RTC)
VDD=1.8V VDD=1.8V
1.1 A 0.82 A
(with RTC) (with RTC)
Consumption Down to 230 Down to 43 VDD=1.8V VDD=1.8V
Down to Down to
VDD=1.8 to 3.6 V A/MHz (from A/MHz (from
11 A 4.4 A 0.475 A 0.305 A
(Typ) Flash) Flash)
(no RTC) (no RTC)
VDD=3.0V VDD=3.0V
1.35 A 1.15 A
(with RTC) (with RTC)
VDD=3.0V VDD=3.0V
1. The startup on communication line wakes the CPU which was made possible by an EXTI, this induces a delay before
entering run mode.
The memory protection unit (MPU) improves system reliability by defining the memory
attributes (such as read/write access permissions) for different memory regions. It provides
up to eight different regions and an optional predefined background region.
Owing to its embedded ARM core, the STM32L151xD and STM32L152xD devices are
compatible with all ARM tools and software.
power ramp-up should guarantee that 1.65 V is reached on VDD at least 1 ms after it exits
the POR area.
Five BOR thresholds are available through option bytes, starting from 1.8 V to 3 V. To
reduce the power consumption in Stop mode, it is possible to automatically switch off the
internal reference voltage (VREFINT) in Stop mode. The device remains in reset mode when
VDD is below a specified threshold, VPOR/PDR or VBOR, without the need for any external
reset circuit.
Note: The start-up time at power-on is typically 3.3 ms when BOR is active at power-up, the start-
up time at power-on can be decreased down to 1 ms typically for devices with BOR inactive
at power-up.
The device features an embedded programmable voltage detector (PVD) that monitors the
VDD/VDDA power supply and compares it to the VPVD threshold. This PVD offers 7 different
levels between 1.85 V and 3.05 V, chosen by software, with a step around 200 mV. An
interrupt can be generated when VDD/VDDA drops below the VPVD threshold and/or when
VDD/VDDA is higher than the VPVD threshold. The interrupt service routine can then generate
a warning message and/or put the MCU into a safe state. The PVD is enabled by software.
3TANDBY SUPPLIED VOLTAGE DOMAIN
ENABLE
7ATCHDOG 7ATCHDOG
,3) 2# ,3) TEMPO ,3
24# ENABLE
24#
,3% /3# ,3% TEMPO
2ADIO 3LEEP 4IMER
2ADIO 3LEEP 4IMER ENABLE
,3 ,3 ,3 ,3
6$$#/2%
#+?,#$
-(Z ,#$ ENABLE
6
#+?!$#
-3) 2# CK?LSI !$# ENABLE
CK?LSE
LEVEL SHIFTERS
6$$#/2% -#/
NOT DEEPSLEEP
6 #+?072
NOT DEEPSLEEP
(3) 2#
#+?&#,+
LEVEL SHIFTERS NOT SLEEP OR
DEEPSLEEP
6$$#/2%
#+?#05
3YSTEM NOT SLEEP OR
6 CLOCK DEEPSLEEP
(3% CK?MSI #+?4)-393
/3# CK?HSI
!("
LEVEL SHIFTERS CK?HSE PRESCALER
6$$#/2%
6 CK?PLL
0,, !0" !0"
CK?PLLIN 8
PRESCALER PRESCALER
,3
6
-(Z CLOCK
DETECTOR LEVEL SHIFTERS
#LOCK
6$$#/2% SOURCE
(3% PRESENT OR NOT
,3 CONTROL
USBEN AND NOT DEEPSLEEP
#+?53"
CK?USB 6CO 6CO MUST BE AT -(
Z
TIMEREN AND NOT DEEPSLEEP
#+?4)-4'/
IF !0" PRESC X
ELSE X
APB PERIPHEN AND NOT DEEPSLEEP
#+?!0"
APB PERIPHEN AND NOT DEEPSLEEP
#+?!0"
-36
1. For the USB function to be available, both HSE and PLL must be enabled, with the CPU running at either
24 MHz or 32 MHz.
3.7 Memories
The STM32L151xD and STM32L152xD devices have the following features:
48 Kbytes of embedded RAM accessed (read/write) at CPU clock speed with 0 wait
states. With the enhanced bus matrix, operating the RAM does not lead to any
performance penalty during accesses to the system bus (AHB and APB buses).
The non-volatile memory is divided into three arrays:
384 Kbytes of embedded Flash program memory
12 Kbytes of data EEPROM
Options bytes
Flash program and data EEPROM are divided into two banks, this enables writing in
one bank while running code or reading data in the other bank.
The options bytes are used to write-protect or read-out protect the memory (with 4
Kbytes granularity) and/or readout-protect the whole memory with the following
options:
Level 0: no readout protection
Level 1: memory readout protection, the Flash memory cannot be read from or
written to if either debug features are connected or boot in RAM is selected
Level 2: chip readout protection, debug features (ARM Cortex-M3 JTAG and serial
wire) and boot in RAM selection disabled (JTAG fuse)
The whole non-volatile memory embeds the error correction code (ECC) feature.
The DMA can be used with the main peripherals: SPI, I2C, USART, SDIO, general-purpose
timers, DAC and ADC.
from chip to chip due to process variation, the uncalibrated internal temperature sensor is
suitable for applications that detect temperature changes only.
To improve the accuracy of the temperature sensor measurement, each device is
individually factory-calibrated by ST. The temperature sensor factory calibration data are
stored by ST in the system memory area, accessible in read-only mode. See Table 69:
Temperature sensor calibration values.
operate. This acquisition is managed directly by the GPIOs, timers and analog I/O groups
(see Section 3.15: System configuration controller and routing interface).
Reliable touch sensing functionality can be quickly and easily implemented using the free
STM32L1xx STMTouch touch sensing firmware library.
TIM2,
Up, down, Any integer between
TIM3, 16-bit Yes 4 No
up/down 1 and 65536
TIM4
Up, down, Any integer between
TIM5 32-bit Yes 4 No
up/down 1 and 65536
Up, down, Any integer between
TIM9 16-bit No 2 No
up/down 1 and 65536
TIM10, Any integer between
16-bit Up No 1 No
TIM11 1 and 65536
TIM6, Any integer between
16-bit Up Yes 0 No
TIM7 1 and 65536
3.17.1 General-purpose timers (TIM2, TIM3, TIM4, TIM5, TIM9, TIM10 and
TIM11)
There are seven synchronizable general-purpose timers embedded in the STM32L151xD
and STM32L152xD devices (see Table 6 for differences).
3.18.1 IC bus
Up to two IC bus interfaces can operate in multimaster and slave modes. They can support
standard and fast modes.
They support dual slave addressing (7-bit only) and both 7- and 10-bit addressing in master
mode. A hardware CRC generation/verification is embedded.
They can be served by DMA and they support SM Bus 2.0/PM Bus.
3.18.5 SDIO
An SD/SDIO/MMC host interface is available, that supports MultiMediaCard System
Specification Version 4.2 in three different databus modes: 1-bit (default), 4-bit and 8-bit.
The interface allows data transfer at up to 24 MHz in 8-bit mode, and is compliant with the
SD Memory Card Specification Version 2.0.
The SDIO Card Specification Version 2.0 is also supported with two different databus
modes: 1-bit (default) and 4-bit.
The current version supports only one SD/SDIO/MMC4.2 card at any one time and a stack
of MMC4.1 or previous.
In addition to SD/SDIO/MMC, this interface is fully compliant with the CE-ATA digital
protocol Rev1.1.
4 Pin descriptions
"//4
6$$?
6$$?
633?
633?
6$$?
633?
0'
0'
0'
0'
0'
0'
0#
0#
0#
0!
0!
0'
0$
0$
0$
0$
0$
0$
0$
0$
0%
0%
0"
0"
0"
0"
0"
0"
0"
0% 6$$?
0% 633?
0% 0(
0% 0!
0%
7+50 0!
6,#$ 0!
0#
7+50 0!
0#
/3#?). 0!
0#
/3#?/54 0!
0& 0#
0& 0#
0& 0#
0& 0#
0& 6$$?
0& 633?
633? ,1&0 0'
6$$? 0'
0& 0'
0& 0'
0& 0'
0& 0'
0& 0'
/3#?). 0$
/3#?/54 0$
.234 6$$?
0# 633?
0# 0$
0# 0$
0# 0$
633! 0$
62%&
0$
62%& 0$
6$$! 0"
0!
7+50 0"
0! 0"
0! 0"
0!
0!
0!
0!
0!
0#
0#
0"
0"
0"
0&
0&
0&
0&
0&
0'
0'
0%
0%
0%
0%
0%
0%
0%
0%
0%
0"
0"
633?
633?
633?
6$$?
6$$?
6$$?
6$$?
633?
-36
0% 0% 0" "//4 0$ 0$ 0" 0" 0! 0! 0! 0!
!
" 0% 0% 0" 0" 0" 0$ 0$ 0$ 0$ 0# 0# 0!
# 0#
0% 0% 6$$? 0" 0' 0' 0$ 0$ 0# 0( 0!
7+50
$ 0#
0%
/3# 7+50 633? 0& 0& 0& 0' 0' 0' 0! 0! 0#
?).
% 0#
6,#$ 633? 0& 0# 0#
/3# 0' 0#
?/54
0(
' 6$$? 0& 0& 6$$? 6$$? 0' 0' 6$$? 6$$?
/3#?
/54
* 633! 0# 0# 0! 0! 0& 0& 0& 0& 0$ 0$ 0$
/0!-0
+ ?6).-
0# 0! 0! 0# 0& 0& 0$ 0$ 0" 0" 0"
, 62%& 0!
0! 0! 0# 0" 0% 0% 0% 0" 0" 0"
7+50
/0!-0 /0!-0
- 6$$! 0!
?6).- ?6).-
0" 0" 0% 0% 0% 0% 0% 0%
-36
"//4
6$$?
633?
0#
0#
0#
0!
0!
0$
0$
0$
0$
0$
0$
0$
0$
0%
0%
0"
0"
0"
0"
0"
0"
0"
0% 6$$?
0% 633?
0% 0(
0% 0!
0%
7+50 0!
6,#$ 0!
0#
7+50 0!
0#
/3#?). 0!
0#
/3#?/54 0!
633? 0#
6$$? 0#
0(
/3#?). 0#
0(
/3#?/54 ,1&0 0#
.234 0$
0# 0$
0# 0$
0# 0$
0# 0$
633! 0$
62%&
0$
62%& 0$
6$$! 0"
0!
7+50 0"
0! 0"
0! 0"
0!
0!
0!
0!
0!
6$$?
0#
0#
6$$?
633?
0%
0%
0%
0%
0%
0%
0"
0"
633?
0"
0"
0"
0%
0%
0%
AIC
"//4
6$$?
633?
0#
0#
0#
0!
0!
0$
0"
0"
0"
0"
0"
0"
0"
6,#$ 6$$?
0#
7+50 633?
0#
/3#?). 0!
0#
/3#?/54 0!
0(
/3#?). 0!
0(
/3#?/54 0!
.234 0!
0# 0!
0# ,1&0 0#
0# 0#
0# 0#
633! 0#
6$$! 0"
0!
7+50 0"
0! 0"
0! 0"
6$$?
6$$?
0!
633?
0!
0!
0!
0!
0"
0"
0"
0"
0"
633?
0#
0#
AIC
0#
" 633? 0! 0# 0" 0" 0" 0#
/3#?).
/3#?/54
%
0# 0# 0# 0! 0! 0! 633! 0#
'
0" 0" 0" 0! 0! 6$$? 0! 6$$!
-36
Unless otherwise specified in brackets below the pin name, the pin function
Pin name
during and after reset is the same as the actual pin name
S Supply pin
Pin type I Input only pin
I/O Input / output pin
FT 5 V tolerant I/O
TC Standard 3.3 V I/O
I/O structure
B Dedicated BOOT0 pin
RST Bidirectional reset pin with embedded weak pull-up resistor
Unless otherwise specified by a note, all I/Os are set as floating inputs during
Notes
and after reset
Alternate
Functions selected through GPIOx_AFR registers
functions
Pin
functions Additional
Functions directly selected/enabled through peripheral registers
functions
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
TIM3_ETR/LCD_SEG38/
1 B2 1 - - PE2 I/O FT PE2 -
TRACECLK/FSMC_A23
TIM3_CH1/LCD_SEG39/
2 A1 2 - - PE3 I/O FT PE3 -
TRACED0/FSMC_A19
TIM3_CH2/TRACED1
3 B1 3 - - PE4 I/O FT PE4 -
/FSMC_A20
TIM9_CH1/TRACED2
4 C2 4 - - PE5 I/O FT PE5 -
/FSMC_A21
PE6- WKUP3/
5 D2 5 - - I/O FT PE6 TIM9_CH2/TRACED3
WKUP3 RTC_TAMP3
6 E2 6 1 C6 VLCD(3) S - VLCD - -
WKUP2/
PC13- RTC_TAMP1/
7 C1 7 2 C8 I/O FT PC13 -
WKUP2 RTC_TS/
RTC_OUT
PC14-
8 D1 8 3 B8 I/O TC PC14 - OSC32_IN
OSC32_IN(4)
PC15-
9 E1 9 4 B7 I/O TC PC15 - OSC32_OUT
OSC32_OUT
10 D6 - - - PF0 I/O FT PF0 FSMC_A0 -
11 D5 - - - PF1 I/O FT PF1 FSMC_A1 -
12 D4 - - - PF2 I/O FT PF2 FSMC_A2 -
13 E4 - - - PF3 I/O FT PF3 FSMC_A3 -
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
31 - 20 - - VREF- S - VREF- - -
32 L1 21 - - VREF+ S - VREF+ - -
33 M1 22 13 G8 VDDA S - VDDA - -
WKUP1/
TIM2_CH1_ETR/ RTC_TAMP2/
34 L2 23 14 F6 PA0-WKUP1 I/O FT PA0
TIM5_CH1/ USART2_CTS ADC_IN0/
COMP1_INP
TIM2_CH2/TIM5_CH2/ ADC_IN1/
35 M2 24 15 E6 PA1 I/O FT PA1 USART2_RTS/ COMP1_INP/
LCD_SEG0 OPAMP1_VINP
TIM2_CH3/TIM5_CH3/ ADC_IN2/
36 - 25 16 H8 PA2 I/O FT PA2 TIM9_CH1/ COMP1_INP/
USART2_TX/LCD_SEG1 OPAMP1_VINM
TIM2_CH3/TIM5_CH3/
ADC_IN2/
- K3 - - - PA2 I/O FT PA2 TIM9_CH1/
COMP1_INP
USART2_TX/LCD_SEG1
OPAMP1_VI OPAMP1_
- M3 - - - I TC - -
NM VINM
TIM2_CH4/TIM5_CH4/ ADC_IN3/
37 L3 26 17 G7 PA3 I/O TC PA3 TIM9_CH2/ COMP1_INP/
USART2_RX/LCD_SEG2 OPAMP1_VOUT
38 - 27 18 F5 VSS_4 S - VSS_4 - -
39 - 28 19 G6 VDD_4 S - VDD_4 - -
ADC_IN4/
SPI1_NSS/SPI3_NSS/
40 J4 29 20 H7 PA4 I/O TC PA4 DAC_OUT1/
I2S3_WS/USART2_CK
COMP1_INP
ADC_IN5/
TIM2_CH1_ETR/
41 K4 30 21 E5 PA5 I/O TC PA5 DAC_OUT2/
SPI1_SCK
COMP1_INP
TIM3_CH1/TIM10_CH1/ ADC_IN6/
42 L4 31 22 G5 PA6 I/O FT PA6 SPI1_MISO/ COMP1_INP/
LCD_SEG3 OPAMP2_VINP
TIM3_CH2/TIM11_CH1/ ADC_IN7/
43 - 32 23 G4 PA7 I/O FT PA7 SPI1_MOSI/ COMP1_INP/
LCD_SEG4 OPAMP2_VINM
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
TIM3_CH2/TIM11_CH1/
ADC_IN7/
- J5 - - - PA7 I/O FT PA7 SPI1_MOSI/
COMP1_INP
LCD_SEG4
OPAMP2_VI OPAMP2_V
- M4 - - - I TC - -
NM INM
ADC_IN14/
44 K5 33 24 H6 PC4 I/O FT PC4 LCD_SEG22
COMP1_INP
ADC_IN15/
45 L5 34 25 H5 PC5 I/O FT PC5 LCD_SEG23
COMP1_INP
ADC_IN8/
COMP1_INP/
46 M5 35 26 H4 PB0 I/O TC PB0 TIM3_CH3/LCD_SEG5
OPAMP2_VOUT/
VREF_OUT
ADC_IN9/
47 M6 36 27 F4 PB1 I/O FT PB1 TIM3_CH4/LCD_SEG6 COMP1_INP/
VREF_OUT
PB2/
48 L6 37 28 H3 PB2 I/O FT BOOT1 ADC_IN0b
BOOT1
49 K6 - - - PF11 I/O FT PF11 - ADC_IN1b
50 J7 - - - PF12 I/O FT PF12 FSMC_A6 ADC_IN2b
51 E3 - - - VSS_6 S - VSS_6 - -
52 H3 - - - VDD_6 S - VDD_6 - -
53 K7 - - - PF13 I/O FT PF13 FSMC_A7 ADC_IN3b
54 J8 - - - PF14 I/O FT PF14 FSMC_A8 ADC_IN6b
55 J9 - - - PF15 I/O FT PF15 FSMC_A9 ADC_IN7b
56 H9 - - - PG0 I/O FT PG0 FSMC_A10 ADC_IN8b
57 G9 - - - PG1 I/O FT PG1 FSMC_A11 ADC_IN9b
ADC_IN22/
58 M7 38 - - PE7 I/O TC PE7 FSMC_D4
COMP1_INP
ADC_IN23/
59 L7 39 - - PE8 I/O TC PE8 FSMC_D5
COMP1_INP
ADC_IN24/
60 M8 40 - - PE9 I/O TC PE9 TIM2_CH1_ETR /FSMC_D6
COMP1_INP
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
61 - - - - VSS_7 S - VSS_7 - -
62 - - - - VDD_7 S - VDD_7 - -
ADC_IN25/
63 L8 41 - - PE10 I/O TC PE10 TIM2_CH2/FSMC_D7
COMP1_INP
64 M9 42 - - PE11 I/O FT PE11 TIM2_CH3/FSMC_D8 -
TIM2_CH4/SPI1_NSS
65 L9 43 - - PE12 I/O FT PE12 -
/FSMC_D9
66 M10 44 - - PE13 I/O FT PE13 SPI1_SCK/FSMC_D10 -
67 M11 45 - - PE14 I/O FT PE14 SPI1_MISO/FSMC_D11 -
68 M12 46 - - PE15 I/O FT PE15 SPI1_MOSI/FSMC_D12 -
TIM2_CH3/I2C2_SCL/
69 L10 47 29 G3 PB10 I/O FT PB10 USART3_TX/ -
LCD_SEG10
TIM2_CH4/ I2C2_SDA/
70 L11 48 30 F3 PB11 I/O FT PB11 -
USART3_RX/ LCD_SEG11
71 F12 49 31 H2 VSS_1 S - VSS_1 - -
72 G12 50 32 H1 VDD_1 S - VDD_1 - -
TIM10_CH1/I2C2_SMBA/
ADC_IN18/
73 L12 51 33 G2 PB12 I/O FT PB12 SPI2_NSS/ I2S2_WS/
COMP1_INP
USART3_CK/ LCD_SEG12
TIM9_CH1/SPI2_SCK/
I2S2_CK/ ADC_IN19/
74 K12 52 34 G1 PB13 I/O FT PB13
USART3_CTS/ COMP1_INP
LCD_SEG13
TIM9_CH2/SPI2_MISO/ ADC_IN20/
75 K11 53 35 F2 PB14 I/O FT PB14 USART3_RTS/ COMP1_INP
LCD_SEG14
TIM11_CH1/SPI2_MOSI/ ADC_IN21/
76 K10 54 36 F1 PB15 I/O FT PB15 I2S2_SD/ COMP1_INP/
LCD_SEG15 RTC_REFIN
USART3_TX/LCD_SEG28/
77 K9 55 - - PD8 I/O FT PD8 -
FSMC_D13
USART3_RX/LCD_SEG29/
78 K8 56 - - PD9 I/O FT PD9 -
FSMC_D14
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
USART3_CK/LCD_SEG30/
79 J12 57 - - PD10 I/O FT PD10 -
FSMC_D15
USART3_CTS/LCD_SEG31
80 J11 58 - - PD11 I/O FT PD11 -
/FSMC_A16
TIM4_CH1/USART3_RTS/
81 J10 59 - - PD12 I/O FT PD12 LCD_SEG32/ -
FSMC_A17
TIM4_CH2/LCD_SEG33/
82 H12 60 - - PD13 I/O FT PD13 -
FSMC_A18
83 - - - - VSS_8 S - VSS_8 - -
84 - - - - VDD_8 S - VDD_8 - -
TIM4_CH3/LCD_SEG34/
85 H11 61 - - PD14 I/O FT PD14 -
FSMC_D0
TIM4_CH4/LCD_SEG35
86 H10 62 - - PD15 I/O FT PD15 -
/FSMC_D1
87 G10 - - - PG2 I/O FT PG2 FSMC_A12 ADC_IN10b
88 F9 - - - PG3 I/O FT PG3 FSMC_A13 ADC_IN11b
89 F10 - - - PG4 I/O FT PG4 FSMC_A14 ADC_IN12b
90 E9 - - - PG5 I/O FT PG5 FSMC_A15 -
91 - - - - PG6 I/O FT PG6 - -
92 - - - - PG7 I/O FT PG7 - -
93 - - - - PG8 I/O FT PG8 - -
94 F6 - - - VSS_9 S VSS_9 - -
95 G6 - - - VDD_9 S VDD_9 - -
TIM3_CH1/I2S2_MCK/
96 E12 63 37 E1 PC6 I/O FT PC6 -
LCD_SEG24/SDIO_D6
TIM3_CH2/I2S3_MCK/
97 E11 64 38 E2 PC7 I/O FT PC7 -
LCD_SEG25/SDIO_D7
TIM3_CH3/LCD_SEG26/
98 E10 65 39 E3 PC8 I/O FT PC8 -
SDIO_D0
TIM3_CH4/LCD_SEG27/
99 D12 66 40 D1 PC9 I/O FT PC9 -
SDIO_D1
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
USART1_CK/MCO/
100 D11 67 41 E4 PA8 I/O FT PA8 -
LCD_COM0
101 D10 68 42 D2 PA9 I/O FT PA9 USART1_TX / LCD_COM1 -
102 C12 69 43 D3 PA10 I/O FT PA10 USART1_RX / LCD_COM2 -
103 B12 70 44 C1 PA11 I/O FT PA11 USART1_CTS/ SPI1_MISO USB_DM
104 A12 71 45 C2 PA12 I/O FT PA12 USART1_RTS/ SPI1_MOSI USB_DP
JTMS-
105 A11 72 46 D4 PA13 I/O FT JTMS-SWDIO -
SWDIO
106 C11 73 - - PH2 I/O FT PH2 FSMC_A22 -
107 F11 74 47 B1 VSS_2 S - VSS_2 - -
108 G11 75 48 A1 VDD_2 S - VDD_2 - -
JTCK-
109 A10 76 49 B2 PA14 I/O FT JTCK-SWCLK -
SWCLK
TIM2_CH1_ETR/
SPI1_NSS/SPI3_NSS/
110 A9 77 50 C3 PA15 I/O FT JTDI -
I2S3_WS/LCD_SEG17/
JTDI
SPI3_SCK/I2S3_CK/
USART3_TX/UART4_TX/
111 B11 78 51 A2 PC10 I/O FT PC10 LCD_SEG28/LCD_SEG40/ -
LCD_COM4/
SDIO_D2
SPI3_MISO/USART3_RX/
UART4_RX/
112 C10 79 52 B3 PC11 I/O FT PC11 LCD_SEG29/LCD_SEG41/ -
LCD_COM5/
SDIO_D3
SPI3_MOSI/I2S3_SD/
USART3_CK/
113 B10 80 53 C4 PC12 I/O FT PC12 UART5_TX/LCD_SEG30/ -
LCD_SEG42/
LCD_COM6/SDIO_CK
TIM9_CH1/SPI2_NSS/
114 C9 81 - - PD0 I/O FT PD0 -
I2S2_WS/ FSMC_D2
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
SPI2_SCK/I2S2_CK
115 B9 82 - - PD1 I/O FT PD1 -
/FSMC_D3
TIM3_ETR/
UART5_RX/LCD_SEG31/
116 C8 83 54 A3 PD2 I/O FT PD2 -
LCD_SEG43/LCD_COM7/
SDIO_CMD
SPI2_MISO/USART2_CTS/
117 B8 84 - - PD3 I/O FT PD3 -
FSMC_CLK
SPI2_MOSI/I2S2_SD/
118 B7 85 - - PD4 I/O FT PD4 USART2_RTS/ -
FSMC_NOE
119 A6 86 - - PD5 I/O FT PD5 USART2_TX/FSMC_NWE -
120 F7 - - - VSS_10 S - VSS_10 - -
121 G7 - - - VDD_10 S - VDD_10 - -
USART2_RX
122 B6 87 - - PD6 I/O FT PD6 -
/FSMC_NWAIT
TIM9_CH2/USART2_CK
123 A5 88 - - PD7 I/O FT PD7 -
/FSMC_NE1
124 D9 - - - PG9 I/O FT PG9 FSMC_NE2 -
125 D8 - - - PG10 I/O FT PG10 FSMC_NE3 -
126 - - - - PG11 I/O FT PG11 - -
127 D7 - - - PG12 I/O FT PG12 FSMC_NE4 -
128 C7 - - - PG13 I/O FT PG13 FSMC_A24 -
129 C6 - - - PG14 I/O FT PG14 FSMC_A25 -
130 - - - - VSS_11 S - VSS_11 - -
131 - - - - VDD_11 S - VDD_11 - -
132 - - - - PG15 I/O FT PG15 - -
TIM2_CH2/SPI1_SCK/
133 A8 89 55 A4 PB3 I/O FT JTDO SPI3_SCK/ I2S3_CK/ COMP2_INM
LCD_SEG7/JTDO
TIM3_CH1/SPI1_MISO/
134 A7 90 56 B4 PB4 I/O FT NJTRST SPI3_MISO/ COMP2_INP
LCD_SEG8/NJTRST
I / O structure
Pin Type(1)
Main
UFBGA132
WLCSP64
LQFP144
LQFP100
function(2)
LQFP64
Pin name
Additional
(after reset) Alternate functions
functions
TIM3_CH2/I2C1_SMBA/
SPI1_MOSI/
135 C5 91 57 A5 PB5 I/O FT PB5 COMP2_INP
SPI3_MOSI/
I2S3_SD/LCD_SEG9
TIM4_CH1/I2C1_SCL/
136 B5 92 58 B5 PB6 I/O FT PB6 COMP2_INP
USART1_TX/
TIM4_CH2/I2C1_SDA/ COMP2_INP/
137 B4 93 59 C5 PB7 I/O FT PB7
USART1_RX/FSMC_NADV PVD_IN
138 A4 94 60 A6 BOOT0 I B BOOT0 - -
TIM4_CH3/TIM10_CH1/
139 A3 95 61 D5 PB8 I/O FT PB8 I2C1_SCL/ -
LCD_SEG16/SDIO_D4
TIM4_CH4/
140 B3 96 62 B6 PB9 I/O FT PB9 TIM11_CH1/I2C1_SDA/ -
LCD_COM3/ SDIO_D5
TIM4_ETR/TIM10_CH1/
141 C3 97 - - PE0 I/O FT PE0 -
LCD_SEG36/FSMC_NBL0
TIM11_CH1/LCD_SEG37
142 A2 98 - - PE1 I/O FT PE1 -
/FSMC_NBL1
143 D3 99 63 A7 VSS_3 S - VSS_3 - -
144 C4 100 64 A8 VDD_3 S - VDD_3 - -
1. I = input, O = output, S = supply.
2. Function availability depends on the chosen device.
3. Applicable to STM32L152xD devices only. In STM32L151xD devices, this pin should be connected to VDD.
4. The PC14 and PC15 I/Os are only configured as OSC32_IN/OSC32_OUT when the LSE oscillator is ON (by setting the
LSEON bit in the RCC_CSR register). The LSE oscillator pins OSC32_IN/OSC32_OUT can be used as general-purpose
PH0/PH1 I/Os, respectively, when the LSE oscillator is off (after reset, the LSE oscillator is off). The LSE has priority over
the GPIO function. For more details, refer to Using the OSC32_IN/OSC32_OUT pins as GPIO PC14/PC15 port pins
section in the STM32L151xx, STM32L152xx and STM32L162xx reference manual (RM0038).
5. The PH0 and PH1 I/Os are only configured as OSC_IN/OSC_OUT when the HSE oscillator is ON (by setting the HSEON
bit in the RCC_CR register). The HSE oscillator pins OSC_IN/OSC_OUT can be used as general-purpose PH0/PH1 I/Os,
respectively, when the HSE oscillator is off ( after reset, the HSE oscillator is off ). The HSE has priority over the GPIO
function.
STM32L151xD STM32L152xD
Table 9. Alternate function input/output
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
BOOT0 BOOT0 - - - - - - - - - - -
OUT
NRST NRST - - - - - - - - - - - -
EVENT
PA0-WKUP1 - TIM2_CH1_ETR TIM5_CH1 - - - - USART2_CTS - - - TIMx_IC1
OUT
DocID022027 Rev 11
EVENT
PA1 - TIM2_CH2 TIM5_CH2 - - - - USART2_RTS - SEG0 - TIMx_IC2
OUT
EVENT
PA2 - TIM2_CH3 TIM5_CH3 TIM9_CH1 - - - USART2_TX - SEG1 - TIMx_IC3
OUT
EVENT
PA3 - TIM2_CH4 TIM5_CH4 TIM9_CH2 - - - USART2_RX - SEG2 - TIMx_IC4
OUT
SPI3_NSS EVENT
PA4 - - - - - SPI1_NSS USART2_CK - - - TIMx_IC1
I2S3_WS OUT
EVENT
PA5 - TIM2_CH1_ETR - - - SPI1_SCK - - - - - TIMx_IC2
OUT
EVENT
PA6 - - TIM3_CH1 TIM10_ CH1 - SPI1_MISO - - - SEG3 - TIMx_IC3
OUT
EVENT
PA7 - - TIM3_CH2 TIM11_ CH1 - SPI1_MOSI - - - SEG4 - TIMx_IC4
OUT
EVENT
PA8 MCO - - - - - - USART1_CK - COM0 - TIMx_IC1
OUT
EVENT
Pin descriptions
PA9 - - - - - - - USART1_TX - COM1 - TIMx_IC2
OUT
EVENT
PA10 - - - - - - - USART1_RX - COM2 - TIMx_IC3
OUT
EVENT
PA11 - - - - - SPI1_MISO USART1_CTS - - - TIMx_IC4
49/154
OUT
Table 9. Alternate function input/output (continued)
50/154
Pin descriptions
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PA12 - - - - - SPI1_MOSI - USART1_RTS - - - TIMx_IC1
OUT
EVENT
PA13 JTMS-SWDIO - - - - - - - - - - TIMx_IC2
OUT
EVEN
PA14 JTCK-SWCLK - - - - - - - - - - TIMx_IC3
TOUT
SPI3_NSS EVEN
PA15 JTDI TIM2_CH1_ETR - - - SPI1_NSS - - SEG17 - TIMx_IC4
I2S3_WS TOUT
DocID022027 Rev 11
EVEN
PB0 - - TIM3_CH3 - - - - - SEG5 - -
TOUT
EVENT
PB1 - - TIM3_CH4 - - - - - - SEG6 - -
OUT
EVENT
PB2 BOOT1 - - - - - - - - - - -
OUT
SPI3_SCK EVENT
PB3 JTDO TIM2_CH2 - - - SPI1_SCK - - SEG7 - -
I2S3_CK OUT
EVENT
PB4 NJTRST - TIM3_CH1 - - SPI1_MISO SPI3_MISO - - SEG8 - -
OUT
STM32L151xD STM32L152xD
EVENT
PB6 - - TIM4_CH1 - I2C1_SCL - - USART1_TX - - - -
OUT
EVENT
PB7 - - TIM4_CH2 - I2C1_SDA - - USART1_RX - - NADV -
OUT
EVENT
PB8 - - TIM4_CH3 TIM10_CH1 I2C1_SCL - - - - SEG16 SDIO_D4 -
OUT
EVENT
PB9 - - TIM4_CH4 TIM11_CH1 I2C1_SDA - - - - COM3 SDIO_D5 -
OUT
EVENT
PB10 - TIM2_CH3 - - I2C2_SCL - - USART3_TX - SEG10 - -
OUT
Table 9. Alternate function input/output (continued)
STM32L151xD STM32L152xD
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PB11 - TIM2_CH4 - - I2C2_SDA - - USART3_RX - SEG11 - -
OUT
SPI2_NSS EVENT
PB12 - - - TIM10_CH1 I2C2_SMBA - USART3_CK - SEG12 - -
I2S2_WS OUT
SPI2_SCK EVENT
PB13 - - - TIM9_CH1 - - USART3_CTS - SEG13 - -
I2S2_CK OUT
EVENT
PB14 - - - TIM9_CH2 - SPI2_MISO - USART3_RTS - SEG14 - -
OUT
DocID022027 Rev 11
SPI2_MOSI EVENT
PB15 - - - TIM11_CH1 - - - - SEG15 - -
I2S2_SD OUT
EVENT
PC0 - - - - - - - - SEG18 - TIMx_IC1
OUT
EVENT
PC1 - - - - - - - - - SEG19 - TIMx_IC2
OUT
EVENT
PC2 - - - - - - - - - SEG20 - TIMx_IC3
OUT
EVENT
PC3 - - - - - - - - - SEG21 - TIMx_IC4
OUT
EVENT
PC4 - - - - - - - - - SEG22 - TIMx_IC1
OUT
EVENT
PC5 - - - - - - - - - SEG23 - TIMx_IC2
OUT
EVENT
PC6 - - TIM3_CH1 - - I2S2_MCK - - - SEG24 SDIO_D6 TIMx_IC3
OUT
EVENT
PC7 - - TIM3_CH2 - - - I2S3_MCK - - SEG25 TIMx_IC4
Pin descriptions
SDIO_D7
OUT
EVENT
PC8 - - TIM3_CH3 - - - - - - SEG26 SDIO_D0 TIMx_IC1
OUT
EVENT
PC9 - - TIM3_CH4 - - - - - - SEG27 SDIO_D1 TIMx_IC2
OUT
51/154
Table 9. Alternate function input/output (continued)
52/154
Pin descriptions
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
COM4/
SPI3_SCK EVENT
PC10 - - - - - - USART3_TX UART4_TX SEG28/ SDIO_D2 TIMx_IC3
I2S3_CK OUT
SEG40
COM5/
EVENT
PC11 - - - - - - SPI3_MISO USART3_RX UART4_RX SEG29 SDIO_D3 TIMx_IC4
OUT
/SEG41
COM6/
SPI3_MOSI EVENT
PC12 - - - - - - USART3_CK UART5_TX SEG30/ SDIO_CK TIMx_IC1
I2S3_SD OUT
SEG42
DocID022027 Rev 11
EVENT
PC13-WKUP2 - - - - - - - - - - - TIMx_IC2
OUT
EVENT
PC14 OSC32_IN - - - - - - - - - - - TIMx_IC3
OUT
EVENT
PC15 OSC32_OUT - - - - - - - - - - - TIMx_IC4
OUT
SPI2_NSS EVENT
PD0 - - - TIM9_CH1 - - - - - D2 /DA2 TIMx_IC1
I2S2_WS OUT
COM7/
SDIO_ EVENT
PD2 - - TIM3_ETR - - - - - UART5_RX SEG31/ TIMx_IC3
STM32L151xD STM32L152xD
CMD OUT
SEG43
EVENT
PD3 - - - - - SPI2_MISO - USART2_CTS - - CLK TIMx_IC4
OUT
SPI2_MOSI EVENT
PD4 - - - - - - USART2_RTS - - NOE TIMx_IC1
I2S2_SD OUT
EVENT
PD5 - - - - - - - USART2_TX - - NWE TIMx_IC2
OUT
EVENT
PD6 - - - - - - - USART2_RX - - NWAIT TIMx_IC3
OUT
EVENT
PD7 - - - TIM9_CH2 - - - USART2_CK - - NE1 TIMx_IC4
OUT
Table 9. Alternate function input/output (continued)
STM32L151xD STM32L152xD
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PD8 - - - - - - - USART3_TX - SEG28 D13/DA13 TIMx_IC1
OUT
EVENT
PD9 - - - - - - - USART3_RX - SEG29 D14/DA14 TIMx_IC2
OUT
EVENT
PD10 - - - - - - - USART3_CK - SEG30 D15/DA15 TIMx_IC3
OUT
EVENT
PD11 - - - - - - - USART3_CTS - SEG31 A16 TIMx_IC4
OUT
DocID022027 Rev 11
EVENT
PD12 - - TIM4_CH1 - - - - USART3_RTS - SEG32 A17 TIMx_IC1
OUT
EVENT
PD13 - - TIM4_CH2 - - - - - - SEG33 A18 TIMx_IC2
OUT
EVENT
PD14 - - TIM4_CH3 - - - - - - SEG34 D0/DA0 TIMx_IC3
OUT
EVENT
PD15 - - TIM4_CH4 - - - - - - SEG35 D1/DA1 TIMx_IC4
OUT
EVENT
PE0 - - TIM4_ETR TIM10_CH1 - - - - - SEG36 NBL0 TIMx_IC1
OUT
EVENT
PE1 - - - TIM11_CH1 - - - - - SEG37 NBL1 TIMx_IC2
OUT
EVENT
PE2 TRACECK - TIM3_ETR - - - - - - SEG 38 A23 TIMx_IC3
OUT
EVENT
PE3 TRACED0 - TIM3_CH1 - - - - - - SEG 39 A19 TIMx_IC4
OUT
EVENT
PE4 TRACED1 - TIM3_CH2 - - - - - - - TIMx_IC1
Pin descriptions
A20
OUT
EVENT
PE5 TRACED2 - - TIM9_CH1 - - - - - - A21 TIMx_IC2
OUT
EVENT
PE6-WKUP3 TRACED3 - - TIM9_CH2 - - - - - - - TIMx_IC3
OUT
53/154
Table 9. Alternate function input/output (continued)
54/154
Pin descriptions
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PE7 - - - - - - - - - - D4/DA4 TIMx_IC4
OUT
EVENT
PE8 - - - - - - - - - - D5/DA5 TIMx_IC1
OUT
EVENT
PE9 - TIM2_CH1_ETR - - - - - - - - D6/DA6 TIMx_IC2
OUT
EVENT
PE10 - TIM2_CH2 - - - - - - - - D7/DA7 TIMx_IC3
OUT
DocID022027 Rev 11
EVENT
PE11 - TIM2_CH3 - - - - - - - - D8/DA8 TIMx_IC4
OUT
EVENT
PE12 - TIM2_CH4 - - - SPI1_NSS - - - - D9/DA9 TIMx_IC1
OUT
EVENT
PE13 - - - - - SPI1_SCK - - - - D10/DA10 TIMx_IC2
OUT
EVENT
PE14 - - - - - SPI1_MISO - - - - D11/DA11 TIMx_IC3
OUT
EVENT
PE15 - - - - - SPI1_MOSI - - - - D12/DA12 TIMx_IC4
OUT
EVENT
PF0 - - - - - - - - - - A0 -
OUT
STM32L151xD STM32L152xD
EVENT
PF1 - - - - - - - - - - A1 -
OUT
EVENT
PF2 - - - - - - - - - - A2 -
OUT
EVENT
PF3 - - - - - - - - - - A3 -
OUT
EVENT
PF4 - - - - - - - - - - A4 -
OUT
EVENT
PF5 - - - - - - - - - - A5 -
OUT
Table 9. Alternate function input/output (continued)
STM32L151xD STM32L152xD
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PF6 - - TIM5_ETR - - - - - - - - -
OUT
EVENT
PF7 - - TIM5_CH2 - - - - - - - - -
OUT
EVENT
PF8 - - TIM5_CH3 - - - - - - - - -
OUT
EVENT
PF9 - - TIM5_CH4 - - - - - - - - -
OUT
DocID022027 Rev 11
EVENT
PF10 - - - - - - - - - - - -
OUT
EVENT
PF11 - - - - - - - - - - - -
OUT
EVENT
PF12 - - - - - - - - - - A6 -
OUT
EVENT
PF13 - - - - - - - - - - A7 -
OUT
EVENT
PF14 - - - - - - - - - - A8 -
OUT
EVENT
PF15 - - - - - - - - - - A9 -
OUT
EVENT
PG0 - - - - - - - - - - A10 -
OUT
EVENT
PG1 - - - - - - - - - - A11 -
OUT
EVENT
PG2 - - - - - - - - - - -
Pin descriptions
A12
OUT
EVENT
PG3 - - - - - - - - - - A13 -
OUT
EVENT
PG4 - - - - - - - - - - A14 -
OUT
55/154
Table 9. Alternate function input/output (continued)
56/154
Pin descriptions
Digital alternate function number
AFIO0 AFIO1 AFIO2 AFIO3 AFIO4 AFIO5 AFIO6 AFIO7 AFIO8 .. AFIO11 AFIO12 .. AFIO14 AFIO15
Port name
Alternate function
TIM9/ FSMC/
SYSTEM TIM2 TIM3/4/5 I2C1/2 SPI1/2 SPI3 USART1/2/3 UART4/5 LCD CPRI SYSTEM
10/11 SDIO
EVENT
PG5 - - - - - - - - - - A15 -
OUT
EVENT
PG6 - - - - - - - - - - - -
OUT
EVENT
PG7 - - - - - - - - - - - -
OUT
EVENT
PG8 - - - - - - - - - - - -
OUT
DocID022027 Rev 11
EVENT
PG9 - - - - - - - - - - NE2 -
OUT
EVENT
PG10 - - - - - - - - - - NE3 -
OUT
EVENT
PG11 - - - - - - - - - - - -
OUT
EVENT
PG12 - - - - - - - - - - NE4 -
OUT
EVENT
PG13 - - - - - - - - - - A24 -
OUT
EVENT
PG14 - - - - - - - - - - A25 -
OUT
STM32L151xD STM32L152xD
EVENT
PG15 - - - - - - - - - - - -
OUT
PH0OSC_IN - - - - - - - - - - - - -
PH1OSC_OUT - - - - - - - - - - - - -
PH2 - - - - - - - - - - A22 - -
STM32L151xD STM32L152xD Memory mapping
5 Memory mapping