EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Beagle Bone Black ADC Driver under Debian?

Started by Randy Yates August 7, 2014
Hi Folks,

I need to sample multiple input lines on the BBB (rev. c) ADC peripheral
at a relatively low rate, perhaps 1 kHz, and do some simple filtering
and detection.

Is there a kernel mode driver available for this that I can modify? Is
kernel mode even necessary or can I use a user space driver?
-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com
On 7.8.14 16:03, Randy Yates wrote:
> Hi Folks, > > I need to sample multiple input lines on the BBB (rev. c) ADC peripheral > at a relatively low rate, perhaps 1 kHz, and do some simple filtering > and detection. > > Is there a kernel mode driver available for this that I can modify? Is > kernel mode even necessary or can I use a user space driver?
There seems to be a built-in driver, just Google for 'beagle bone black adc'. I got about 40000 responses, with the first pretty relevant. -- Tauno Voipio
Randy Yates wrote:
> Hi Folks, > > I need to sample multiple input lines on the BBB (rev. c) ADC peripheral > at a relatively low rate, perhaps 1 kHz, and do some simple filtering > and detection. > > Is there a kernel mode driver available for this that I can modify? Is > kernel mode even necessary or can I use a user space driver? >
There should just be a file you can open and read. http://beaglebone.cameon.net/home/reading-the-analog-inputs-adc For 1 kHz, you may want to go faster than that. I don't know that you can just open it once, rewind the file and issue a read once every millisecond. But there's additonal detail here: http://www.gigamegablog.com/2012/01/22/beaglebone-coding-101-using-the-serial-and-analog-pins/ -- Les Cargill
Les Cargill <lcargill99@comcast.com> writes:

> Randy Yates wrote: >> Hi Folks, >> >> I need to sample multiple input lines on the BBB (rev. c) ADC peripheral >> at a relatively low rate, perhaps 1 kHz, and do some simple filtering >> and detection. >> >> Is there a kernel mode driver available for this that I can modify? Is >> kernel mode even necessary or can I use a user space driver? >> > > > There should just be a file you can open and read. > > http://beaglebone.cameon.net/home/reading-the-analog-inputs-adc > > For 1 kHz, you may want to go faster than that. I don't know that you > can just open it once, rewind the file and issue a read once every > millisecond. > > But there's additonal detail here: > http://www.gigamegablog.com/2012/01/22/beaglebone-coding-101-using-the-serial-and-analog-pins/
Les, Thanks for that, but these examples are mere toys. If the ADC peripheral TI put on the BBB is similar to the one on the TMS320F28x, then there is a ton of setup required including clock rates, buffering, etc., that none of these extremely simple "read a /sys/device to get a voltage" come near. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com

The 2024 Embedded Online Conference