3

Problem:

I have a Raspi 3B rev: a02082 (Q1 2016 3 Model B 1.2 1 GB (Mfg by Sony)) running raspbian jessie kernel 4.9.35-v7

I want to signal to a power management circuit that filesystems have been un-mounted and now we can remove the power from the raspberry pi.

The

dtoverlay=gpio-poweroff,active_low=y

option when set in /boot/cmdline.txt is supposed to drive GPIO26 low after shutdown.

However, watching the pin on a scope, it stays at 0 volt irrespective of the state of the Pi (booted/shutdown)

I have tried changing the pin numbers in the dtoverlay=gpio-poweroff parameters, also I have tried with and without the active_low option.

The GPIO pin is functional - because if I test with: echo "26" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio26/direction echo "1" > /sys/class/gpio/gpio26/value I can see the pin go high on the oscilloscope.

Questions

  • 1: Why might it not be working?
  • 2: How can we debug the overlay?
  • 3: Should we expect a spike/edge on the pin by the overlay on shutdown - or a continuous low/high?
saraf
  • 571
  • 1
  • 5
  • 12

2 Answers2

1

It MIGHT have something to do with:-

    active_low              Set if the power control device requires a
                            high->low transition to trigger a power-down.
                            Note that this will require the support of a
                            custom dt-blob.bin to prevent a power-down
                            during the boot process, and that a reboot
                            will also cause the pin to go low.

Frankly I have never been able to make head nor tail of this cryptic "documentation", but it works perfectly on my Pi without using this parameter.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

I have had both of these work to force pin 17 low after shutdown. Not sure if this will work for your situation or with any other pins.

option 1. edit /boot/config.txt add this

dtoverlay=gpio-poweroff,gpiopin=17,active_low=1

option 2 run this from command line

sudo dtoverlay -v gpio-poweroff gpiopin=17 active_low=1
don bright
  • 101
  • 2