11.4.1. Foreground calibration function
During the foreground calibration procedure, the ADC calculates a calibration factor which is
internally applied to the ADC until the next ADC power-off. The application can not use the
ADC until the calibration is completed. The calibration should be performed before starting A
/ D conversion. The calibration is initiated by setting the CLB bit to 1. The CLB bit stays at 1
during the calibration sequence. Then it is then cleared by hardware as soon as the
calibration is completed.
When the ADC operating conditions change (such as supply power voltage V
DDA
,
temperature and so on), it is recommended to re-run a calibration cycle.
The internal analog calibration can be reset by setting the RSTCLB bit in ADC_CTL1
register.
Calibration software procedure:
1. Ensure that ADCON=1.
2. Delay 14 CK_ADC to wait for ADC stability.
3. Set RSTCLB (optional).
4. Set CLB=1.
5. Wait for CLB =0.