WS2812B_STM32F4 icon indicating copy to clipboard operation
WS2812B_STM32F4 copied to clipboard

Beware of STM32F410/411 - errata with DMA2 & GPIO can cause glitches

Open GIPdA opened this issue 3 years ago • 0 comments

Hello,

Just a notice about a silicon errata from ST for STM32F410 and 411 (and maybe others): using DMA2 and GPIO as done in this project can cause glitches in the generated pulses. Errata says "DMA2 data corruption occurs when managing AHB and APB2 peripherals in a concurrent way", specifically with GPIO when doing memory-to-peripheral transfers (exactly what we need...).

The workaround given in the errata is not suitable: memory-to-memory transfers doesn't support requests, so it can't be used. And DMA1 cannot write to the GPIO peripheral, so can't avoid it.

It's tricky to know when you're "managing AHB and APB2 peripherals in a concurrent way", but I managed to avoid glitch issues (for now) by compiling in "-Ofast". Not very robust, I'm afraid this "workaround" can break easily. We'll see, I'll report if I find something else.

GIPdA avatar Jul 27 '21 08:07 GIPdA