PiSupply / PiJuice

Resources for PiJuice HAT for Raspberry Pi - use your Pi Anywhere
https://uk.pi-supply.com/collections/pijuice/products/pijuice-portable-power-raspberry-pi
GNU General Public License v3.0
440 stars 104 forks source link

Button settings #127

Closed richardquint closed 6 years ago

richardquint commented 6 years ago

I've just started testing a PiJuice and have some questions about the tactile buttons. My intended use is to use a Pi 3 with the PiJuice and an Adafruit PiTFT 3.5" touch screen stacked on it as a sort of portable little computer. That means I will want to be able to power down to as dormant a state as possible and then restart the Pi while it is powered only by the PiJuice.

Right now, with the PiJuice with default settings, the only thing SW1 seems to do is do a complete shutdown after holding the button down for about 22 seconds. Nothing happens with just a single press after it's powered down (supposedly you should get a HARD_FUNC_POWER_ON) nor do I get the SYS_FUNC_HALT_POW_OFF after 10 secconds. I also tried setting SW2and SW3 for SYS_FUNC_HALT_POW_OFF and HARD_FUNC_POWER_ON on just a press, but nothing happens. To restart he Pi after HARD_FUNC_POWER_OFF I have to connect a power source directly to the Pi's microUSB input.

Can you suggest anything for me to try to get things working. Also I would like some expansion on the meaning of the various functions that can be defined (e.g., SYS_FUNC_HALT_POW_OFF vs HARD_FUNC_POWER_OFF) and exactly when each can be used Are the parameters supposed to be measured in milliseconds and how exact are they? I can shut down the Pi from the OS, but the screen will still draw power from the PiJuice the the GPIO pins.

I'm running Raspian Stretch, completely up to date, and have upgraded the PiJuice software to version 1.3.3 and the PiJuice's firmware to version 1.2 (as of today, May 21).

ChristopherRush commented 6 years ago

Your Pi 3 should boot back up after a single press when it has been shutdown from a SYS_FUNC_HALT(10s) or a HARD_FUNC_POWER_OFF(20s). Make sure that System task enabled under System Task tab is checked.

You may want to try a hard reset by removing the battery for 30 seconds without external power connected and also Reset to default configuration under PiJuice HAT Configuration > General.

Note: User functions are now explained under the Button heading

richardquint commented 6 years ago

Thanks, pulling the battery has fixed things. The revised README also is much cleared and answers some of my questions.