Posted on December 04, 2014 at 10:33I am developing an application using the Serial Audio Interface of the STM32F429ZITx.
There appears to be a problem in the code generated by STM32CubeMX.
The DMA handle
hdma_sai1_a is declared as a global variable in
main.c.The same variable name is declared as static within the scope of the function
HAL_SAI_MspInit() in stm32f4xx_hal_msp.c.
The consequence of this is that the
DMA2_Stream1_IRQHandler() function uses the incorrect un-initialised DMA handle and no transfer complete callbacks are invoked.
Workaround:Remove definition of hdma_sai1_a from HAL_SAI_MspInit().
Add ''extern DMA_HandleTypeDef hdma_sai1_a;'' to stm32f4xx_hal_msp.c.
Configuration:
MCU : STM32F429ZITx
STM32CubeMX : v4.5.0
STM32Cube FW : v1.3.0
Atollic TrueSTUDIO : v5.2.0
#stm32cubemx-sai