Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] Allow deep sleep modes #28

Open
lboue opened this issue Feb 26, 2024 · 4 comments
Open

[request] Allow deep sleep modes #28

lboue opened this issue Feb 26, 2024 · 4 comments
Assignees

Comments

@lboue
Copy link

lboue commented Feb 26, 2024

Hello,

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

Regards

@silabs-bozont
Copy link
Collaborator

silabs-bozont commented Mar 3, 2024

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 silabs-bozont self-assigned this Mar 3, 2024
@lboue lboue changed the title [Feature request] Is it possible to use a deep sleep mode? [request] Is it possible to use a deep sleep mode? May 7, 2024
@lboue lboue changed the title [request] Is it possible to use a deep sleep mode? [request] Allow deep sleep modes May 7, 2024
@LorbusChris
Copy link

Since it's related: I've added an example for battery percent reporting via Matter here: #51

Looking forward to the low power lib support :)

@miroslavpetrov
Copy link

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

@silabs-bozont
Copy link
Collaborator

silabs-bozont commented May 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants