cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 ADC - PA0 Sampling Issue

Corbinarius
Associate

Hello,

On a custom-designed PCB, I am using an STM32H745IIT6 (LQFP176) MCU. I am actively using analog channels, various I/O pins, Ethernet, QSPI, and other peripherals. The code I am using was previously running on an F7 series MCU. It has been fully ported to the H7 version and tested. However, during testing, I noticed an issue with sampling on the PA0 pin, which is configured as ADC1 INP16 in single-ended mode. A total of 19 analog channels are active, and 18 of them show no problems, but on this particular channel I can clearly observe a shift in the raw ADC values.

- ADC1-2-3 are running in independent mode, 16-bit, triggered by Timer1.

- Data is read via DMA.
When I monitor with Serial Wire Viewer (SWV), I observe sampling behavior as shown in the image. The channel where I am experiencing the issue is the red signal shown with the name adc_bc. The other three signals were added for comparison. A single source was used to provide the signal to these four channels. When monitoring the raw ADC values, the difference at the upper and lower peaks can reach around 200–250. This corresponds to a calculation error of up to 10 mV. 

sampleIssueSWV.jpeg
The image on the SWV may be misleading due to scaling. The other image is an Excel graph generated with the same data. The orange one is our channel with the problem in there. 

samplingIssueExcelGraphic.png

  Does anyone have suggestions for a solution, or has anyone experienced a similar issue?
       Thank you in advance.

1 REPLY 1
TDK
Super User

What is your PA0 pin connected to? Can you show a schematic?

Past the multiplexer, the ADC is the same for all channels so must be something upstream from that.

Doing an FFT on the data might show something. Perhaps the signal is getting cross-talk of a specific frequency in which case the frequency will give clues as to the source.

If you feel a post has answered your question, please click "Accept as Solution".