InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.71k stars 926 forks source link

Is it possible to power down / turn off the Pinetime? #201

Closed gillham closed 3 years ago

gillham commented 3 years ago

I haven't found any mention of shutting the watch off. I have seen a few references to waiting until the battery runs dead, but I am assuming there should be some mechanism to actually power off?

Is this possible with the hardware / bootloader / firmware? Simplest use case is something like "airplane mode" by just turning it off completely.

JF002 commented 3 years ago

We sometimes recommend to wait for a full battery drain in order to workaround a firmware/bootloader lock or freeze because that's the only way we have to trig a hardware reset of the MCU.

Pinetime does not have any hardware power button or reset button. The only reset we can issue are watchdog reset and software reset. Watchdog reset is automatically issued by the watchdog if the firmware crashes, but not when it's in bootloader mode. Software reset is trigged by the software when you push the button for 5-10s, but it does not work in bootloader mode or when the firmware is frozen.

So, no, unfortunately, there is no when to hardware reset your pinetime or power it off, this is by hardware design. You can do it manually by issuing a reset via the SWD interface or disconnecting/reconnecting the battery, assuming your unit is not a sealed device.

blaueente commented 3 years ago

I understand the "hardware reset" issue. But the question is also about software "off":

  1. Is there any possibility to turn it "off", i.e. in a state where it deactivates anything it can, to save most power it can, such that it can only be woken by (long-)pressing the button, and it boots again?
  2. Also a 2nd mode of "airplaine" would be cool, such that it just disables Bluetooth, but the user can still use it to, e.g. read the current date and time. For these use cases a software button would be enough.
Avamander commented 3 years ago

@blaueente

Is there any possibility to turn it "off", i.e. in a state where it deactivates anything it can, to save most power it can, such that it can only be woken by (long-)pressing the button, and it boots again?

Some kind of storage mode is doable. Though it is a separate issue and should be discussed under that.