Nucleo-L152RE

Below are the pins usable for the peripherals. Pins in bold are the default.

SPI

Instance MOSI MISO SCK
SPI1 11 (PA7), 23 (PA12), 4 (PB5) 12 (PA6), 22 (PA11), 5 (PB4) 13 (PA5), 3 (PB3)
SPI2 33 (PB15) 32 (PB14) 31 (PB13)
SPI3 4 (PB5), 43 (PC12) 5 (PB4), 42 (PC11) 3 (PB3), 41 (PC10)

I2C

Instance SDA SCL
I2C1 29 (PB7), 14 (PB9) 10 (PB6), 15 (PB8)
I2C2 PB11 6 (PB10)

USART

Instance RX TX
UART4 42 (PC11) 41 (PC10)
UART5 47 (PD2) 43 (PC12)
USART1 2 (PA10), 29 (PB7) 8 (PA9), 10 (PB6)
USART2 0 (PA3) 1 (PA2)
USART3 PB11, 42 (PC11) 6 (PB10), 41 (PC10)

I2S

Instance CK SD WS MCK
I2S2 31 (PB13) 33 (PB15) 30 (PB12) 38 (PC6)
I2S3 3 (PB3), 41 (PC10) 4 (PB5), 43 (PC12) 18 (PA4), 26 (PA15) 9 (PC7)

TIM

Instance CH1 CH2 CH3 CH4
TIM2 16 (PA0), 13 (PA5), 26 (PA15) 17 (PA1), 3 (PB3) 1 (PA2), 6 (PB10) 0 (PA3), PB11
TIM3 12 (PA6), 5 (PB4), 38 (PC6) 11 (PA7), 4 (PB5), 9 (PC7) 19 (PB0), 39 (PC8) 27 (PB1), 40 (PC9)
TIM4 10 (PB6) 29 (PB7) 15 (PB8) 14 (PB9)
TIM5 16 (PA0) 17 (PA1) 1 (PA2) 0 (PA3)
TIM9 1 (PA2), 31 (PB13) 0 (PA3), 32 (PB14)
TIM10 12 (PA6), 15 (PB8), 30 (PB12)
TIM11 11 (PA7), 14 (PB9), 33 (PB15)
TIMX

ADC

Instance Channel Pin
ADC IN0 16 (PA0)
ADC IN0b 28 (PB2)
ADC IN1 17 (PA1)
ADC IN2 1 (PA2)
ADC IN3 0 (PA3)
ADC IN4 18 (PA4)
ADC IN5 13 (PA5)
ADC IN6 12 (PA6)
ADC IN7 11 (PA7)
ADC IN8 19 (PB0)
ADC IN9 27 (PB1)
ADC IN10 21 (PC0)
ADC IN11 20 (PC1)
ADC IN12 34 (PC2)
ADC IN13 35 (PC3)
ADC IN14 36 (PC4)
ADC IN15 37 (PC5)
ADC IN18 30 (PB12)
ADC IN19 31 (PB13)
ADC IN20 32 (PB14)
ADC IN21 33 (PB15)

GPIO

