cancel
Showing results for 
Search instead for 
Did you mean: 

Order of ADC calibration step

xpp07
Senior

The errata sheet of the STM32L476VG states:

0693W00000GW1ttQAD.png 

I wonder if the order of the ADC calibration step is important.

I was performing the following steps:

1- Set ADC clock source

2- Enable ADC clock

3- Disable deep power mode (ADC1 and ADC3)

4- Enable ADC voltage regulator (ADC1 and ADC3)

5- Perform ADC Calibration (ADC1 and ADC3)

6- Configure CCR register

7- Enable ADC1 (ADC1->CR)

8- Configure ADC1 CFGR register

9- Configure ADC1 SQR1 and SQR2 registers

10- Configure ADC1 SMPR1 and SMPR2 registers

11- Enable ADC3 (ADC3->CR)

12- Configure ADC3 CFGR register

13- Configure ADC3 SQR1 and SQR2 registers

14- Configure ADC3 SMPR1 and SMPR2 registers

Now, until this step I have not started Regular Conversion. First I call other functions in my application and then I perform the ADC Start Regular conversion step. I'm using DMA also.

Following the above steps, I have some ADC1 accuracy issues. When I change the sequence above and perform ADC calibration after the register configuration and start the conversions right after calibration, it seems like the accuracy improves a little bit.

Any thoughts on this? Thank you.

1 REPLY 1
Piranha
Chief II

RM0351 section:

Software procedure to calibrate the ADC

1. Ensure DEEPPWD=0, ADVREGEN=1 and that ADC voltage regulator startup time has elapsed.

As per datasheet table 76. the time can be up to 20 us.