Hi Felipe,
Thank you for taking the time to look at this.
A few things about the recommendations that you gave:
1. Compensate offset and gain errors by using the Kinetis ADC self-calibration feature or by microcontroller firmware.
- Initially, this is what we were doing, but the variation of results produced big differences of ADC results from reset to reset. We got around this by storing the entire calibration of the ADC into FlexRAM. This way on start up, it would use the same calibration, and hopefully give us the same accuracy. This helped. We were seeing less egregious differences in the ADC results, but still we see different ADC results every other reset or so.
2. Eliminate the analog-input signal noise.
- We do try our best to eliminate as much noise as possible. We have an algorithm that takes the average of the signal to try and factor out noise.
3. Reduce the noise produced by crosstalk by shielding the analog signals by placing a ground track between signals.
- We are shielding.
4. Try to compensate the temperature drift.
- The room climate is constant. We are not doing anything to the system that would affect the temperature.
One thing that is puzzling, is the difference between ADC0 and ADC2. ADC0 seems to perform much better then ADC2.
The results once the system is running is very consistent. The issue just seems that something changes every time we turn the system off, and on again. Again, both ADC's have unique calibrations that are stored in FlexRAM. Other then the ADC registers, are there any others registers or variables that we are not storing into NVM that could be messing with the results?