Cannot access pin 26 only with MRAA
I have installed up kernel and resolve permission issue but I still can't access pin 26. Every time I invoke mraa-gpio get 26
in terminal it returns Could not initialize gpio 26
. Every other pin I tried is working fine. My Up board is new and I never mess around with pin 26. Can somebody confirm this on their Up board?
Comments
-
From
cat /sys/kernel/debug/gpio
I get:gpio-7 ( |cs ) out hi
Which mean pin 26 or
gpio-7
is used by processcs
. Does that mean I can't use pin 26 for input/output? Or I can just kill processcs
. -
As you can see from our wiki: https://wiki.up-community.org/Pinout
the pin 26 is SPI_CS1 feature by default.
You would need first to export the PIN as GPIO (pin26 is Linux GPIO 7): https://wiki.up-community.org/Pinout#GPIO
-
@DCleri said:
You would need first to export the PIN as GPIO (pin26 is Linux GPIO 7): https://wiki.up-community.org/Pinout#GPIOI tried that but since is being used by
cs
driver module the commandsudo echo 7 > /sys/class/gpio/export
returnecho: write error: Device or resource busy
. I don't knowcs
driver module came from and I can't kill it. I do all this in fresh reboot. -
it seems to be stuck with the SPI chip select function.
We have just verified and we are able to replicate the issue on both 4.15 and the newer 5.0 kernel.
The issue only happens on UP Board (not on UP Squared or UP Xtreme) which is using a legacy pinctrl driver.We would need some time to debug internally, but we will keep you posted.