I have a BBB Python application (PCBA test fixture) where I am using libpruio, specifically for access to the eCAP pins. Libpruio requires that the universal cape be disabled, but when I needed a UART and I2C, I was able to add those back in using the existing dtbo files from /lib/firmware (shown below) in my uEnv.txt.
uboot_overlay_addr2=/lib/firmware/DP-GPIO-PCBATest-00A0.dtbo (I talk about this below)
Now I want to add an “abort” button to the test fixture since the technicians have reported it takes a lot of time to reset if the board under test locks up. I expect that wiring a pushbutton to a GPIO with an interrupt is the way to handle this, and I’ve been thinking that there are two ways to get there.
- Include another dtbo file to add a single GPIO that I can then access with Adafruit_BBIO (this is where my efforts have focused so far), or
- Figure out how to work with the hardware-based IRQ of the PRU with libpruio (which I’ve been avoiding because it looks even more scary)
I’ve tried to make a custom dtbo by following an example from Derek Molloy (github.com/derekmolloy/boneDeviceTree) and while it compiled and booted OK, I still get the following error when I run a simple test program. The same error as when I tried running the program before I created the dtbo.
kapsul@beaglebone:~/pyDev$ sudo python3 abortTest.py
Traceback (most recent call last):
File “abortTest.py”, line 6, in
ValueError: Set gpio mode failed, missing file or invalid permissions.
Further, when I do the following (with or without the dtbo), I get the following…
kapsul@beaglebone:~/pyDev$ config-pin -q p9.12
P9_12 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_12_pinmux/state
Any input would be appreciated, whether it is correcting me on path 1 or steering me towards path 2. I will happily provide any additional info, but I didn’t want to start uploading stuff until I know what, exactly, will be helpful.