The code below uses inotify to watch an input pin and trigger when the
"value" of the pin changes. Copy the code to inotify.c then:
To build it:
gcc inotify.c -lpthread -o inotify
To run it:
./inotify /sys/class/gpio/gpio26/value
In this example gpio26 is set up as an input and
Have you tried booting with the most recent Debian IoT image? If this
works then you can eliminate hardware problems. Is there a reason you want
to use a 4 year old kernel?
On Friday, December 22, 2017 at 9:50:24 AM UTC-6, vinker vinker wrote:
>
> Hi,
> I got a BBB a few days ago. It
debian@beaglebone:~$ uname -a
Linux beaglebone 4.4.91-ti-r133 #1 SMP Tue Oct 10 05:18:08 UTC 2017 armv7l
GNU/Linux
debian@beaglebone:~$ sudo apt-get install am335x-pru-package [sudo]
password for debian: Reading package lists... Done Building dependency tree
Reading state information... Done
As far as I can tell there is no support in the Debian kernel for the eCAP
feature. You can use eCAP to output a PWM signal but I can't find anything
that supports the eCAP capture feature.
On Tuesday, November 28, 2017 at 8:44:53 AM UTC-6, Jason Kridner wrote:
>
>
>
> On Nov 28, 2017, at
I wrote a C program that uses inotify to watch the gpioxx/value file. It
can see changes up to 20kHz, so 3kHz should be no problem at all.
On Tuesday, November 28, 2017 at 8:44:53 AM UTC-6, Jason Kridner wrote:
>
>
>
> On Nov 28, 2017, at 12:50 AM, Drew Fustini > wrote:
>
Using C code and the inotify interface, I was able to capture GPIO pulses
on "/sys/devices/platform/ocp/44e07000.gpio/gpio/gpio26/value" up to
20kHz. It would be nice to use the eCAP registers though. Thanks for the
feedback.
On Friday, December 15, 2017 at 2:25:57 PM UTC-6, Dennis Lee
I would like to use the eCap feature to measure the frequency of a square
wave, preferably with Python. I see examples for generating a square wave
using the BBIO.PWM module but I can't find anything for reading the eCap.
The BBIO.Encoder module looks promising. Can I use this to measure the