Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2016 06:13:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 211979] On Raspberry Pi, GPIO output pins retain state on halt
Message-ID:  <bug-211979-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211979

            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@FreeBSD.org
          Reporter: bobf@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 ap=
pear
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 ano=
ther
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-raspbe=
rry-pi/

On system halt, however, the GPIO output pin is still configured as an outp=
ut
with a high level.  So the system never powers off, since the ATX Raspi boa=
rd
thinks it's still shutting down.  To demonstrate it was doing this, I force=
d 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 suppos=
ed
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 resetti=
ng
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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211979-7>