2025-06-12 3:10 AM - last edited on 2025-06-12 4:05 AM by mƎALLEm
Can any one please assist me.
I have all 8 ADC down to GRND 0V I am using this command:
HAL_ADC_Start_DMA(&hadc1, AD_RES_BUFFER, 8);
The arry is:
volatile uint32_t AD_RES_BUFFER[19] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
All 8 ADC returns between 752 & 759.
The ADC configuration is
This is the buffer from the IDE
2025-06-12 4:37 AM - edited 2025-06-12 4:39 AM
You appear to convert the same channel over and over, or all channels are at the same voltage.
Read out and check/post the ADC registers content, especially the ADC_SQRx registers.
Do you perform calibration before the conversions, as per the reference manual?
JW
2025-06-12 8:54 AM
I did one calibration before the for(;;) loop.
I did not know I must do a calibration for each read.
I don't know what I have done but all of a sudden it is reading correct and I had to ground the input of ADC not connected.
Where can I get the manual you are referring to.
What I did notice is that I earthed the
2025-06-13 2:34 AM
Crazy,
I removed the DMA settings compiled the code, put the DMA settings back compiled the code and now it is working:
Does not make sense at all.
I hope it keeps on working. But I wonder how stable the IDE is.