cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX - SAI Code generation problem.

Howcroft.Paul
Associate
Posted on December 04, 2014 at 10:33

I 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
1 REPLY 1
stm32cube-t
Senior III
Posted on January 08, 2015 at 10:52

Hello,

this issue is fixed for next release (STM32CubeMX 4.6) coming out soon.

Sorry for the inconvenience.