I am working on getting edge detected GPIO interrupts working on a WP7702 module. This would be inside a Linux kernel driver. Loading the module I have written had no luck. So, I’ve been trying to step through it in user space first, also with no luck.
At the suggestion of the previous post on the forum ((Cross post) Detecting edges on SysFS pins by @dfrey ) I switched from my initial attempt at GPIO22 (which is available on the Raspberry Pi header) to GPIO36. However, when attempting the “at+wiocfg=36,16”, I discovered that it appears that GPIO36 is not present on a WP7702 module? Output from at+wiocfg? is:
at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 6,0,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,3,4,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0
OK
Note that GPIO36 is not present. Doing “at+wiocfg=36,16” results in an error.
You’ll notice from the above output that I tried allocating GPIO22 to the CF3 module, configuring it with a pull-up, and edge triggered on the falling edge. Grounding the pin (or tying it to +3.3volts - this is on the Raspberry Pi header so that’s safe) does not result in the “at!gpioint” unsolicited notification.
I guess I have three questions: 1) Have I screwed this up somehow? Code for the (very short) kernel driver is here: https://gitlab.bigw.org/fgodfrey/arduino_i2c_keyboard (yes, I know I can’t printk() from an interrupt, but that’ll work fine for testing). 2) Did I correctly interpret the previous forum post on this subject correctly that only GPIO’s 36, 38 and 39 can trigger an actual Linux interrupt? 3) If I have done this all correctly, is there any way to do asynchronous I/O on the WP7702 with a MangOH Red?