cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 ADC12 and ADC3 noise discrepancy

northh_sven
Associate II

Hello everybody,

I need to acquire a signal at about 4MS and want to use the ADC1 and ADC2 of an STM32H7 (rev V).

In a previous project, I only had direct channels of ADC3 available on the package.

Hence, I compared my measurements to ADC3.

Unfourtunately, I noticed two odd effects:

  • ADC1 and 2 are notably more noisy when compared to ADC3
  • ADC1 and 2 perform very different on every reset with significant changes in mean and variance while ADC3 does not show this effect (at least not as notably)

I ruled out calibration as a source of the second effect by disabling it, see my measurements below.

My setup is as follows:

Board: STM32H747-DISCO

Source: 1.2V NiMH Battery

Vref: the internal Vref-Buffer configured at 2.048V.

M7/M4 Clock: 320/160 Mhz,

f_ADC: 20Mhz

ADC: 16bit with 1.5 t_smpl, single ended, boost set for 12.5 to 25Mhz

I measure mean and variance of the:

ADC3 on PC2_C:

No Calibration:

Mean (1.999 Ms) [V]: 1.223105 +- 0.061357

Reset...

Mean (1.999 Ms) [V]: 1.223066 +- 0.063577

Reset...

Mean (1.999 Ms) [V]: 1.225327 +- 0.078541

Reset...

Mean (1.999 Ms) [V]: 1.225393 +- 0.074409

Reset...

Mean (1.999 Ms) [V]: 1.222540 +- 0.071376

Reset...

Mean (1.999 Ms) [V]: 1.225317 +- 0.076608

Reset...

Calibrated (linearity and offset):

Mean (1.999 Ms) [V]: 1.191522 +- 0.081687

Reset...

Mean (1.999 Ms) [V]: 1.203329 +- 0.092449

Reset...

Mean (1.999 Ms) [V]: 1.204011 +- 0.060134

Reset...

Mean (1.999 Ms) [V]: 1.194630 +- 0.080018

Reset...

Mean (1.999 Ms) [V]: 1.204089 +- 0.061176

Reset...

Mean (1.999 Ms) [V]: 1.190407 +- 0.062052

Reset...

ADC1 on PA0_C:

No Calibration:

Mean (1.999 Ms) [V]: 1.273413 +- 0.090229

Reset...

Mean (1.999 Ms) [V]: 1.224934 +- 0.233474

Reset...

Mean (1.999 Ms) [V]: 1.224460 +- 0.158384

Reset...

Mean (1.999 Ms) [V]: 1.267340 +- 0.116300

Reset...

Mean (1.999 Ms) [V]: 1.196825 +- 0.106113

Reset...

Mean (1.999 Ms) [V]: 1.209556 +- 0.157035

Reset...

Calibrated (linearity and offset):

Mean (1.999 Ms) [V]: 1.220398 +- 0.177876

Reset...

Mean (1.999 Ms) [V]: 1.166331 +- 0.159505

Reset...

Mean (1.999 Ms) [V]: 1.163951 +- 0.139075

Reset...

Mean (1.999 Ms) [V]: 1.227264 +- 0.167752

Reset...

Mean (1.999 Ms) [V]: 1.205984 +- 0.165336

Reset...

Mean (1.999 Ms) [V]: 1.174864 +- 0.199061

Reset...

If I use ADC2 to measure PA0_C, the numbers are similar.

I don't have access to another STM32H7 with direct channels to ADC1/2. Hence, this could be an issue of the DISCO-board.

Has anyone encountered similar issues when comparing ADC3 and ADC1/2 on the STM32H7?

Thanks in advance!

3 REPLIES 3
Bouraoui Chemli
ST Employee

Hi @northh_sven​ 

I suggest you to refer to application note AN5354 "Getting started with the STM32H7 Series MCU 16-bit ADC". Also, you can refer to ADC example provided in STM32CubeH7 firmware via this path: STM32Cube\Repository\STM32Cube_FW_H7_V1.8.0\Projects\STM32H747I-DISCO\Examples\ADC

Bouraoui

Hi @Bouraoui Chemli​ ,

thank you for your response.

I intensively studied AN5354 before posting this question already and did not find any hint toward the discrepancy. In fact, when looking at the concrete values and ignoring the overlaying slow 1-2khz noise that causes most part of the variance, ADC3 comes out at approx 11.5bits which is at least reasonably close to the ENOB of 12.8bits as stated in AN5354.

When I do the same analysis on ADC1/2, the data resolution is more in the range of 10bit.

I also had a look at the firmware examples and checked my code against the registers and their definitions in the reference manual. I also compared the result to a project generated with CubeMX which shows the same odd behavior. Hence, I'm pretty confident that my code is correct.

What I'm more concerned about is, that there is some (to me) unknown condition that I'm not adhering to. Or maybe this is a known problem with the Board (although I did not initialize any peripheral I'm not using)

Bouraoui Chemli
ST Employee

Hi @northh_sven​ 

Maybe you can share your project code?

Bouraoui