hello,
could anyone tell me how to wake up the CPU after a sd_power_system_off () ?
Thanks.
hello,
could anyone tell me how to wake up the CPU after a sd_power_system_off () ?
Thanks.
Yes, one way is to configure a GPIO pin for wakeup. This is demonstrated in nordic sample applications. They generally go to system off after the long advertising timeout.
Reset sources like power-on reset will also bring a device out of system off.
After learning more about your application, I'd like to recommend this approach to you:
Register your switch/button with the app_button module and when you detect a low to high transition, go into system_off. Before that, run this code: // Configure switch with sense level low as wakeup source. nrf_gpio_cfg_sense_input(YOUR_PIN_NUMBER, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
When the switch level goes back to low, you leave system_off and begin executing code @ the top of main(); Let me know if you have any other concerns.
Howdy: I've updated my question. Alternatively you can power down the whole system with your switch but I can see certain circumstances where you may not want to do that...
Howdy: I've updated my question. Alternatively you can power down the whole system with your switch but I can see certain circumstances where you may not want to do that...