Hello, I am using nRF52-DK with Segger Embedded Studio and I'm running the following code that first blinks the LED1 on&off 5 times, and sets up BUTTON1 for wake up, and then enters system off mode.
nrf_gpio_cfg_output(LED_1);
for(int k = 0; k < 10; k++) {
nrf_gpio_pin_toggle(LED_1);
nrf_delay_ms(500);
}
nrf_gpio_cfg_sense_input(BUTTON_1, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
nrf_gpio_pin_clear(LED_1);
while(true) { }
// (BLE code below)
If I run the example, it does seem to eventually enter system off mode because nrf_gpio_pin_clear(LED_1) doesn't get executed (light stays on after having blinked 5 times on&off).
But problem is that when i press BUTTON 1, it doesn't wake up the device (I would expect it to restart, and start blinking LED at start of the code).
What is happening? What can I do to test out this functionality on nRF52-DK?
Thank you for your answers in advance
Best regards