2020-07-21 02:52 PM
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
adc2
adc1 DMA
2020-07-21 05:27 PM
Check it is reading the Common Data Register
2020-07-22 10:57 AM
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);
2020-07-22 12:57 PM
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.