MQX ADC Calibration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX ADC Calibration

761 Views
pk2
Contributor III

Is there a calibration function in MQX for the lwadc?  If there is not, how would I calibrated the adc readings?

0 Kudos
2 Replies

491 Views
soledad
NXP Employee
NXP Employee

Hi

You can use the ADC_IOCTL_CALIBRATE  IOCTL Command, this starts calibration process on a device. Command fails if any channel on a device is opened.

For example:

ioctl( adc_file, ADC_IOCTL_CALIBRATE, NULL );
   _io_tchres_install("tchscr:", &_bsp_tchscr_resisitve_init, adc_file );


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

491 Views
pk2
Contributor III

Thanks soledad.  I has looking for something like "lwadc_calibrate" since my a/d code is based on the example that is included with MQX4.1  The a/d examples in MQX4.0 are not included with MQX 4.1 for some reason.

0 Kudos