0

On a standard Raspberry Pi Zero W, with Debian Jessie, I have no problem using the Wiring Pi GPIO command line utility. Wiring Pi was installed using git, following the Wiring Pi website's guide.

Now, on the same Pi, but build using Buildroot, I can set the pin mode, but writing to the pins doesn't work.

Also, quite strangely, the gpio allreadall output does show all values Low and all Modes default to IN:

# gpio -v
gpio version: 2.42
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi Zero-W, Revision: 01, Memory: 512MB, Maker: Sony
  * Device tree is enabled.
  *--> Raspberry Pi Zero W Rev 1.1
  * This Raspberry Pi supports user-level GPIO access.

# gpio mode 6 out
# gpio write 6 1
# gpio allreadall
+-----+------+-------+      +-----+------+-------+
| Pin | Mode | Value |      | Pin | Mode | Value |
+-----+------+-------+      +-----+------+-------+
|   0 | IN   | Low   |      |  27 | IN   | Low   |
|   1 | IN   | Low   |      |  28 | IN   | Low   |
|   2 | IN   | Low   |      |  29 | IN   | Low   |
|   3 | IN   | Low   |      |  30 | IN   | Low   |
|   4 | IN   | Low   |      |  31 | IN   | Low   |
|   5 | IN   | Low   |      |  32 | IN   | Low   |
|   6 | IN   | Low   |      |  33 | IN   | Low   |
|   7 | IN   | Low   |      |  34 | IN   | Low   |
|   8 | IN   | Low   |      |  35 | IN   | Low   |
|   9 | IN   | Low   |      |  36 | IN   | Low   |
|  10 | IN   | Low   |      |  37 | IN   | Low   |
|  11 | IN   | Low   |      |  38 | IN   | Low   |
|  12 | IN   | Low   |      |  39 | IN   | Low   |
|  13 | IN   | Low   |      |  40 | IN   | Low   |
|  14 | IN   | Low   |      |  41 | IN   | Low   |
|  15 | IN   | Low   |      |  42 | IN   | Low   |
|  16 | IN   | Low   |      |  43 | IN   | Low   |
|  17 | IN   | Low   |      |  44 | IN   | Low   |
|  18 | IN   | Low   |      |  45 | IN   | Low   |
|  19 | IN   | Low   |      |  46 | IN   | Low   |
|  20 | IN   | Low   |      |  47 | IN   | Low   |
|  21 | IN   | Low   |      |  48 | IN   | Low   |
|  22 | IN   | Low   |      |  49 | IN   | Low   |
|  23 | IN   | Low   |      |  50 | IN   | Low   |
|  24 | IN   | Low   |      |  51 | IN   | Low   |
|  25 | OUT  | Low   |      |  52 | IN   | Low   |
|  26 | IN   | Low   |      |  53 | IN   | Low   |
+-----+------+-------+      +-----+------+-------+

Same output on Debian Jessie:

$ gpio -v
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi Zero-W, Revision: 01, Memory: 512MB, Maker: Sony
  * Device tree is enabled.
  *--> Raspberry Pi Zero W Rev 1.1
  * This Raspberry Pi supports user-level GPIO access.

$ gpio mode 6 out
$ gpio write 6 1
$ gpio allreadall
+-----+------+-------+      +-----+------+-------+
| Pin | Mode | Value |      | Pin | Mode | Value |
+-----+------+-------+      +-----+------+-------+
|   0 | IN   | High  |      |  27 | IN   | Low   |
|   1 | IN   | High  |      |  28 | ALT0 | High  |
|   2 | ALT0 | High  |      |  29 | ALT0 | High  |
|   3 | ALT0 | High  |      |  30 | ALT3 | Low   |
|   4 | IN   | High  |      |  31 | ALT3 | Low   |
|   5 | IN   | High  |      |  32 | ALT3 | High  |
|   6 | IN   | High  |      |  33 | ALT3 | High  |
|   7 | OUT  | High  |      |  34 | ALT3 | Low   |
|   8 | OUT  | High  |      |  35 | ALT3 | High  |
|   9 | ALT0 | Low   |      |  36 | ALT3 | High  |
|  10 | ALT0 | Low   |      |  37 | ALT3 | High  |
|  11 | ALT0 | Low   |      |  38 | ALT3 | High  |
|  12 | IN   | Low   |      |  39 | ALT3 | High  |
|  13 | IN   | Low   |      |  40 | OUT  | Low   |
|  14 | IN   | Low   |      |  41 | OUT  | High  |
|  15 | IN   | High  |      |  42 | IN   | Low   |
|  16 | IN   | Low   |      |  43 | ALT0 | Low   |
|  17 | IN   | Low   |      |  44 | OUT  | Low   |
|  18 | ALT0 | High  |      |  45 | OUT  | High  |
|  19 | ALT0 | High  |      |  46 | IN   | Low   |
|  20 | ALT0 | Low   |      |  47 | OUT  | Low   |
|  21 | ALT0 | Low   |      |  48 | ALT0 | Low   |
|  22 | IN   | Low   |      |  49 | ALT0 | High  |
|  23 | IN   | Low   |      |  50 | ALT0 | High  |
|  24 | IN   | Low   |      |  51 | ALT0 | High  |
|  25 | OUT  | High  |      |  52 | ALT0 | High  |
|  26 | IN   | Low   |      |  53 | ALT0 | High  |
+-----+------+-------+      +-----+------+-------+

Does Wiring Pi require any kernel modules, libraries, overlays, etc? What is happening here?

1 Answer 1

0

Reason why it doesn't work: The used version, 2.42, is not compatible with the Raspberry Pi Zero-W, this is fixed in version 2.44.

Reason why you have version 2.42 when using Buildroot: is that the versions are incorrectly tagged at http://git.drogon.net, where both 2.42 and 2.44 point to the same commit, this causes Buildroot to pull version 2.42, even when configured to use 2.44.

Fix: Use version 2.44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.