Skip to main content
DDiaz.2
Associate
Jul 21, 2020 9:52 PM UTC
Question

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

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

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
Jul 22, 2020 12:27 AM UTC

Check it is reading the Common Data Register

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
DDiaz.2
DDiaz.2Author
Associate
Jul 22, 2020 5:57 PM UTC

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);