through RTC i am trying it but it is not happening can you give any propre example one for the sleep mode enabling and wakening up from the sleep mode.
through RTC i am trying it but it is not happening can you give any propre example one for the sleep mode enabling and wakening up from the sleep mode.
I would use k_sleep for regular wakeups, and k_cpu_idle if you are going to sleep, just waiting for some event. If that event is a button press, and you are not doing any BLE activity, you can use system off (sys_poweroff()). If it needs to wake up without external sources, use k_sleep() if you are waking on a timer, or k_cpu_idle() if you are waking on something else.
When you are using the softdevice controller for BLE activity, the softdevice will wake up what it needs to to maintain that connection/advertising/scanning. It will wake up the radio core on it's own, and if there is an event that is propagated to the application (incoming data, for instance) then the radio core will wake up the application core.
Best regards,
Edvin