cancel
Showing results for 
Search instead for 
Did you mean: 

I can only access the data from one ADC when in Dual Regular Simultaneous Mode using DMA.

DDiaz.2
Associate II

Hello All,

I'm attempting to get two ADC's to simultaneously sample on a STM32H743. I have tried both the NUCLEO board and the EVAL board and have not seen much success. I'm using STM32CubeIDE to configure everything and STM32CubeMonitor to monitor the values read.

From my understanding, when running in dual simultaneous mode, the data from the two ADC conversions are written to the buffer as a 32 bit word. I have set up the STM32CubeMonitor to read the first 16 bits of the buffer and the second 16 bits and plot them. However, despite having different inputs to each adc (one square wave, and one triangle) I only see the input on ADC1. The values of ADC2 reflect what is on the input of ADC1. I'm not entirely sure what I'm doing wrong. I would appreciate any insight.

Here are the configuration of both ADCs and the DMA for ADC1.

adc1

0693W000001tJnBQAU.png

adc2

0693W000001tJnGQAU.png

adc1 DMA

0693W000001tJnLQAU.png

3 REPLIES 3

Check it is reading the Common Data Register

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

I'm using the following command to write the values to the adc_buf with DMA. I'm then monitoring that buffer but only values from adc1 seem to be showing up.

HAL_ADCEx_MultiModeStart_DMA(&hadc1,(uint32_t *)adc_buf,ADC_BUF_LEN);

So after some research, I realized that I completely answered your question wrong. I have gone ahead and checked the Common Data Register (or what I believe to be it based off of document RM0433). Only the values of adc1 are present in this register which I'm assuming is the issue. The first 16 bits of the register read out 4096 and does not change. I'm not sure why the data from the adc2 isn't being written to this register.