2022-04-22 12:06 PM
I'm having a very tough time getting more than 1 channel of an ADC instance using DMA to work on the Nucleo-H753 board. No matter what I try, nada... After rigorous debug, found that the ADC is NOT even starting when I call it to right before my while(1) loop... It saying that there is an internal error (17) and fails to start. This leads me to think that there's a config issue/error on my end. Any tips on setting up multiple ADC channels using DMA on the STM32H7 line would be greatly appreciated, as they have the fancier/more finicky 16b ADCs
2022-04-22 02:29 PM
What have you tried? Maybe, following any ST examples?
2022-04-23 05:39 AM
2022-04-23 07:47 AM
2022-04-24 09:11 AM
What is "beyond ridiculus", the CubeMX's bugs; or the question I posted?
2022-04-24 09:19 AM
The CubeMX, of course! The link I gave is not about bugs, but about a single bug which has not really been fixed in years, because it reappears again, and again, and again...
2022-04-26 12:48 AM
Hello Mr. Berticus,
have you been able to fix the problem? For clarification part of the problem of your code is linked to order of initialization of peripherals caused to a bug in STM32CubeMX as described in the thread posted by Piranha and solution described here. Further you initialize 2 channels, but in your code it seems you are interested in reading three channels and at last you are not supposed to use HAL_ADC_GetValue. In case of using DMA the values supposed to be in the specified buffer that you have chosen in HAL_ADC_Start_DMA.
You supposed to define function void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc). That will be called each time the buffer is filled with the new values. This is described in this video.
Please let me know if I you will have further problems.
2022-04-26 07:04 AM
Hi Petr DAVID,
I should've clarified initially that I was trying a multitude of different things to try to get this working. As of this morning, I haven't been able to get it working, unfortunately. I will follow your advice and let you know how it works out. Also, I believe there should be a pop-up window at time of project creation in CubeMX asking the user to verify the silicon rev (Y or V) of the micro on their Nucleo board before they begin. I wasn't aware that it even existed in the "RCC" tab, or that it was even an option... Idea for the next CubeMX release?
Thank you,
Mr. Berticus
2022-04-26 06:14 PM
> I believe there should be a pop-up window at time of project creation in CubeMX asking the user to verify the silicon rev (Y or V)
This is not a popup window - at least not for STM32H7. The Y vs V stepping selection is in RCC -> system parameters.
2023-04-28 07:50 AM
For others who are facing issues with ADC with DMA, you need to be aware of the potential issues of using DMA on cached memory space. I cannot post the link here because I'm new, but you can search for "DMA is not working on STM32H7 devices". It is a knowledge article from ST.