DMA HAL enables FIFO Error interrupt even if the FIFO is not enabled #76
Labels
bug
Something isn't working
dma
Direct Memory Access controller
hal
HAL-LL driver-related issue or pull-request.
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
st community
Also reported by users on the community.st.com
Describe the set-up
Describe the bug
Working on the mbed-ce/mbed-os DMA SPI code for STM32H7, I observed that my code was going into the DMA error ISR handler during DMA transfers. This happened intermittently and for no apparent reason, and the error bit was the FIFO error flag. Eventually I found this forum thread that described the issue and the fix well. Basically, the FIFO error flag can set under "nominal" conditions just due to the DMA controller having issues acquiring the MCU internal bus.
While this can indicate that perhaps you need to enable the FIFO or reduce bus contention in your project, it is not an error that should fail the DMA transfer, I believe. For my application, I simply turned off the error flag and saw perfect behavior. (it probably helps that the SPI peripheral has its own FIFO so data won't be immediately lost of this happens
How To Reproduce
Unfortunately I don't have an easy way to reproduce this one, but me and that person on the forum both had it occur during "normal" application operation. In my case, it was happening when I was doing DMA SPI transfers with a pretty standard configuration (DMA controller in direct mode).
Additional context
In my application, I fixed it by changing this line to:
This way the FE flag will not generate an error interrupt if the DMA
The text was updated successfully, but these errors were encountered: