I am working on a project that requires GPIO3
be used for I2C.
Unfortunately, this is also the pin that can be used for one button startup/shutdown.
- Wake Pi after
shutdown
,halt
, orpoweroff
- Shutdown Pi safely to avoid corruption
- Does not rely on
GPIO3
(pin 5; I2C1 SCL)
- The
J2
header provides three pins:GLOBAL_EN
(5V),GND
, andRUN
(3V3) - The
GLOBAL_EN
pin will wake/boot the Pi after halt, poweroff, or shutdown states. (2) - Setting
WAKE_ON_GPIO
=0
andPOWER_OFF_ON_HALT
=1
allows the Pi to enter a low power mode when shutdown.
Take advantage of the fact that the 3V3
rail is not powered when the Pi is in low-power mode as an indicator to an external microcontroller to pull GLOBAL_EN
low when a request to power-on is received (reference schematic).
If the 3V3
rail is powered, this will indicate that (a) an otherwise unsused GPIO pin should be pulled low; or (b) the I2C bus can be used to trigger a software-controlled shutdown.