AnsweredAssumed Answered

STM32F4 DMA problem since firmware package 1.15

Question asked by Karsten Koop on Jul 7, 2017
Latest reply on Jul 7, 2017 by Karsten Koop

We are using an STM32F429 together with external SRAM, SD card and LCD display, utilizing STemWin. The framebuffer for the display is located in the external SRAM, as is another buffer that is used to write to the SD card using DMA. After upgrading the HAL library from 1.5 to 1.15, we noticed a hang when writing to the SD card, but only when the display is active, i.e. after a call to GUI_Init().

This can be reproduced on the STM32429I-EVAL board: as soon as both buffers are placed in the external SRAM, this hang on DMA transfer occurs, but only in 1.15, not in older versions. When placing both buffers in external SDRAM or one into internal RAM the problem goes away.

After comparing the library source between version 1.5 and 1.15, I found the breaking change the removal of the call to `__HAL_DMA_DISABLE(hdma)` in `HAL_DMA_Start_IT`. After adding this call in the 1.15 version, it works as before.

So the question: Is this a BUG in the hal library code, or is the removal intentional? It seems the reference manual also states that DMA has to be disabled before the DMA registers can be written. So why was the call removed? It looks the same in 1.16.

Outcomes