cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 - ADC + DMA using HAL not working

merdouille
Associate II

Hi,

I am trying to make the ADC + DMA work a STM32G431CBT6 using STM32CubeIDE and the HAL library. I am used to making it work on other families like the STM32f103 etc.. However, here, when I program the processor using the debug mode and watch the content of my adc/dma buffer, all the values are at 4095 (maximum) and stay like this... 

Has anyone an idea on how to make this work? or any suggestions based on my code?

Please find my code and CubeMX settings in the following images.

 

Thanks in advance,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
merdouille
Associate II

Thanks a lot for your advice @Issamos!

I have found the issue btw: the ADC'S were totally saturated due to a misuse of VREF. I was used to work with other MCUs that did it differently (F1 , F3, etc). So , always check your reference voltage settings and Connections!

View solution in original post

4 REPLIES 4
merdouille
Associate II

CaptureA.JPG

CaptureB.JPG

CaptureC.JPG

   

Issamos
Senior III

Hello @merdouille 

Try to use one of those 2 ready to use projects.

Best regards.

II

merdouille
Associate II

Thanks a lot for your advice @Issamos!

I have found the issue btw: the ADC'S were totally saturated due to a misuse of VREF. I was used to work with other MCUs that did it differently (F1 , F3, etc). So , always check your reference voltage settings and Connections!

Happy to know that your problem has been solved. If so, close the topic by choosing a best answer.

Best regards.

II