one shot conversion of mxs-lradc iio interface only seems to occur when the file is opened, is this expected behavior?

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

one shot conversion of mxs-lradc iio interface only seems to occur when the file is opened, is this expected behavior?

710 Views
tylerarnold
Contributor II

if I cat the iio file  , I get a different sample every time. For example:

{noformat}

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3471

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3489

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3385

{noformat}

however, if I have a user space program (in C) and I open that file for reading and read it multiple times, the sample stays the same, making me think the file open is triggering the sample, and not the read.

Is this expected? I will dig through the code a bit more but I expect so. Is there a way to configure this driver so I can get samples triggered on each read?

thanks!

-Tyler

Labels (2)
0 Kudos
1 Reply

451 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

As far as i know there is no  ADC driver in user space. Customer should write and develop the driver. The touch resistive driver can be used as reference.

Or this discussion can be very helpful.

Re: LRADC with IMX28

Best Regards,

Alejandro

0 Kudos