STM32H7 Silicon errata for SPI peripheral

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

dynfer
Posts: 14
Joined: Sun Aug 25, 2024 6:11 pm
Has thanked: 2 times
Been thanked: 5 times

STM32H7 Silicon errata for SPI peripheral

Postby dynfer » Wed Feb 04, 2026 9:27 am

The STM32H7 suffers a silicon bug in the SPI peripheral which results in a garbage byte being read by the peripheral when using DMA.
The ST Errata sheet provides a workaround for this issue in the form of a reset of the peripheral before continuing.

We got a proof of concept fix for the issue below

https://github.com/FOME-Tech/ChibiOS/co ... 8812f52fe7

https://github.com/ChibiOS/ChibiOS/comm ... e45be30b24
Attachments
image.png
Last edited by dynfer on Wed Feb 04, 2026 9:31 am, edited 1 time in total.

mck1117
Posts: 37
Joined: Wed Nov 11, 2020 6:41 am
Has thanked: 1 time
Been thanked: 9 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby mck1117 » Wed Feb 04, 2026 9:28 am

We do it there before a send as well, but I'm pretty sure it's only required before receive or exchange (and should get moved to the spi lld).

User avatar
FXCoder
Posts: 401
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 134 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby FXCoder » Sat Feb 07, 2026 12:44 am

Hi,
The errata states that issue occurs only after a simplex SPI transmission.
ChibiOS SPIv3 driver uses duplex for send and receive with DMA (the receive side acts to terminate a send transaction).
For polled a simple direct write of transmit register is followed by waiting on receive.

So it seems this errata should not apply to ChibiOS SPIv3 (unless there is external use of SPI doing a simplex transmission independently).

--
Bob

mck1117
Posts: 37
Joined: Wed Nov 11, 2020 6:41 am
Has thanked: 1 time
Been thanked: 9 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby mck1117 » Mon Feb 09, 2026 8:26 am

The unmodified SPI MMC driver runs in to this on H7. Here's the github issue where I debugged it and followed it back to the errata sheet: https://github.com/rusefi/rusefi/issues ... -785337711

mck1117
Posts: 37
Joined: Wed Nov 11, 2020 6:41 am
Has thanked: 1 time
Been thanked: 9 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby mck1117 » Mon Feb 09, 2026 8:32 am

If I had to guess, that means the bug isn't exactly "simplex TX followed by DMA RX" but is actually something like "any operation without RX MINC set, followed by an operation with RX MINC set"

User avatar
Giovanni
Site Admin
Posts: 14810
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1180 times
Been thanked: 981 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby Giovanni » Mon Feb 09, 2026 9:31 am

Hi,

So, you are running the plain SPI driver and you are still affected by the errata?

I think "RX MINC" is a DMA-level thing, why should the SPI be affected by that?

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14810
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1180 times
Been thanked: 981 times

Re: STM32H7 Silicon errata for SPI peripheral

Postby Giovanni » Mon Feb 09, 2026 9:34 am

Probably the best approach would be creating a very simple test applications, using just SPI functions, triggering the problem.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 5 guests