For the MPC5643L, analog to digital conversion, I don't find a clear statement about the reference voltage the ADC uses and which to relate the digital result register readings to:
I understand the MCU reference manual such that the analog supply voltage is the reference voltage at the same time and that this voltage can be chosen as 3.3 V or 5 V. If so, the reference voltage would depend on the external circuitry and for my TRK-USB-MPC5643L it would be 3.3 V.
On the other hand mentions the reference manual the internal analog source VREG_1.2V that is connected to channel 10 of boths ADCs. No further explanation is given on this signal source. The name indicates that it is a constant voltage source of 1.2 V. On my boards this signal is however measured as 1.3 V if I assume the reference voltage as said in the previous paragraph, i.e. as 3.3 V.
Is it correct that signal VREG_1.2V, ADC channel 10, should read as 1.2 V? If so, is it intended to relate all other channels to this reading, like:
const float factor = 1.2f / (float)(ADC_0.CDR.R & 0xfff0);
float u0 = factor * (float)(ADC_0.CDR.R & 0xfff0)
, u1 = factor * (float)(ADC_0.CDR.R & 0xfff0)
, u8 = factor * (float)(ADC_0.CDR.R & 0xfff0);
Is this the way to calibrate the ADC readings in Volt?