2019-11-24 03:43 PM
STM32CubeIDE with STM32F3 HAL Library version 1.11.0.
Using HAL library to set up timer (TIM6) driven ADC (ADC1) trigger with DMA (DMA1) capture. DMA does not configure correctly.
The Cube Generated code in main.c configures the hardware as:
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_RTC_Init();
MX_TIM6_Init();
MX_USART3_UART_Init();
MX_USB_PCD_Init();
MX_ADC1_Init();
MX_DMA_Init();
/* USER CODE BEGIN 2 */
Unfortunately this is problematic because MX_ADC1_Init() code configures the CCR DMA register. These writes are ignored because the DMA has not be initialized and its clock is off. DMA behaves as if all the CCR bits are Zero. Quick fix is to exchange the order of MX_ADC_Init() and MX_DMA_Init(). A more permanent fix is to place a call to MX_DMA_init(); is the user code section prior to the Cube generated code so that when the code is regenerated, the DMA is initialized before the ADC.
2019-11-25 02:54 PM
@Imen DAHMEN
2019-11-26 12:14 AM
Hello @BobC_4199 ,
This is a known isssue reported internally and will be fixed in the coming release of STM32CubeMx.
Best Regards,
Imen
2019-11-26 04:05 AM
Thank you. I tried to reproduce the problem on a separate instance of STMCubeIDE on another computer and the initialization sequence was correct.
Is there a place to see the bug/issue list?