Files

copied
Last update 3 years 1 month by Dipesh Manandhar
FilesDocumentation
..
Pins.md
Pins.md

Pins

This document describes the different functions of each pin on the STM32 MCU. The highlighted functions are the recommended function to use for the pin, though not all of the recommendations must be followed. Some recommendations, however (such as those required for SWD programming/debugging) must be followed. See the datasheet for more details.

The MbedOS pin names are defined in the ]]>github repo]]>.

Sorted by Pin Name

STM Pin Name MbedOS Pin Name(s) Custom Pin Name(s) Function(s) Usage
PA0 PA_0/A0 PTA0 USART2_CTS, ADC12_IN1 Aux Voltage
PA1 PA_1/A1 PTA1 USART2_RTS_DE, ADC12_IN2 DC-DC Voltage
PA2 PA_2 PTA2 USART2_TX, ADC1_IN3 Fan Current
PA3 PA_3 PTD2 USART2_RX, SPI1_CLK, ADC1_IN4 CAN Error LED
PA4 PA_4/A2 PTD1 SPI1_NSS, SPI3_NSS, USART2_CK, ADC2_IN17, DAC1_OUT1 BMS Error LED
PA5 PA_5/D13 LTD3 SPI1_SCK, ADC2_IN13, DAC1_OUT2 Horn
PA6 PA_6/D12 LTA2 SPI1_MISO, ADC2_IN3, DAC2_OUT1 BMS Strobe Current
PA7 PA_7/D11 LTD2 SPI1_MOSI, ADC2_IN4 BMS Strobe
PA8 PA_8/D7 I2C3_SCL, I2C2_SDA, USART1_CK, FDCAN3_RX, ADC5_IN1 BMS_CAN2_RX
PA9 PA_9/D8 LTD5 I2C3_SMBA, I2C2_SCL, USART1_TX, ADC5_IN2 Left Turn Signals
PA10 PA_10/D2 I2C2_SMBA, SPI2_MISO, USART1_RX BMS_CAN1_STBY
PA11 PA_11 SPI2_MOSI, USART1_CTS, FDCAN1_RX BMS_CAN1_RX
PA12 PA_12 USART1_RTS_DE, FDCAN1_TX BMS_CAN1_TX
PA13 PA_13 SWDIO SWDIO
PA14 PA_14 SWCLK SWCLK
PA15 PA_15 JTDI, I2C1_SCL, SPI1_NSS, SPI3_NSS, USART2_RX, UART4_RTS_DE, FDCAN3_TX JTDI (not used)
PB0 PB_0/A3 LTA4 ADC3_IN12,ADC1_IN15 Brake Lights Current
PB1 PB_1 LTD0 ADC3_IN1, ADC1_IN12 Brake Lights
PB2 PB_2 LTA1 I2C3_SMBA, ADC2_IN12 Right Turn Signals Current
PB3 PB_3/D3 SWO, SPI1_SCK, SPI3_SCK, USART2_TX, FDCAN3_RX SWO
PB4 PB_4/D5 SPI1_MISO, SPI3_MISO, USART2_RX, UART5_RTS_DE, FDCAN3_TX BMS_CAN2_TX
PB5 PB_5/D4 I2C1_SMBA, SPI1_MOSI, SPI3_MOSI, USART2_CK, I2C3_SDA, FDCAN2_RX, UART5_CTS BMS_CAN2_STBY
PB6 PB_6/D10 USART1_TX, FDCAN2_TX USB_TX
PB7 PB_7 I2C4_SDA, I2C1_SDA, USART1_RX, USART4_CTS USB_RX
PB8 PB_8/D15 I2C1_SCL, USART3_TX, FDCAN1_RX, BOOT0 BOOT0
PB9 PB_9/D14 I2C1_SDA, USART3_TX, FDCAN1_TX, I2C2_SDA, UART5_TX MAIN_CAN_STBY
PB10 PB_10/D6 LTD1 USART3_TX, SPI1_SCK Right Turn Signals
PB11 PB_11 LTA0 USART3_RX, ADC12_IN14 DRLs (Daytime Running Lights) Current
PB12 PB_12 I2C2_SMBA, SPI2_NSS, USART3_CK, FDCAN2_RX, ADC4_IN3, ADC1_IN11 MAIN_CAN_RX
PB13 PB_13 SPI2_SCK, USART3_CTS, FDCAN2_TX, ADC3_IN5 MAIN_CAN_TX
PB14 PB_14 LTD4 SPI2_MISO, USART3_RTS_DE, ADC4_IN4, ADC1_IN5 DRLs (Daytime Running Lights)
PB15 PB_15 LTA3 SPI2_MOSI, ADC4_IN5, ADC2_IN15 Left Turn Signals Current
PC13 PC_13 PTD0 DC-DC ON
PC14 PC_14 OSC32_IN OSC32_IN
PC15 PC_15 OSC32_OUT OSC32_OUT (not used)
PF0 PF_0 OSC_IN OSC_IN
PF1 PF_1 OSC_OUT OSC_OUT (not used)
PG10 PG_10 NRST NRST

Note: the LED for DC-DC ON being used can be directly connected to the power supply driving it.

Annotations

PowerPCB / PowerPCB.kicad_pcb
62dcc91a
f73a7712
0/1 comments
PowerPCB / PowerPCB.kicad_pcb
b4841488
f73a7712
0/1 comments
Report a bug