Skip to main content
thomfischer
Senior
Oct 8, 2021 6:41 PM UTC
Solved

CubeMx 6.3.0 STM32H753ZITx peripherals initialization sequence bug ?

CubeMx generates the following code

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_RTC_Init();

 MX_USART1_UART_Init();

 MX_TIM5_Init();

 MX_SPI1_Init();

 MX_TIM14_Init();

 MX_I2C1_Init();

 MX_QUADSPI_Init();

 MX_SAI1_Init();

 MX_SAI2_Init();

 MX_SAI3_Init();

 MX_DMA_Init();

 MX_SPI3_Init();

 /* USER CODE BEGIN 2 */

this does not work because MX_DMA_INIT should be called before other peripherals which use DMA,

Pperipherals clock initialization has moved to HAL_???_MspInit functions, so the initialization sequence is important.

This topic has been closed for replies.
TDK
TDKBest answer
Oct 8, 2021 7:19 PM UTC

This is the most common bug reported here. It's known. Hopefully ST fixes it again soon and doesn't reintroduce it in future versions.

https://community.st.com/s/question/0D53W000017Q0XqSAK/cubemx-not-consistent-with-generating-mxdmainit-before-mxusart6uartinit-bug

"If you feel a post has answered your question, please click ""Accept as Solution""."

2 replies

TDK
TDKBest answer
Oct 8, 2021 7:19 PM UTC

This is the most common bug reported here. It's known. Hopefully ST fixes it again soon and doesn't reintroduce it in future versions.

https://community.st.com/s/question/0D53W000017Q0XqSAK/cubemx-not-consistent-with-generating-mxdmainit-before-mxusart6uartinit-bug

"If you feel a post has answered your question, please click ""Accept as Solution""."
FColl.1
Associate III
Oct 12, 2021 12:05 AM UTC

OMG! I just wasted half a day tracking this down. I did learn quite a lot on the way so not entirely wasted. Just so other people might track this answer down (google please index this!)...

If the DMA registers will not set when configured as part of a peripheral config this is the reason!.

"DMA registers can not be written."