Hi,
I simply added
&tscadc {
status = "okay";
};
&am335x_adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
to the end of am335x-boneblack.dts.
Date: Mon, 23 Mar 2015 15:07:04 -0700
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]
Subject: Re: Reading from ADC hangs
Hi Matti,
Would you please provide details on which dts entries (or maybe a link to the
entire dts file!) you're specifying in order to get ADC working with 3.18?
Thanks!
On Monday, March 2, 2015 at 1:04:39 PM UTC-5, [email protected] wrote:
On Thursday, February 26, 2015 at 5:18:51 PM UTC+2, [email protected] wrote:Hi,
How come in my system, there is no /sys/bus/iio/devices/iio:device0?Under
/sys/bus/iio/devices/, there is only one file iio_sysfs_trigger, which is a
symbolic link to some other directory.Is there any configuration I need to do?I
am using the latest BB black Rev C by Element14. It is OS is 3.8.13-bone47.
Thx.
Hi,
You need to enable the ADC either by enabling the correct "cape" with capemgr
(only in kernel 3.8.*, see e.g.
http://hipstercircuits.com/reading-analog-adc-values-on-beaglebone-black/), or
by enabling it in the .dts-file (later kernels, such as the 3.18.4 which I'm
using).
Matti
On Wednesday, February 25, 2015 at 8:36:18 PM UTC+8, [email protected]
wrote:Thanks for the suggestion. I'll keep that in mind if I need higher
sampling rates. However, I did find a way to read ADC through IIO so that it
doesn't hang.
First set up the channels and the buffer through sysfs:
echo 1 > /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en
echo 256 > /sys/bus/iio/devices/iio\:device0/buffer/length
echo 1 > /sys/bus/iio/devices/iio\:device0/buffer/enable
and then read from /dev/iio:device0. This way I can achieve about 8 kHz
sampling rate with a single channel, 4 kHz with two channels and down to ~300
Hz with all eight channels.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.