cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX problem when generate codes.

TSuzu.424
Associate

Hi,

DMA does not work, because the initialization order of the code generated by CubeMX is not correct.

DMA setting is not valid, because DMA is initialized after the fuction that uses DMA.

Please fix bugs.

Best regards,

incorrect order expample:

MX_GPIO_Init();

MX_SPI1_Init();

MX_SPI2_Init();

MX_SPI3_Init();

MX_UART4_Init();

MX_UART5_Init();

MX_USART1_UART_Init();

MX_USART2_UART_Init();

MX_USART3_UART_Init();

MX_DMA_Init();

correct order expample:

MX_GPIO_Init();

MX_DMA_Init();

MX_SPI1_Init();

MX_SPI2_Init();

MX_SPI3_Init();

MX_UART4_Init();

MX_UART5_Init();

MX_USART1_UART_Init();

MX_USART2_UART_Init();

MX_USART3_UART_Init();

My environments:

・STM32CubeMX Ver. 5.4.0

・STM32Cube MCU pacage for STM32L4 Series Ver1.14.0

・Windows10

・NUCLEO-L496ZG

5 REPLIES 5
Herve PIERROT
ST Employee

Hello,

The initialization order can be changed directly within STM32CubeMX, just go in the "Project Settings" tab, "Advanced Setting: section.

In the table "Generated Function Calls", you can select each line and thanks to two buttons at the bottom of the window, you can increase or decrease the rank of each function call.

Khouloud ZEMMELI
ST Employee

​Hello @TSuzu.424​ ,

Thanks for your feedback, this issue has already reported and it will be fixed in a next release.

Best Regards,

Khouloud

TA1
Associate III

Hi All

Problem is also exist for STM32F745.

Regards,

william.w.jr
Associate II

This bug exists in STM32F405RG with STM32CubeMX 5.4.0