2025-07-22 7:31 PM
Hi,
I am using NUCLEO-H753ZI board. My ZIPPED project is attached.
ADC1 Rank 1 Channel 10 Rank 2 Channel 5
ADC2 Rank 1 Channel 10 Rank 2 Channel 15
ADC3 Rank 1 Channel 10 Rank 2 Channel 2
Channel 10's input: Positive side of 1.5VDC battery, whose negative side is connected to GND of the board.
All other channels are connected to one side of 0.8VAC sine wave signal, whose other side is connected to the positive side of the above .5VDC battery.
The three arrays are defined for ADC1, ADC2 and ADC3 in below:
static uint16_t adc_value1[NUM_SCANS * NUM_RANKS] __attribute__((aligned(32)));
static uint16_t adc_value2[NUM_SCANS * NUM_RANKS] __attribute__((aligned(32)));
static uint16_t adc_value3[NUM_SCANS * NUM_RANKS] __attribute__((aligned(32)));
Three flags are set up for DMA completion in void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
Problem: in DEBUG Mode,, when DMA is completed, the data in the above arrays is inconsistent with the data in the dump output window "Details:{1116,...". Look like DMA process in my code is not handled properly. My ZIPPED project is attached.
I tried to add InvalidateADCBufferCache unsuccessfully - running into HardFault.
I also try to run in RAM_D2 instead of RAM_D1 unsuccessfully.
My ZIPPED project is attached.
Thank you very much for your help,
Peter
2025-07-22 8:24 PM
> the data in the above arrays is inconsistent with the data in the dump output window "Details:{1116,..."
What is the data in the above arrays?
What is the data in the dump output window?
In what way is it inconsistent?