STM32H723ZG ADC on Nucleo board behaves not as expected
- April 1, 2023
- 6 replies
- 2281 views
Hi there,
I am using a Nucleo H723ZG and my ADC(s) behave weirdly.
I need only one ADC, from the datasheet the ADC3 supports 5 MSPS.
Since I needed the highest possible sampling rate, I've chosen this one.
The data gets collected in one burst of 4096 12-bit samples into a DMA buffer of 16-bit words.
On the input I attached a potentiometers wiper for testing, the other ports of the potentiometer are connected to AGND and AVDD on the Nucleo board.
Since I've got weird output values, I dumped the first 200 words of the buffer into logs, the logs are attached to this post.
The first burst of 4096 samples (adc_3_12_bit_buffer_1st_run.log) shows the expected value (4095) in each sample (except for the first 8), since the potentiometer was set to the full voltage of roughly 3.3V.
But without changing anything, the second and following bursts (adc_3_12_bit_buffer_2nd_and_later_runs.log from the 2nd, but the others are similar) show completely different values, where all N samples the values are as expected (4095) and in between there are some strange values.
Troubleshooting up to now:
Switching to ADC 1, then to ADC 2, changing to many different sampling-times, as well as ADC clocks, w/ and w/o oversampling, connecting Vref, restarted everything and so on .... I'm lacking more Ideas what could cause the trouble.
Does anyone have an idea how to make the behaviour more like in the first burst and at best also remove the first 0-samples of that first burst?