arduino icon indicating copy to clipboard operation
arduino copied to clipboard

[request] Allow deep sleep modes

Open lboue opened this issue 1 year ago • 3 comments

Hello,

Is it possible to use the board in deep sleep mode with a battery?

Regards

lboue avatar Feb 26 '24 19:02 lboue

Hello lboue, The deep sleep modes provided by the GSDK are already available: https://docs.silabs.com/gecko-platform/latest/platform-service-power-manager-overview/ In the future we're planning to add support for the Arduino Low Power library as well.

silabs-bozont avatar Mar 03 '24 16:03 silabs-bozont

Since it's related: I've added an example for battery percent reporting via Matter here: https://github.com/SiliconLabs/arduino/pull/51

Looking forward to the low power lib support :)

LorbusChris avatar May 09 '24 19:05 LorbusChris

@silabs-bozont Would you care to share an example on how to implement deep sleep using GSDK in Arduino?

miroslavpetrov avatar May 16 '24 19:05 miroslavpetrov

Hello @miroslavpetrov, The current version already has the Power Manager SDK component in place, so you're able to harness it and go to a low power mode. https://docs.silabs.com/gecko-platform/4.3/platform-service-power-manager-overview/ The easiest way to go to a low power mode is to block the user OS task (the core runs on FreeRTOS underneath). You can block your task by waiting for a mutex/semaphore/queue - or also by calling delay(). When the OS is running the idle task the Power Manager will automatically put the device in the lowest possible sleep mode. It's also advised to turn off peripherals (Serial, Wire, SPI) to allow lower sleep modes. Note, that if you're using a radio stack then it can (and will) periodically wake the MCU.

ArduinoLowPower library support is under development and should be available in the next version which will take care of these for you, but in the meantime you can achieve similar power savings with the tips above.

silabs-bozont avatar May 29 '24 18:05 silabs-bozont

ArduinoLowPower library support is under development and should be available in the next version which will take care of these for you, but in the meantime you can achieve similar power savings with the tips above.

Hello @silabs-bozont

Will you be releasing the new version soon with ArduinoLowPower support?

Regards

lboue avatar Jul 05 '24 05:07 lboue

Hello @lboue, ArduinoLowPower support is now available with 2.1.0. See: https://github.com/SiliconLabs/arduino/tree/main/libraries/ArduinoLowPower

silabs-bozont avatar Aug 01 '24 15:08 silabs-bozont

Thanks @silabs-bozont

lboue avatar Aug 01 '24 20:08 lboue