cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H725 ADC3 DMA

ssooki
Associate III

I read the adc value using ADC3 + DMA using STM32H725.

​ADC3 channel 0,1,10,11 are reading adc value.

1) ADC3 + DMA1 : RAM 0x24000000 ~ 0x2401FFFF

2) ADC3 + BDMA : Allocate an array to store adc values to SRAM4.

In all experiments, the correct value does not come out, but 0 or a very large value comes out, and even if the power of the corresponding channel is cut off, a strange value comes out...

What more should I consider and test?

The structure of H7 is complicated, so there are too many things that I don't understand because of my short knowledge... Please explain in detail.

4 REPLIES 4
TDK
Guru

If the value is getting populated, the DMA is probably putting it there, barring any rogue out of bounds accesses.

Get the ADC working in blocking mode first. Plenty of examples to go off of.

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

Only one channel is being tested in blocking mode.

ADC value comes in even if analog input is not input.

I am attaching my project....

Amel NASRI
ST Employee

Hi @ssooki​ ,

Some explanation of DMA weird behavior with STM32H7 in this article: DMA is not working on STM32H7 devices.

-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.

Philippe Cherbonnel
ST Employee

Hello @ssooki​ ,

For the setup "ADC3 + DMA1": Can you start from an example of FW package, for example:

...\Firmware\Projects\NUCLEO-H743ZI\Examples\ADC\ADC_DMA_Transfer

with modifications:

  • update debugger for your target STM32H725
  • in file main.h: replace instance ADC1 by ADC3, "..._ADC12_..." by "..._ADC3_..."
  • in file msp.c: replace DMA_REQUEST_ADC1 by DMA_REQUEST_ADC3

Best regards

Philippe