I am using python to access GPIO. I can pull the GPIO value but it does not work very well. There are discusses in this group about the GPIO but it does not work for me. Maybe you can point out my problem.
My kernel setup are as following. I can get response from USER button in the file /dev/event0. But the following setup will not give me any response in the file /dev/event0.
Thanks for your help
ttk rpink wrote:
I am using python to access GPIO. I can pull the GPIO value but it does not
work very well. There are discusses in this group about the GPIO but it does
not work for me. Maybe you can point out my problem.
I'm currently working on the same problem.
It seems like the GPIO module simply misses most of the interrupts and
the input/event system gets confused beyond beeing usable. You can see
this if you cat /proc/interrupts. The gpio-interrupt should be listed,
and the interrupt should increase each time you press or release the
button. Not more, not less (unless you've hooked up something else on
I've already traced this down to a bug in the interrupt handling code of
linux-2.6.29. I find a kernel-version or patch-set that has the bug
fixed I'll let you know. There are patches out there that apparently fix
the problem, but I'm not sure if they ever made it into the official
If anyone else has missed interrupts and thinks he is affected: Any
interrupt higher than 63 may have the same issue.
Thanks for you explanation. I did find the pin I defined in the interrupt list. The user button number did increase each time I press it. The GPIO I defined did not increase. However, it was not “0”. It was 3. Did the “3” come from the system init?
Just found the solution.
There are 4 files related to the GPIO stuff. They are mux.h, mux.c, devices.c and board-omap3beagle.c. When you add your own gpio, for example GPIO133, you HAVE TO comment out all the lines related to MMC_DAT1.
Once all the MMC_DAT1 is disabled, you can access your GPIO133 through /dev/input/event0 just like the user button. And you can see the /proc/interrupts number jumps again.