Hi Team,
How to start with the sleepy code in nRF connect desktop SDK, can anyone provide me a refernce which has clear insights?
Thanks,
Pranathi
Hi Team,
How to start with the sleepy code in nRF connect desktop SDK, can anyone provide me a refernce which has clear insights?
Thanks,
Pranathi
Can you refer me a timer based sleep code?
Hi,
Th enRF Connect SDK includes the Zephyr RTOS, where there is always a idle thread that enters sleep mode when idle. So you do not need to do anything special to enter sleep, other than don't do anything. Note that for instance having a main loop that runs continiously means using the CPU at all times, so if you do, you can for instance wait with k_sleep() to sleep for a specified ammount of time.
Hi,
Can you provide me a sample code for some clear refernece for my side?
I want to use a timer based sleep mechanism as such I want the board to wake up when I am trying to exhibit a functionlity and after executing it my board should go into sleep and wake up when the said functionlity to be executed. And FYI I am using nRF52840 DK.
Thanks,
Pranathi.
Hi,
You can for instance refer to the Blinky sample. This toggles a ledd in a loop and sleeps in between. As nothing else is happening, the system automatically enters system ON low power mode during this time.
As per my previous reply, my requirement is:
My nRF should be in sleep all the time and it should wakeup when I want to implement a funcitonlity and this wakeup should happen with the help of a timer (as in we have 4 timers or 5 timers in nRF52840).
But in the blinky example I am more like in control with the sleep functionlity rather than in control with my functions I want to execute. by default, I want my board to be in sleep mode and by utilizing the timers (TIMER0/TIMEER1/TIMER2/TIMER3..) I want to wake the board up and after it wakes up I want to implement my functions and put my board back to sleep mode.
Thanks,
Pranathi