2020-04-07 11:27 PM
I do n’t know why MX_DMA_Init () is behind other peripheral initialization functions, so all DMA channel initialization fails.
stm32cubemx version: 5.6.0
2020-04-08 03:35 PM
Is this a project created in some older CubeMX version?
JW
(collecting thread https://community.st.com/s/question/0D50X0000Bmob3uSQA/dma-not-working-in-cubemx-generated-code-order-of-initialization )
2020-04-09 02:51 AM
Indeed, if it is a project created with an older version of CubeMX and regenerated with current version, the problem is still there.
@Gzhx.1 , do you confirm it is the case?
@Khouloud ZEMMELI , do you have some ore details to add please?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2020-04-10 11:08 AM
Yes @Amel NASRI , normally the bug is fixed in the 5.6.1 MX version
Best Regards,
Khouloud
2021-08-23 08:32 AM
Still broken.
Last week I downloaded and installed
STM32CubeIDE
Version: 1.7.0
Build: 10852_20210715_0634 (UTC)
which seems to contain
STM32CubeMX - STM32 Device Configuration Tool
Version: 6.3.0-RC5
Build: 20210714-1111 (UTC)
This is the autogenerated code for the Nucleo-F303ZE after I enable ADC and play with sending strings over USART. Later I enabled DMA to figure out how it works to transmit on USART using DMA. (Not sure if the order is important, but just to tell you how I got to this point)
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_RTC_Init();
MX_USART3_UART_Init();
MX_USB_PCD_Init();
MX_DMA_Init();
MX_ADC1_Init();
/* USER CODE BEGIN 2 */
I noticed in the debugger that the CCR register didn't seem to accept the value written to it in the MX_DMA_Init(), and I couldn't change it from inside the debugger either.
My workaround was to place a call to MX_DMA_Init() in the User Code just above, but it took me basically an entire day of headscratching before a colleague found this thread and showed it to me.
2021-08-24 01:00 AM
Hi @Peter M_2örck ,
That looks to be a regression on latest STM32CubeMX version (@Khouloud ZEMMELI can confirm this).
A possible workaround is to set a ranking for generated functions calls. This is possible from Project Manager >> Advanced Settings.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-08-24 01:25 AM
Hello @Peter M_2örck ,
Yes, I confirm the regression..
It's now under analysis and it will be fixed, we're sorry for any inconvenient that may have caused.
Khouloud