2021-11-22 11:31 AM
I am using the following settings:
STM32 CubeMX version 6.3.0
Microcontroller: STM32L4P5ZGTxP
Enabled peripherals:
ADC1:
DMA1 channel 1:
When I generated the code (checked for both Keil and Cube IDE), the initialization part of the main looked like this:
...
MX_GPIO_Init();
MX_ADC1_Init();
MX_DMA_Init();
...
The ADC runs, and if the interrupts are set, you'll get the interrupts. But the DMA callback routine is never entered.
When I changed the order to first initialize the DMA, and then the ADC1, the problem was solved.
I would like to see if anyone can confirm this, or is it due to something else (possibly?).
Solved! Go to Solution.
2021-11-22 06:31 PM
It is well known already. There are several topics on this forum. One of the reasons BDMA not worked with ADC3 on H7, etc. Current solution is to change default initialization order in Device configuration tool (pinout/peripheral editor):
This way newly generated code will have right order even after making changes in IOC file and re-generating the code.
Btw, there are also some other features on those tabs worth noting.
2021-11-22 06:31 PM
It is well known already. There are several topics on this forum. One of the reasons BDMA not worked with ADC3 on H7, etc. Current solution is to change default initialization order in Device configuration tool (pinout/peripheral editor):
This way newly generated code will have right order even after making changes in IOC file and re-generating the code.
Btw, there are also some other features on those tabs worth noting.
2021-11-22 09:03 PM
I had a similar problem with UART solved the problem as follows. In the vastness of the Internet, I found an article where similar rakes were described and how to fix it, the DMA of the periphery with which you will work should be configured first of the periphery itself. As it turned out, the initialization order can be configured in the Cube in the Project Manager\Advanced Settings tab, set as the author and, lo and behold, the data began to be accepted. The in-tweets also don't say anything about this joke.
2021-11-23 02:35 AM
Thanks for the info
2021-11-29 06:09 AM
Hi @KayG ,
As confirmed by @thundertronics.com , this is a known regression issue faced with STM32CubeMX 6.3.0.
Good news: new STM32CubeMX version 6.4.0 is already available on ST web site and it should fix this issue.
Could you please check this on your side and confirm if the problem is well resolved?
-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.