neilneil2000
Posts: 13
Joined: Sun Sep 24, 2017 1:38 pm

[SOLVED] Pi Zero W - Booting with GPIO3

Thu Oct 05, 2017 1:54 pm

I have read in multiple places including the documentation for gpio-shutdown that driving GPIO3 (Physical 5) low should cause the Pi to boot, however I am unable to get this to work.

Can anyone confirm whether this functionality is present on the Pi Zero W?

P.s. I am aware I can use the RUN header to trigger a boot.
Last edited by neilneil2000 on Sat Oct 14, 2017 4:06 pm, edited 1 time in total.

DirkS
Posts: 7548
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi Zero W - Booting with GPIO3

Thu Oct 05, 2017 5:07 pm

Can't see why this wouldn;t work on a Zero.

Does it work for shutdown without boot?
Do you need the UDEV rule?
Do you have I2C enabled? This also uses GPIO3, so maybe it could interfere.

B.Goode
Posts: 4401
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pi Zero W - Booting with GPIO3

Thu Oct 05, 2017 6:56 pm

Just tested. Works fine for me.

PiZeroW, running Raspbian Stretch lite. Accessed remotely via ssh. OS halted with

Code: Select all

sudo shutdown -h now
Wait for 10 regular flashes followed by longer final flash. Then short Header Pin 5 to Pin 6 - led blinks to acknowledge the reset, then continues to reboot the full OS.

neilneil2000
Posts: 13
Joined: Sun Sep 24, 2017 1:38 pm

Re: Pi Zero W - Booting with GPIO3

Fri Oct 06, 2017 4:03 pm

The shutdown aspects works fine and I have the udev rule in place, just not the boot on shorting physical 5 and 6.

I have enabled and disabled the I2C interface on raspi-config, and used "gpio readall" to confirm GPIO3/Phys5 is in INPUT mode.

neilneil2000
Posts: 13
Joined: Sun Sep 24, 2017 1:38 pm

Re: Pi Zero W - Booting with GPIO3

Sun Oct 08, 2017 11:55 am

Is there anything I can do or check to try to resolve this?

B.Goode
Posts: 4401
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pi Zero W - Booting with GPIO3

Sun Oct 08, 2017 12:29 pm

Even if it is not what you finally hope to use, could I suggest you try to replicate what I did and experiment with an unmodified installation of Raspbian Stretch?

The logic being that if that works it must be something you are changing that is causing the problem, and you can then focus just on those modifications.

neilneil2000
Posts: 13
Joined: Sun Sep 24, 2017 1:38 pm

Re: Pi Zero W - Booting with GPIO3

Thu Oct 12, 2017 4:10 pm

:ugeek: :geek: VICTORY IS MINE!!! :geek: :ugeek:

It is the gpio-poweroff overlay that prevents the GPIO3 boot function from working.

The gpio-poweroff overlay allows a pin to be held either high or low after shutdown has completed. It appears that this causes the Pi to stop before it completely turns off and so it is not in a state to accept the GPIO3 low transition for a boot.

Thank you for your help :)

User avatar
rpdom
Posts: 11568
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Pi Zero W - Booting with GPIO3

Thu Oct 12, 2017 4:39 pm

Which pin are you using for the gpio-poweroff?

User avatar
rpdom
Posts: 11568
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Pi Zero W - Booting with GPIO3

Thu Oct 12, 2017 6:21 pm

Hmm, curious. I installed the latest Raspbian Stretch Lite on a Pi Zero with a Zero4U board attached, updated it, set gpio-poweroff to use GPIO 21, ran poweroff and it got to the power off message and then did a kernel panic.

I would investigate more, but I'm off to Sweden first thing tomorrow morning and going through the last minute packing crisis right now.

neilneil2000
Posts: 13
Joined: Sun Sep 24, 2017 1:38 pm

Re: Pi Zero W - Booting with GPIO3

Fri Oct 13, 2017 3:06 pm

@rpdom - Hello Essex! I am just over the northern border :)

I believe the kernel panic is "expected behaviour" as the poweroff script stops the Pi from completely shutting down and I believe there is a timer in the kernel which fires a panic as things haven't turned off in time.

I don't have a console connection on mine at the moment, but I do remember looking into this with Jessie earlier in the year.

FYI - I used the default pin - GPIO26 (Physical 37)

Return to “Beginners”

Who is online

Users browsing this forum: tpaulick and 37 guests