← index #3715PR #13664
Related · high · value 0.732
QUERY · ISSUE

stm32: Adding pins and peripherals to the board files

openby rolandvsopened 2018-04-12updated 2021-05-05
enhancementport-stm32

Just while upgrading my collection of STM32 boards I was looking through the pin definitions and one can debate if they are complete. Other boards also suffer from incompleteness. So now the question pops up to support only the bare micropython or add the peripherals too.

For the STM32F4DISC board the following 'needs' to be added. Also like with the OTG_FS_POWER_SWITCH it seems reasonable to add a disable at startup time (like what is done with the NUCLEO_H743ZI board implementation.

There is however a driver for the LIS302DL in python. It would be nice to include a driver for the MP45DT02 microphone and CS43L22 24-bit audio DAC.

So for starters this needs to be added to the pins.csv:

SW,PA0
LED_GREEN,PD12
LED_ORANGE,PD13
LED_RED,PD14
LED_BLUE,PD15
VBUS_FS,PA9
OTG_FS_ID,PA10
OTG_FS_DM,PA11
OTG_FS_DP,PA12
OTG_FS_POWERSWITCH,PC0
OTG_FS_OVERCURRENT,PD5
LIS302DL_CE,PE3
LIS302DL_INT2,PE1
LIS302DL_SCK,PA5
LIS302DL_SDO,PA6
LIS302DL_SDI,PA7
MP45DT02_CLK,PB10
MP45DT02_DOUT,PC3
CS43L22_MCLK,PC7
CS43L22_LRCK,PA4
CS43L22_SCLK,PC10
CS43L22_SDIN,PC12
CS43L22_RESET,PD4
CS43L22_SCL,PB8
CS43L22_SDA,PB9
BOOT1,PB2
SWDIO,PA13
SWCLK,PA14
SWO,PB3

First would be to add these peripheral definitions for all the DISCO and NUCLEO boards. Do we like this approach?

CANDIDATE · PULL REQUEST

stm32/boards: Standardize pin names to always have P{PORT}{NUMBER} available

closedby AsensioLopened 2024-02-14updated 2025-12-11
port-stm32

I noticed that some STM32 Nucleo boards were missing the PA0 notation that is used by machine.Pin to control GPIO pins.

I have added those pins to the pins.csv of the boards that were missing them.

I have not checked that all of the pins are externally exposed, only that they were on the second column (and, of course, removed duplicates).

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied