Hello,
#1
The TRM states in chapter 10.1.12 that "the boot ROM will call the calibration functions, so trim values should be initially populated without user intervention".
This does not appear to be the case for function CalAdcXINTL(), as all ADCINLTRIMx registers have a zero value after the boot exit. Same thing for GetAdcOffsetTrimOTP().
#2
Can someone explain to me what's going on in function AdcSetMode / ADC_setMode with the following lines?
//
//12-bit linearity trim workaround
//
AdcaRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM5 &= 0xFFFF0000;
Cheers,
Pierre