Pin Peripheral signal available on the pin Board macro
0 (PA3) ADC_IN3, COMP1_INP, LCD_SEG2, OPAMP1_VOUT, TIM2_CH4, TIM5_CH4, TIM9_CH2, TIMX_IC4, TS_G1_IO4, USART2_RX
1 (PA2) ADC_IN2, COMP1_INP, LCD_SEG1, OPAMP1_VINM, TIM2_CH3, TIM5_CH3, TIM9_CH1, TIMX_IC3, TS_G1_IO3, USART2_TX
2 (PA10) LCD_COM2, TIMX_IC3, TS_G4_IO3, USART1_RX
3 (PB3) COMP2_INM, I2S3_CK, LCD_SEG7, SPI1_SCK, SPI3_SCK, SYS_JTDO-TRACESWO, TIM2_CH2
4 (PB5) COMP2_INP, I2C1_SMBA, I2S3_SD, LCD_SEG9, SPI1_MOSI, SPI3_MOSI, TIM3_CH2, TS_G6_IO2
5 (PB4) COMP2_INP, LCD_SEG8, SPI1_MISO, SPI3_MISO, SYS_JTRST, TIM3_CH1, TS_G6_IO1
6 (PB10) I2C2_SCL, LCD_SEG10, TIM2_CH3, USART3_TX
7 (PA8) LCD_COM0, RCC_MCO, TIMX_IC1, TS_G4_IO1, USART1_CK
8 (PA9) LCD_COM1, TIMX_IC2, TS_G4_IO2, USART1_TX
9 (PC7) I2S3_MCK, LCD_SEG25, TIM3_CH2, TIMX_IC4, TS_G10_IO2
10 (PB6) COMP2_INP, I2C1_SCL, TIM4_CH1, TS_G6_IO3, USART1_TX
11 (PA7) ADC_IN7, COMP1_INP, LCD_SEG4, OPAMP2_VINM, SPI1_MOSI, TIM3_CH2, TIM11_CH1, TIMX_IC4, TS_G2_IO2 MOSI
12 (PA6) ADC_IN6, COMP1_INP, LCD_SEG3, OPAMP2_VINP, SPI1_MISO, TIM3_CH1, TIM10_CH1, TIMX_IC3, TS_G2_IO1 MISO
13 (PA5) ADC_IN5, COMP1_INP, DAC_OUT2, SPI1_SCK, TIM2_CH1, TIMX_IC2 LED_BUILTIN, SCK
14 (PB9) I2C1_SDA, LCD_COM3, TIM4_CH4, TIM11_CH1 SDA
15 (PB8) I2C1_SCL, LCD_SEG16, TIM4_CH3, TIM10_CH1 SCL
16 (PA0) ADC_IN0, COMP1_INP, RTC_TAMP2, SYS_WKUP1, TIM2_CH1, TIM2_ETR, TIM5_CH1, TIMX_IC1, TS_G1_IO1, USART2_CTS A0
17 (PA1) ADC_IN1, COMP1_INP, LCD_SEG0, OPAMP1_VINP, TIM2_CH2, TIM5_CH2, TIMX_IC2, TS_G1_IO2, USART2_RTS A1
18 (PA4) ADC_IN4, COMP1_INP, DAC_OUT1, I2S3_WS, SPI1_NSS, SPI3_NSS, TIMX_IC1, USART2_CK A2, SS
19 (PB0) ADC_IN8, COMP1_INP, LCD_SEG5, OPAMP2_VOUT, SYS_V_REF_OUT, TIM3_CH3, TS_G3_IO1 A3
20 (PC1) ADC_IN11, COMP1_INP, LCD_SEG19, TIMX_IC2, TS_G8_IO2 A4
21 (PC0) ADC_IN10, COMP1_INP, LCD_SEG18, TIMX_IC1, TS_G8_IO1 A5
22 (PA11) SPI1_MISO, TIMX_IC4, USART1_CTS, USB_DM
23 (PA12) SPI1_MOSI, TIMX_IC1, USART1_RTS, USB_DP
24 (PA13) SYS_JTMS-SWDIO, TIMX_IC2, TS_G5_IO1
25 (PA14) SYS_JTCK-SWCLK, TIMX_IC3, TS_G5_IO2
26 (PA15) I2S3_WS, LCD_SEG17, SPI1_NSS, SPI3_NSS, SYS_JTDI, TIM2_CH1, TIMX_IC4, TS_G5_IO3
27 (PB1) ADC_IN9, COMP1_INP, LCD_SEG6, SYS_V_REF_OUT, TIM3_CH4, TS_G3_IO2
28 (PB2) ADC_IN0b, TS_G3_IO3
29 (PB7) COMP2_INP, I2C1_SDA, SYS_PVD_IN, TIM4_CH2, TS_G6_IO4, USART1_RX
30 (PB12) ADC_IN18, COMP1_INP, I2C2_SMBA, I2S2_WS, LCD_SEG12, SPI2_NSS, TIM10_CH1, TS_G7_IO1, USART3_CK
31 (PB13) ADC_IN19, COMP1_INP, I2S2_CK, LCD_SEG13, SPI2_SCK, TIM9_CH1, TS_G7_IO2, USART3_CTS
32 (PB14) ADC_IN20, COMP1_INP, LCD_SEG14, SPI2_MISO, TIM9_CH2, TS_G7_IO3, USART3_RTS
33 (PB15) ADC_IN21, COMP1_INP, I2S2_SD, LCD_SEG15, RTC_REFIN, SPI2_MOSI, TIM11_CH1, TS_G7_IO4
34 (PC2) ADC_IN12, COMP1_INP, LCD_SEG20, TIMX_IC3, TS_G8_IO3
35 (PC3) ADC_IN13, COMP1_INP, LCD_SEG21, TIMX_IC4, TS_G8_IO4
36 (PC4) ADC_IN14, COMP1_INP, LCD_SEG22, TIMX_IC1, TS_G9_IO1
37 (PC5) ADC_IN15, COMP1_INP, LCD_SEG23, TIMX_IC2, TS_G9_IO2
38 (PC6) I2S2_MCK, LCD_SEG24, TIM3_CH1, TIMX_IC3, TS_G10_IO1
39 (PC8) LCD_SEG26, TIM3_CH3, TIMX_IC1, TS_G10_IO3
40 (PC9) DAC_EXTI9, LCD_SEG27, TIM3_CH4, TIMX_IC2, TS_G10_IO4
41 (PC10) I2S3_CK, LCD_COM4, LCD_SEG28, LCD_SEG40, SPI3_SCK, TIMX_IC3, UART4_TX, USART3_TX
42 (PC11) LCD_COM5, LCD_SEG29, LCD_SEG41, SPI3_MISO, TIMX_IC4, UART4_RX, USART3_RX
43 (PC12) I2S3_SD, LCD_COM6, LCD_SEG30, LCD_SEG42, SPI3_MOSI, TIMX_IC1, UART5_TX, USART3_CK
44 (PC13) RTC_OUT_ALARM, RTC_OUT_CALIB, RTC_TAMP1, RTC_TS, SYS_WKUP2, TIMX_IC2
45 (PC14) RCC_OSC32_IN, TIMX_IC3
46 (PC15) ADC_EXTI15, RCC_OSC32_OUT, TIMX_IC4
47 (PD2) LCD_COM7, LCD_SEG31, LCD_SEG43, TIM3_ETR, TIMX_IC3, UART5_RX