This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28M35H52C: Correct use of the ADC.

Part Number: F28M35H52C

Hello.

For the project in which I am working, we need to use the ADC. So far, I did not do any kind of calibration in my code despite of the one that is done within Device_Cal() function that, as far as I understood is just a "fixed" routine that writes always the same values in some registers.

The TRM establishes, regarding the ADC calibration, in 10.3.9: 

"Except under certain emulation conditions, or unless a modification from the factory settings is desired, the user is not required to perform any specific action"

However, in 10.3.9.2 (ADC Zero Offset Calibration) there is an explanation about a function that does the zero offset calibration.

What I understood from these things is that the properly way of using the ADC is to call Device_Cal() function (which is already done in InitSysCtrl()) and, after that and with a certain frequency, to call AdcOffsetSelfCal() function to correct the zero offset. Is this right or it should be done in a different way? Are there other functions that should be executed to get the ADC calibrated? How often should be necessary to call AdcOffsetSelfCal()?

Thanks in advance.

  • Yes, you have the correct understanding. The Device_Cal() function will trim for Gain and Offset errors, but the Offset error can drift with temperature so it is recommended that you perform offset calibration periodically.

    The frequency will vary with your expected rate of temperature change. For example if you have a system that will always run in a temperature controlled lab, you would probably be fine with trimming very infrequently (a few times a day). If you have an outdoor system that is subject to weather and sunlight variations, you would want to trim more frequently (multiple times per hour).