lwadc calibration procedure

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

lwadc calibration procedure

461 Views
goncaloandre
Contributor I

Hello,

I am trying to use the lwadc api provided with MQX 4.2.0 to read some analog inputs on the Freescale K60, but the documentation is a bit scarce and I have some doubts regarding the calibration function. I am basing myself on the sample code to read the potentiometer provided with mqx.

-Here is recommended to run the calibration procedure using ioctl, but the lwadc does not use file handles. So where should I get this file handler to each adc channel? Can't I just read/write the register (in this case bit CAL on ADCx_SC3) myself?

-Why does the sample aplication have no calibration procedure? Isn't is allways needed?

-When should I do the calibration? After _lwadc_init() and before _lwadc_init_input()?

Thanks in advance.

Goncalo

Tags (3)
1 Reply

336 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Goncalo:

Current BSP not support calibration, please check the init_lwadc.c file. The calibration data pointer is Null.

pastedImage_2.png

Regards

Daniel