Close

More fiddling

A project log for Cheap-O-NAS

A low-cost solid-state NAS with power-loss protection

robgRobG 11/29/2019 at 16:460 Comments

I've found that with a screen plugged into the HDMI output, when pulling the power the RPi instantly reboots. Without a screen, the RPi correctly shuts down cleanly as intended by the gpio-shutdown overlay. No observable difference can be seen in the 'scope traces of the power supply for these two situations, so the rebooting is not being caused by my power management circuit, I don' think.

 - why the heck should having an HDMI screen plugged in make any difference?!

Also, 

dtoverlay=gpio-poweoff,gpiopin=27,active_low=1

  ...works and the Pi drives it from high to low after shut down. But 

dtoverlay=gpio-poweoff,gpiopin=27,active_low=1,input=1

...with the pin as an input normally does not for some reason. The pin correctly turns into an input (apparently without the pull-up I was expecting it to have), but doesn't get driven low after the Pi has shut down. Instead the Pi instantly restarts without shutting down.

However, disconnecting my circuit, and pulling GPIO27 up to 3V3 with just a resistor does work. A low is seen just after (proper) shut down. I suspect somehow GPIO27 is triggering GPIO17 which is programmed to shut the Pi down!

Check the files for a v3 LTSpice circuit with an extra MOSFET switch. This isolates PGOOD from nSHDN to solve this problem, and also drives the ENable (to ensure the dc-dc module is properly off in normal use).

Discussions