Skip to main content
stst9180
Associate III
Feb 14, 2022 9:49 AM UTC
Solved

Bug: ADC with DMA, Init code not enabeling RCC_DMA_CLK on STM32L151

When creating ADC with DMA the call to MX_Adc_Init() is created before MX_DMA_Init() which in this case means that RCC clocks of DMA are not enabled during MX_ADC_Init(), which is odd. To fix this:

Init code should enable RCC_DMA clock in ADC_Init() or ensure correct init-order

This topic has been closed for replies.
TDK
TDKBest answer
Feb 14, 2022 12:50 PM UTC

https://community.st.com/s/question/0D53W00001EzCmCSAV/mxdmainit-order-in-the-mainc-file-generated-by-stm32cubemx-how-to-fix

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

1 reply

TDK
TDKBest answer
Feb 14, 2022 12:50 PM UTC
"If you feel a post has answered your question, please click ""Accept as Solution""."