← index #16107Issue #6257
Likely Duplicate · medium · value 1.243
QUERY · 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

CANDIDATE · ISSUE

STM32H7 SPI6 not working with DMA

openby rcordeauopened 2020-07-19updated 2026-01-14
port-stm32

Hi,
I was trying this out on a custom board as well as the Nucleo STM32H743SZI board, and while SPI3 works when sending multiple bytes (default behavior when sending more than 1 byte seems to be to use DMA per spi.c), when it comes to SPI6, it uses a different DMA engine (DMA2) and goes through a mux BDMA_REQUEST_SPI6_TX/RX. I keep getting a ETIMEDOUT error due to waiting for the interrupt to come back from the DMA transaction. Any advice, or could this be a bug?

Thanks,
Rob

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