SIGBUS on GPIO2 and GPIO3

55 views
Skip to first unread message

Paulo Sherring

unread,
Feb 19, 2015, 10:04:48 AM2/19/15
to beagl...@googlegroups.com
Hello all!
I am trying to use mmap for accessing GPIO's. Currently, I have got GPIO 0 and 1 working. When I try to access GPIO2 and 3, I get SIGBUS.
Even when I devmem at the memories I get SIGBUS (output of devmem):

devmem 0x481AC130
/dev/mem opened.
Memory mapped at address 0xb6f13000.
Bus error

I tried to access the CTRL register, which controls the clocking for GPIO modules, since according to this link https://groups.google.com/forum/#!searchin/beagleboard/sigbus/beagleboard/F-pALQ7dXQU/IkTA5w1K5T4J , using GPIO modules with no clock enabled would lead to SIGBUS, but even still I get SIGBUS.

The setup I am using is the following:
BeagleBone Black  Rev. C
rootfs: Debian wheezy (debian-7.7-console-armhf-2015-01-06)
Kernel: 3.14.26-ti-r43

Thanks in advance.
Paulo Sherring.

Paulo Sherring

unread,
Feb 19, 2015, 2:47:55 PM2/19/15
to beagl...@googlegroups.com
Got this solved following this tip:

https://groups.google.com/forum/#!topic/beagleboard/OYFp4EXawiI
"I had the same problem, I resolved it exporting at least one pin for each GPIO. After that I can access GPIO0, GPIO2 and GPIO3 with mmap.
It's not about pinmux, maybe the problem is the clock.
Try to do this:
# echo 5 > /sys/class/gpio/export
# echo 65 > /sys/class/gpio/export
# echo 105 > /sys/class/gpio/export
You can do it also in C++ or Python.
Luigi Rinaldi."

Paulo Sherring.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/WcN54jKts_4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages