GeorgeFlorian Posted August 13, 2019 Posted August 13, 2019 Armbianmonitor: http://ix.io/1RvX Hello ! I have a Banana Pi M3 that has 0 output on every pin. I measured 0 output using an oscilloscope. I have been on all of the forums I can think of and I got no answer. How can I make the pins of this damned board work like the ones from a Raspberry Pi ? How does one define a pin ? What does defining a pin means ? Because the pins look dead to me. How do I make them start ? How do I make them to output something... anything ? I am a total and complete noob and I have no idea of the kernel voodoo that has to be done. I am using ARMBIAN 5.83 stable Debian GNU/Linux 9 (stretch) 4.19.38-sunxi
martinayotte Posted August 13, 2019 Posted August 13, 2019 3 hours ago, GeorgeFlorian said: I have a Banana Pi M3 that has 0 output on every pin. I measured 0 output using an oscilloscope. Are you sure ? Even with a scope, floating pins will not show any voltage ... Did you try using "gpiofs" ? Example for flashing GPIO147 (PE19 on pin 40) : #!/bin/bash echo 147 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio147/direction while true; do echo 0 > /sys/class/gpio/gpio147/value sleep 0.25 echo 1 > /sys/class/gpio/gpio147/value sleep 0.25 done 1
GeorgeFlorian Posted August 13, 2019 Author Posted August 13, 2019 I can't use echo 101 > /sys/class/gpio/export I have a rather strange error. I am the root and I can't do a thing to export. root@bananapim3:/sys/class/gpio# ls -l total 0 --w------- 1 root root 4096 Jan 1 1970 export lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip0 -> ../../devices/platform/soc/1c20800.pinctrl/gpio/gpiochip0 lrwxrwxrwx 1 root root 0 Jan 1 1970 gpiochip352 -> ../../devices/platform/soc/1f02c00.pinctrl/gpio/gpiochip352 lrwxrwxrwx 1 root root 0 Jun 25 09:35 gpiochip414 -> ../../devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp20x-gpio/gpio/gpiochip414 --w------- 1 root root 4096 Jan 1 1970 unexport root@bananapim3:/sys/class/gpio# echo 101 > /sys/class/gpio/export bash: echo: write error: Invalid argument Also, which one is GPIO 101 ? I can't figure it out. I presume this is the formula for the pin number: (position of letter in alphabet - 1) * 32 + pin number Looking through the pin-out of the Banana Pi M3 I have some weird named pins like: PL10-S-EINT10 PC4 PC4 I hope that PL10-S-EINT10 is actually PL10, and by using the formula I have (12 - 1)*32 + 10 = 362 and that PC4 PC4 is a typo and it should've been PC4 which, using the formula, should be: (3-1)*32+4 = 64 EDIT: I've tried that script with PL10-S-EINT10 which is Pin 7 and I got a signal on the oscilloscope. Also, I can't find PE17 on the Banana Pi3.
GeorgeFlorian Posted August 13, 2019 Author Posted August 13, 2019 It appears that I have some life in the Pins after all. How can I make them "wake-up" on every boot ?
GeorgeFlorian Posted August 13, 2019 Author Posted August 13, 2019 I am back to square one. I fired up the project, after I've made the script with all the pins that I needed and my project still doesn't work. I have put the following lines of code inside /etc/rc.local so that it fires up on every boot: ``` echo 362 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio362/direction echo 68 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio68/direction echo 35 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio35/direction echo 71 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio71/direction echo 81 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio81/direction echo 34 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio34/direction echo 360 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio360/direction echo 64 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio64/direction echo 65 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio65/direction echo 361 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio361/direction echo 66 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio66/direction echo 67 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio67/direction echo 234 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio234/direction ``` I am trying to drive some RGB LED Panels using this library: https://github.com/hzeller/rpi-rgb-led-matrix
martinayotte Posted August 13, 2019 Posted August 13, 2019 2 hours ago, GeorgeFlorian said: Also, I can't find PE17 on the Banana Pi3. My mistake, I fixed the typo : it is PE19 on pin 40 of BPi M3 ...
Recommended Posts