How to get GPIO interrupts working?

jwessel
jwessel New Member Posts: 11

Out of the box it doesn't seem as if there is any possibility to make interrupt driven GPIO work using RPi.GPIO. I created a simple program to poll the input at the expense of significant CPU and it works fine, so the circuits that go into the board are working (they work on an actual Raspberry Pi correctly as well).

Is there something wrong with the board or is this just not supported?

[email protected]:~$ uname -a
Linux ubuntu 4.10.0-9-upboard #11~16.04.1 SMP Wed Oct 25 17:10:46 IST 2017 x86_64 x86_64 x86_64 GNU/Linux

echo 23 > /sys/class/gpio/export

[email protected]:~# ls -l /sys/class/gpio/gpio23/
total 0
-rw-r--r-- 1 root root 4096 Jan 3 16:26 active_low
lrwxrwxrwx 1 root root 0 Jan 3 16:26 device -> ../../../gpiochip4
-rw-r--r-- 1 root root 4096 Jan 3 16:26 direction
drwxr-xr-x 2 root root 0 Jan 3 16:26 power
lrwxrwxrwx 1 root root 0 Jan 3 16:26 subsystem -> ../../../../../../../class/gpio
-rw-r--r-- 1 root root 4096 Jan 3 16:26 uevent
-rw-r--r-- 1 root root 4096 Jan 3 16:26 value

Am I supposed to see an entry for "edge" here? It seems that the RPi.GPIO is using the sysfs instead of accessing a memory mapped region of the kernel. I could not locate the source package that correlated with the kernel the board came with so further debugging was not possible with in the kernel. Is there an apt-get command or git tree we can pull down that matches the binaries the board ships with?

Best Answers

Answers