Hello George,
You are right, this function is not documented in the API Reference Manual but you can see the description about this function in the file fsl_adc16_driver.c. The function description is:
/*Function Name : ADC16_DRV_SetCalibrationParam
* Description : Set the calibration parameters for ADC module. These
* parameters can be fetched by launching the process of auto calibration
* or to use some predefined values that filled in the structure of
* "adc16_calibration_param_t". For higher precision, it is recommended to
* execute the process of calibration before initializing the ADC module.
* Since this API may be called before the initialization, it enables the ADC
* clock internally.
*/
Also, you need to call the function ADC16_DRV_GetAutoCalibrationParam before ADC16_DRV_SetCalibrationParam. Its description is above.
/* Function Name : ADC16_DRV_GetAutoCalibrationParam
* Description : Execute the the process of auto calibration and fetch
* the calibration parameters that would be kept in "adc16_calibration_param_t"
* type variable. When executing the process of auto calibration, the ADC
* has been configured internally to work in the situation with highest
* precision. Since this API may be called before the initialization, it enables
* the ADC clock internally.
*/
You can calibrate your ADC just by calling the below code snippet.
#define ADC_INSTANCE (0)
adc16_calibration_param_t userCalConfig;
ADC16_DRV_GetAutoCalibrationParam(ADC_INSTANCE, &userCalConfig);
ADC16_DRV_SetCalibrationParam(ADC_INSTANCE, &userCalConfig);
Please let me know if this information is useful or if I can do anything else for you.
Best regards,
Earl Orlando.
/* If this post answers your question please click over the Correct answer button. */