[Bug 211979] On Raspberry Pi, GPIO output pins retain state on halt

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 19 06:13:20 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211979

            Bug ID: 211979
           Summary: On Raspberry Pi, GPIO output pins retain state on halt
           Product: Base System
           Version: 11.0-RC1
          Hardware: arm
               URL: http://mrp3.com
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: bobf at mrp3.com

Running FreeBSD 11.0 RC1 on a Raspbery Pi model 1 'B'

When the Raspberry Pi shuts down, the pins that were selected as outputs appear
to retain their former state, rather than being disabled (or converted to
inputs) on shutdown.  This makes it difficult for a particular add-on board
(the ATX-Raspi) to detect that the system has halted.

As an example, the ATX-Raspi board configures one GPIO as an input, and another
as an output, setting the output level to a '1' state when the helper script
starts.  When the script detects a shutdown or reboot condition, it executes
the appropriate command on the Raspberry Pi to either shut down or reboot.

This web site explains how the board works:

http://hackaday.com/2013/05/19/atx-raspi-is-a-smart-power-source-for-raspberry-pi/

On system halt, however, the GPIO output pin is still configured as an output
with a high level.  So the system never powers off, since the ATX Raspi board
thinks it's still shutting down.  To demonstrate it was doing this, I forced a
reboot by pressing a key on the serial console. The reboot apparently did a
reset all of the GPIO pins, causing the external board to 'detect' a power
down, and it then shut down the power within a few seconds [as it is supposed
to do].  Unfortunately this workaround isn't acceptable.

This board was originally designed to work with a Linux operating system
running on the Raspberry Pi.  The only problem here appears to be that the GPIO
pins are not reset on halt.  It may be possible to make this a kernel option
that could be programmed via the /boot configuration files, in case resetting
them on halt would have any kind of negative impact.

Since the Raspberry Pi has no ATX or ACPI interface available to shut down the
power programatically, an external board like the ATX Raspi needs some way to
easily determine that it is 'safe' to power off the Raspberry Pi.  Resetting
all of the GPIO pins (or making all of them input pins) on halt would make this
work.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list