Hello,
I am using nRF Connect SDK v2.9.0. While working on the nRF52840 board, I used sys_poweroff() to put the board in deep sleep mode. But before calling it, I called
Hello,
I am using nRF Connect SDK v2.9.0. While working on the nRF52840 board, I used sys_poweroff() to put the board in deep sleep mode. But before calling it, I called
Yes, I mean system ON idle mode. Does that mean if I need to implement a function that enters the system in this mode, I should call k_sleep for all threads?
Hi,
Yes. As long as some threads have work to do (i.e. is not sleeping), the idle thread will not run. This is the same as for any other RTOS. So if you for insance want to wait/sleep, use k_sleep, as that will allow systme on sleep. If you instead with with for instance a loop (i.e. "busy wait"), the idle thread will not run, and the current consuption will be high. I recommend you go throught the nRF Connect fundamentals and intermediate courses (particularily Lesson 1 – Zephyr RTOS: Beyond the basics of the intemetiade course) to learn about this.