-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DMA2D_IRQHandler called with empty ISR register #31
Comments
I am encountering the exact same issue with a STM32H753XL MCU using TouchGFX 4.20.0. After some investigation, it seems that the
After the while loop is exited, there is no guarantee that the DMA2D ISR is entered before the write to
Not sure that's the proper way to fix the issue but hopefully this will be helpful |
@taltenbach @TOUNSTM |
Just a note on this patch: appears to be incorrect, I believe the proper bit is: |
Thanks for the workaround , It works for me. |
I'm using a custom board with STM32H723 (144pin), 5inch display (LTDC), external SRAM (FMC), external NOR flash (OSPI) with Touchgfx and DMA2D (double buffer strategy). No OS.
I experimented random stucks of the touchgfx like described in this thread. After struggling I found out that the problem was caused by DMA2D_IRQHandler called with empty ISR register. In fact, the touchgfx was expecting a call to XferErrorCallback(hdma2d) that never happened and so hanged on.
For what I've seen when this empty call is triggered the DMA2D_FLAG_TC should be HIGH, but actually this sometimes doesn't happens.
I do not know why this happens (silicon bug? touchgfx clean the flag in particular moment?), but for sure the HAL library doesn't manage this case.
So to solve my issue I changed in
void HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d){...}
of stm32h7xx_hal_dma2d.c the following line:if ((isrflags & DMA2D_FLAG_TC) != 0U)
in
if ((isrflags & DMA2D_FLAG_TC) != 0U || isrflags == 0U)
The text was updated successfully, but these errors were encountered: