[Black STM32F407VET6] Pin map
-
- Posts: 35
- Joined: Fri Apr 12, 2019 8:55 am
[Black STM32F407VET6] Pin map
Hi,
I am looking for the MicroPython pin name <--> board pin name (PX-## etc.) mapping for the
Black STM32F407VET6.
Could anyone point me to that?
Thanks
PP
I am looking for the MicroPython pin name <--> board pin name (PX-## etc.) mapping for the
Black STM32F407VET6.
Could anyone point me to that?
Thanks
PP
Re: [Black STM32F407VET6] Pin map
I found a blurry photo of that board, looks like they're labelled with their "CPU" names (like you say -- P<port><num>).
The easiest way to use them is machine.Pin.cpu.<port><num> (or machine.Pin('<port><num>')
The easiest way to use them is machine.Pin.cpu.<port><num> (or machine.Pin('<port><num>')
Re: [Black STM32F407VET6] Pin map
Which board definition are you using? If it's https://github.com/mcauser/BLACK_F407VE then it should even just work directly using what's printed on the board as e.g. machine.Pin('PA10') or machine.Pin.board.PA10
Can you run dir on machine.Pin.cpu / machine.Pin.board (this is the output for my Pyboard 1.1 for comparison)
Can you run dir on machine.Pin.cpu / machine.Pin.board (this is the output for my Pyboard 1.1 for comparison)
Code: Select all
>>> dir(machine.Pin.cpu)
['__class__', '__name__', 'A0', 'A1', 'A10', 'A11', 'A12', 'A13', 'A14', 'A15', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'B0', 'B1', 'B10', 'B11', 'B12', 'B13', 'B14', 'B15', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'C0', 'C1', 'C10', 'C11', 'C12', 'C13', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'D2']
>>> dir(machine.Pin.board)
['__class__', '__name__', 'LED_BLUE', 'LED_GREEN', 'LED_RED', 'LED_YELLOW', 'MMA_AVDD', 'MMA_INT', 'SD', 'SD_CK', 'SD_CMD', 'SD_D0', 'SD_D1', 'SD_D2', 'SD_D3', 'SD_SW', 'SW', 'USB_DM', 'USB_DP', 'USB_ID', 'USB_VBUS', 'X1', 'X10', 'X11', 'X12', 'X17', 'X18', 'X19', 'X2', 'X20', 'X21', 'X22', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8', 'X9', 'Y1', 'Y10', 'Y11', 'Y12', 'Y2', 'Y3', 'Y4', 'Y5', 'Y6', 'Y7', 'Y8', 'Y9']
>>>
-
- Posts: 35
- Joined: Fri Apr 12, 2019 8:55 am
Re: [Black STM32F407VET6] Pin map
Thanks. I can see these.
An observation: turns the LED on! Same with
Code: Select all
__class__ __name__ DAC1 DAC2
LED_D2 LED_D3 OSC32_IN OSC32_OUT
PA0 PA1 PA10 PA11
PA12 PA13 PA14 PA15
PA2 PA3 PA4 PA5
PA6 PA7 PA8 PA9
PB0 PB1 PB10 PB11
PB12 PB13 PB14 PB15
PB2 PB3 PB4 PB5
PB6 PB7 PB8 PB9
PC0 PC1 PC10 PC11
PC12 PC13 PC14 PC15
PC2 PC3 PC4 PC5
PC6 PC7 PC8 PC9
PD0 PD1 PD10 PD11
PD12 PD13 PD14 PD15
PD2 PD3 PD4 PD5
PD6 PD7 PD8 PD9
PE0 PE1 PE10 PE11
PE12 PE13 PE14 PE15
PE2 PE3 PE4 PE5
PE6 PE7 PE8 PE9
RED_LED SD_CK SD_CMD SD_D0
SD_D1 SD_D2 SD_D3 USB_DM
USB_DP USB_ID USB_VBUS
Code: Select all
machine.Pin.board.LED_D2.off()
Code: Select all
machine.Pin.board.LED_D2.value(0)
Re: [Black STM32F407VET6] Pin map
Then most likely the LED anode is connected to Vdd, such that it requires a low level to shine.
-
- Posts: 35
- Joined: Fri Apr 12, 2019 8:55 am
Re: [Black STM32F407VET6] Pin map
I see.
The header directly opposite to the JTAG connector is marked "For mcudev/TFT" -- looks like the parallel LCD bus... is this documented somewhere?
I found all the GPIO pin mux in ports/stm32/boards/stm32f405_af.csv. This is referenced by boards/BLACK_F407VE/mpconfigboard.mk.
stm32f405_af.csv contains ports PF## through PI## which don't show (are not available?) in MicroPython.
Thanks
PP
The header directly opposite to the JTAG connector is marked "For mcudev/TFT" -- looks like the parallel LCD bus... is this documented somewhere?
I found all the GPIO pin mux in ports/stm32/boards/stm32f405_af.csv. This is referenced by boards/BLACK_F407VE/mpconfigboard.mk.
stm32f405_af.csv contains ports PF## through PI## which don't show (are not available?) in MicroPython.
Thanks
PP
- Attachments
-
- STM32F407VET6_board.jpg (193.61 KiB) Viewed 6204 times
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: [Black STM32F407VET6] Pin map
The TFT header is a copy of the needed pins on the side to use the 16bit parallel FSMC peripheral.
U can find the TFT pin-out here https://wiki.stm32duino.com/images/a/a8 ... AG-TFT.pdf
And here is a pic of the pins used but the MCU for the FSMC peripheral
U can find the TFT pin-out here https://wiki.stm32duino.com/images/a/a8 ... AG-TFT.pdf
And here is a pic of the pins used but the MCU for the FSMC peripheral
-
- Posts: 35
- Joined: Fri Apr 12, 2019 8:55 am
Re: [Black STM32F407VET6] Pin map
Thanks, that PDF is what I was looking for!
Re: [Black STM32F407VET6] Pin map
There are also pin diagram images here showing which pins are on the TFT header:
https://os.mbed.com/users/hudakz/code/S ... /shortlog/
https://os.mbed.com/users/hudakz/code/S ... /shortlog/
-
- Posts: 35
- Joined: Fri Apr 12, 2019 8:55 am
Re: [Black STM32F407VET6] Pin map
Great, thanks.