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-23 4:08 PM
Actually I need a working ADC DMA project for STM32H753 (Nucleo-H753ZI)
Everything else is less important.
Thanks
2025-07-23 6:20 PM
>>You have to check my code to find the problem.
Yeah, I'm not that invested, perhaps work with your colleagues or supervisor that has some responsibility for your project.
If it Hard Faults, like you've described, run that to ground as it might give you some insight
2025-07-23 6:24 PM
So look for ADC/DMA examples in the CubeH7 repo, for this, the H743 NUCLEO, or EVAL board variants which you can test / port.
Run the Hard Fault to ground, as this is likely to be a different type of failure and that might be causing other issues.
Get the serial port (VCP) output working so you can get diagnostics and telemetry via that.
2025-07-23 6:42 PM
Actually I am working with AI in the coding level, which is what I need. You should not get involved if you have never done a real STM32H7 ADC DMA project. Thank!
2025-07-24 5:10 PM
The problem has been solved by working with our best teacher - AI Tool.
Thanks