I am trying to activate the option to connect a button as on/off switch to the pi.
Using the "standard" gpio3 connected to ground.
For this to work, the overlay gpio-shutdown is needed
However it seems that this overlay is not loaded, even though it is in /boot/config.txt
Code:
# dtoverlay -l
No overlays loaded
when loading it by hand:
Code:
# dtoverlay gpio-shutdown
* Failed to apply overlay '0_gpio-shutdown' (kernel)
whatś wrong here, and how can I get this feature working?
thanks.
Ok, i did some more digging:
First: The overlay was actually loaded, as can be seen with this command:
dtoverlay -l only shows what is loaded by hand, not what is already loaded over config.txt
gpio3 is apparently not available as it is used by i2c.
With this line in /boot/config.txt it works at least for shutdown:
Code:
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
However I can not start up the pi with this.
Maybe someone could share some insights here?
Thanks
(05-07-2021, 02:01 PM)hjheins Wrote: [ -> ]Ok, i did some more digging:
First: The overlay was actually loaded, as can be seen with this command:
dtoverlay -l only shows what is loaded by hand, not what is already loaded over config.txt
gpio3 is apparently not available as it is used by i2c.
With this line in /boot/config.txt it works at least for shutdown:
Code:
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
However I can not start up the pi with this.
Maybe someone could share some insights here?
Thanks
Try searching this Forum, there are a few threads about power on/off with buttons.
Thank you The_bertrum,
I think I am not clearly formulating what I want to do, and where I am at:
1) Searched this forum
2)Used Google
3)Searched Raspberry and Diet Pi Fora
However the issue is this:
A Raspberry Pi (2/3) supports Startup from GPIO3 with Ground according to the documentation.
However, GPIO3 in Moode seems already to be taken by i2c, so I can not use that one.
Now I can use the gpio_shutdown overlay to Program this button on another GPIO (as in my previous post).
After that, shutdown will work.
However: Shutdown is not what I am mostly interested in: I want to be able to use the Startup / boot feature.
So far I have not found how I can use this one (either by having startup work from another GPIO, which seems not possible, unless I am wrong, or by somehow disabling/killing the i2c and using the default pin; in that case the question would be: how do I do that?)
thanks,
Hendrik-Jan
Can you post a link to this document?
"A Raspberry Pi (2/3) supports Startup from GPIO3 with Ground according to the documentation."
(05-07-2021, 03:33 PM)Tim Curtis Wrote: [ -> ]Can you post a link to this document?
"A Raspberry Pi (2/3) supports Startup from GPIO3 with Ground according to the documentation."
Hi Tim,
yes I can:
Inofficial but with the complete story
references
the source
As for the issue itself: I solved it, because I had a bright moment in my stupidity: I connected it up wrongly (wrong pins; need to get back to kindergarten and start practicing counting again).
As it clearly states: conect a button between GPIO3 and ground, and it works, out of the box. And indeed it does.
To be perfectly clear: this is a sort of a "deep sleep" state that shutdown activates. That way the button can also revice the PI. It is not completely off!
my line in config.txt:
Code:
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
So this one is solved.
thanks,
Hendrik-Jan