Yes.

cat /sys/bus/iio/devices/iio\:device0/in_voltageX_raw is single shot mode.
If you're running in continuous mode you need to read from /dev/iio:device.
So you get this "error" when attempting to use single shot channel files,
when the ADC is operating in continuous mode.

If I were you, I'd just use single shot mode, as ADC reads through iio is
dog slow. single-shot is around 5x or maybe slightly more - faster. iio
*could* be faster if you could figure out how the buffer is structured, and
make it very large( to cut down on system interrupts ). But if you need
"fast" ADC, you'd be better off using either mmap on the ADC registers
directly, or use the PRU's.

On Mon, Oct 26, 2015 at 3:18 PM, Rick Mann <rm...@latencyzero.com> wrote:

> Anyone have any advice on why I can't seem to read the ADC? Thanks!
>
> --------------
>
> What am I missing here?
>
> # uname -r
> 3.8.13-bone72
>
> # pwd
> /sys/bus/iio/devices/iio:device0
>
> # ls
> dev  in_voltage0_raw  in_voltage1_raw  in_voltage2_raw  name  power/
> subsystem@  uevent
>
> # cat in_voltage0_raw
> cat: in_voltage0_raw: Device or resource busy
>
> The fragment from my DTBO:
>
>         fragment@6 {
>                 target = <&tscadc>;
>                 __overlay__ {
>
>                         status = "okay";
>                         adc {
>                                 ti,adc-channels = <0 1 2>;
>                         };
>                 };
>         };
>
> Thanks,
>
> --
> Rick Mann
> rm...@latencyzero.com
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to