← index #4506Issue #16107
Related · medium · value 1.964
QUERY · ISSUE

stm32: SPI pins nucleo-h743ZI commented out

openby eebooopened 2019-02-15updated 2026-03-26
port-stm32proposed-close

hello @dpgeorge
Why spi pins define lines are commented for nucleo-h743ZI board?
best regards

CANDIDATE · ISSUE

Attempting to use SPI(6) on STM32H747BIT6 does not seem to work.

openby picarro-rdorfneropened 2024-10-29updated 2025-10-03
bugport-stm32

Port, board and/or hardware

I am using a custom board with STM32H747BIT6

MicroPython version

Micropython 1.23 on stm32h747BIT6 using a custom board.

Reproduction

Spi device is created with..
spi1 = SPI(6, baudrate=1000000, polarity=0, phase=0, bits=8 )

later attempt to write to this device generates a timeout.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "main.py", line 112, in <module>
File "valve_control.py", line 84, in init
File "valve_control.py", line 148, in drv_spi_write_buf
File "valve_control.py", line 131, in drv_spi_write_reg
OSError: [Errno 110] ETIMEDOUT

So the device appears to be there, I have defined thee pins in mpconfigboard.h

#define MICROPY_HW_SPI6_SCK (pyb_pin_SPI6_SCK)
#define MICROPY_HW_SPI6_MISO (pyb_pin_SPI6_MISO)
#define MICROPY_HW_SPI6_MOSI (pyb_pin_SPI6_MOSI)

Expected behaviour

I was expecting micropython to perform the write to the SPI6 port on the stm32h747BIT6 device.

Observed behaviour

However, I get the following instead.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "main.py", line 112, in <module>
File "valve_control.py", line 84, in init
File "valve_control.py", line 148, in drv_spi_write_buf
File "valve_control.py", line 131, in drv_spi_write_reg
OSError: [Errno 110] ETIMEDOUT

It is almost as if the pins are not actually being configured for output via the spi, like the alternate function register is not being set up?

I'm guessing this might be a bug in configuration management when micropython starts up, but so far I've not been able to find any documentation that indicates the correct way to set up a new hardware spi port.. The code appears to be there for SPI device 6. It just does not seem to actually function, though.

Additional Information

No, I've provided everything above.

Also, I THINK this is a bug, but it might be that I need to posts this some where else, if so, please provide me with a whack from a clue by four so I can put this in the right place.

Thanks!

Code of Conduct

Yes, I agree

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