Wiring NP - bug - GPIO 0 cannot be manipulated
Posted: Fri Aug 10, 2018 1:09 pm
There is a bug in WiringNP that is included in the "nanopi-neo2_friendlycore-xenial_4.14.52_20180628.img".
This bug did not exist in the WiringNP version included with "nanopi-neo2_friendlycore-xenial_4.14.0_20180511.img"
When I transfer the old WiringNP version to the new image, there is also no problem.
The bug can be reproduced like this:
1) use e.g. etcher to create an SD card with the "nanopi-neo2_friendlycore-xenial_4.14.52_20180628.img"
2) boot the from the SD
3) logon via ssh as root, use password fa
4) run npi-config and disable uart2
5) install WiringNP by running the following commands:
6) use to view the current gpio status
7) change gpio 0 to an output with
8) set gpio 0 high with the following command
9) use to view the current gpio status
there will be no change to gpio 0
if you repeat the commands for e.g. gpio 2 it works perfectly well. Also in the old version it worked for gpio 0.
This bug did not exist in the WiringNP version included with "nanopi-neo2_friendlycore-xenial_4.14.0_20180511.img"
When I transfer the old WiringNP version to the new image, there is also no problem.
The bug can be reproduced like this:
1) use e.g. etcher to create an SD card with the "nanopi-neo2_friendlycore-xenial_4.14.52_20180628.img"
2) boot the from the SD
3) logon via ssh as root, use password fa
4) run npi-config and disable uart2
5) install WiringNP by running the following commands:
Code: Select all
cd /root/WiringNP/
chmod 755 build
./build
6) use
Code: Select all
gpio readall
7) change gpio 0 to an output with
Code: Select all
gpio mode 0 out
8) set gpio 0 high with the following command
Code: Select all
gpio write 0 1
9) use
Code: Select all
gpio readall
there will be no change to gpio 0
Code: Select all
root@NanoPi-NEO2:~# uname -a
Linux NanoPi-NEO2 4.14.0 #25 SMP Fri May 11 16:57:53 CST 2018 aarch64 aarch64 aarch64 GNU/Linux
root@NanoPi-NEO2:~# gpio write 0 1
root@NanoPi-NEO2:~# gpio readall
+-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
| | | 3.3V | | | 1 || 2 | | | 5V | | |
| 12 | 8 | GPIOA12 | ALT5 | 0 | 3 || 4 | | | 5V | | |
| 11 | 9 | GPIOA11 | ALT5 | 0 | 5 || 6 | | | 0v | | |
| 203 | 7 | GPIOG11 | OFF | 0 | 7 || 8 | 0 | ALT5 | GPIOG6 | 15 | 198 |
| | | 0v | | | 9 || 10 | 0 | ALT5 | GPIOG7 | 16 | 199 |
| 0 | 0 | GPIOA0 | OUT | 0 | 11 || 12 | 0 | IN | GPIOA6 | 1 | 6 |
| 2 | 2 | GPIOA2 | OUT | 0 | 13 || 14 | | | 0v | | |
| 3 | 3 | GPIOA3 | OUT | 0 | 15 || 16 | 0 | OUT | GPIOG8 | 4 | 200 |
| | | 3.3v | | | 17 || 18 | 0 | OUT | GPIOG9 | 5 | 201 |
| 64 | 12 | GPIOC0 | ALT4 | 0 | 19 || 20 | | | 0v | | |
| 65 | 13 | GPIOC1 | ALT4 | 0 | 21 || 22 | 0 | OUT | GPIOA1 | 6 | 1 |
| 66 | 14 | GPIOC2 | ALT4 | 0 | 23 || 24 | 1 | OUT | GPIOC3 | 10 | 67 |
+-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+
+-----+----NanoPi-NEO2 USB/Audio-+----+
| BCM | wPi | Name | Mode | V | Ph |
+-----+-----+----------+------+---+----+
| | | 5V | | | 25 |
| | | USB-DP1 | | | 26 |
| | | USB-DM1 | | | 27 |
| | | USB-DP2 | | | 28 |
| | | USB-DM2 | | | 29 |
| | | IR-RX | | | 30 |
| 17 | 19 | GPIOA17 | OFF | 0 | 31 |
| | | PCM/I2C | | | 32 |
| | | PCM/I2C | | | 33 |
| | | PCM/I2C | | | 34 |
| | | PCM/I2C | | | 35 |
| | | 0V | | | 36 |
+-----+-----+----------+------+---+----+
+-----+----NanoPi-NEO2 Debug UART-+----+
| BCM | wPi | Name | Mode | V | Ph |
+-----+-----+----------+------+---+----+
| 4 | 17 | GPIOA4 | ALT5 | 0 | 37 |
| 5 | 18 | GPIOA5 | ALT5 | 0 | 38 |
+-----+-----+----------+------+---+----+
if you repeat the commands for e.g. gpio 2 it works perfectly well. Also in the old version it worked for gpio 0.