That's what I thought something like that, I've got this setup designed for the Pi 5 and when I checked to see if this was still the case for GPIO 14 it never went high and I wasn't expecting it to. So I'm working on my own solution to this and I came across this in the OverlaysGPIO14 is the UART TX line. If the UART is enabled it idles high and goes low during the shutdown process. No idea exactly when during that process though and I've not tried that approach since the days of the B+.
So what I want to do is either use this overlay directly or if it makes sense to do so merge it with an overlay I'm going to write to enable this feature. The question is does this transfer to other OS for the Pi 5 or is this strictly for the Raspberry Pi OS? Or can I write something that will Drive GPIO 14 high at shutdown after I've signalled I intend to power off and the micro controller can watch for GPIO to go low after the Pi shuts down.Name: gpio-poweroff
Info: Drives a GPIO high or low on poweroff (including halt). Using this
overlay interferes with the normal power-down sequence, preventing the
kernel from resetting the SoC (a necessary step in a normal power-off
or reboot). This also disables the ability to trigger a boot by driving
GPIO3 low.
The GPIO starts in an inactive state. At poweroff time it is driven
active for 100ms, then inactive for 100ms, then active again. It is
safe to remove the power at any point after the initial activation of
the GPIO.
Users of this overlay are required to provide an external mechanism to
switch off the power supply when signalled - failure to do so results
in a kernel BUG, increased power consumption and undefined behaviour.
Load: dtoverlay=gpio-poweroff,<param>=<val>
I understand the BUG and the idea is I've already got the ability to read a signal on GPIO 14 and I have the ability to cut power to the Pi All I need to do is write the software that will run on the hardware and the daemon to run on the Pi.
Statistics: Posted by DarkElvenAngel — Mon Apr 22, 2024 8:06 pm