Hi all
I am using nrf52840 kit, and I have a simple BLE app(client/central that turn LED on to a connected server/peripheral) running on it(sdk 15.3). Now I want to put it on deep sleep(SYSTEM OFF) by default. When a button is pushed, then it will connect to the nearby server-peripheral kit and turn the LED on that server.So it is simply that the client will come out of deep sleep only when a button is pushed.
I have looked around for an example to get started with no luck.But so far I have learned that I can use sd_power_system_off() to put it to sleep. Based on my findings I have the following questions
- It seems like I have to prepare to wake up buttons and turn peripherals off, but how do I do this?
- Where do I place the function for deep sleep in Main.c (see code snippet below)?
- Any example that would help me get started, I would greatly appreciate it.
I found this post but still is not that informative