2020-09-04 11:27 AM
STM32L010C6Tx
STM32CubeMX V 5.4.0
FW_L0 V1.11.2
When creating a new project that used the ADC with the DMA and some unrelated peripherals, cubeMX will generate the following initialization list in main:
/* Initialize all configured peripherals */
MX_ADC_Init();
MX_DMA_Init();
MX_TIM2_Init();
MX_TIM21_Init();
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
This is a bug - MX_DMA_Init() should be called before MX_ADC_Init(). The ADC init function will attempt to write the the DMA CCR1 register, but will fail because the DMA has not yet been initialized.
Solved! Go to Solution.
2020-09-07 04:00 AM
Hello @DWann
Please try with the last STM32CubeMX, it correct the issue.
Best regards,
Nesrine
2020-09-04 11:32 AM
2020-09-07 04:00 AM
Hello @DWann
Please try with the last STM32CubeMX, it correct the issue.
Best regards,
Nesrine
2021-08-18 04:45 AM
Hello!
I've still encountered the same bug in STM32CubeIDE Version 1.7.0 for the STM32L100C6. It is however possible to change the initialization order manually inside the advanced settings.
Best regards
André
2021-08-18 05:17 AM
@Community member ,
Was this a new project, or you opened an older project with new version of CubeMX?
I understood that the problem was fixed some year ago, but the old .ioc files contain the order established by the old, buggy version of CubeMX.
JW
2021-08-18 06:04 AM
Completely new (a few weeks old maybe) project from scratch, but I'll try again, just to be sure.
2021-09-16 10:36 AM
I just burned a day figuring this one out.
This project was created about 2 months ago. STM32H743.
Ondre, thanks for the hint that I can change the order in CubeMX Advance Settings.
2021-09-17 05:14 AM
2022-01-19 12:31 AM
This is still a problem in CubeIDE 1.8.0 and FW_L0 1.12.1 took me 2 weeks to find the Issue.