We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Issue with GPIO 12 ?



  • Thank you both for testing on your side and reporting these remarks. So I have re-routed my PCB with GPIO23...

    @Onion designers: if there is a way to clarify what are the restrictions for GPIO12, I am interested. And same for any other GPIO šŸ™‚



  • Hi,

    little up please as I can see no answer. Are there any restrictions on which GPIOs are actually General Purpose?

    Thanks šŸ™‚



  • I have tested GPIO pins 8 and 12 using the Console and also from the command line using fast-gpio commands.

    Let's just say that for GPIO8, the Console's GPIO Tool is messed up! I established a terminal SSH session in PuTTY, and using fast-gpio commands could set GPIO8 as an output or an input; as an output, I could write HIGH or LOW values to the pin and read these values back again, and as an input the fast-gpio read command reports "1" (HIGH) for input voltages above 1.54V and "0" (LOW) for input voltages below 1.48V. Since the I/O runs off of 2.5V (my 2.5V node was at 2.7V), these are pretty reasonable threshold numbers (though they don't agree with the AR9331 spec, but we can talk about that another time). Oddly enough, the Console's GPIO Tool DOES report the correct logic level of the pin after the Sync button is pressed. I think the Console's GPIO Tool code is to blame. I have today submitted a helpdesk ticket for this issue.

    GPIO12 is just as bizarre! Regardless of the Console's GPIO Tool settings OR fast-gpio commands, the pin is stuck in the INPUT direction and appears electrically as if it has a weak pull-down resistor to ground (though the resistance is voltage-dependent, so I suspect that a FET might be used instead of an actual resistor). If a voltage above 1.54V is presented to the pin, fast-gpio reads show a logical HIGH state, and below 1.48V show the pin as LOW. The Console's GPIO Tool also reports the correct pin logical state after the Sync pin is clicked. I have also submitted a helpdesk ticket for this issue.


  • administrators

    My best guess is that somewhere in the OS these two pins have been hard-coded to only work in the input direction.

    When my plate clears up a little bit, I'll look into it in more detail.



  • @Jeff-Verive Thanks for the update on GPIO pins 8 and 12. Pretty well matches my (less extensive) findings.

    • Regarding GPIO Pin 8
      Implies that it is usable both as an input and an output though I am still puzzled by the existence of the /sys/class/gpio/gpio8 directory and files. Tried deleting these but get an error when doing so. This suggests that it is something in the OS but have no idea what.

    • Regarding GPIO Pin 12
      Implies that it should only ever be used as an INPUT until such time as the Omega people find and provide a resolution



  • Yes, GPIO12 appears to be coded to be an input. perhaps in the mode settings for the AR9331. For now we can PROBABLY use it as a general-purpose input, but I personally would not do so until we at least have schematics for the Omega.

    GPIO8 is a little more confusing to me, mostly because the Atheros AR9331 spec sheet seems to ignore this I/O pin in the section on GPIO registers. This suggests to me that the pin may be reserved for some future functionality. It's probably okay to use GPIO8 for experimenting, but I wouldn't use it in a finished product.



  • @Jeff-Verive Agreed šŸ™‚



  • Any definitive update on the GPIO12 issue?

    The GPIO8 might be used by the Omega as the power LED, see @Boken-Lin's answer here: https://community.onion.io/topic/360/0-0-5-b251-gpio8-vs-others/3. On the other hand, @Lazar-Demin wrote here: http://community.onion.io/topic/395/gpio-pin-12/4 that GPIO27 is used for controlling the power LED and that GPIO8 "is wacky".



  • BTW I can set GPIO12 as output:

    $ cat /sys/devices/virtual/gpio/gpio12/direction
    out
    

    But I cannot set it to HIGH:

    $ echo -n 1 > /sys/devices/virtual/gpio/gpio12/value && cat /sys/devices/virtual/gpio/gpio12/value
    0
    


  • @Matthias-Dietrich Yes šŸ˜ž
    As described by myself and @Jeff-Verive earlier in this topic, something seems to be whacky about GPIO 12 and it can only really be used as an input.

    Also, GPIO 8 appears a bit strange but appears to be usable.

    A sa consequence I avoid using GPIO 12 and GPIO 8


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.