XIAO BLE Sense in deep sleep mode

Here is my code that’s what fe7565 explained in reply #68.

#include <Arduino.h>
#include <bluefruit.h>

void setup()
{
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
__WFE();
__WFI();
sd_app_evt_wait() ; //SOFT DEVICE “SYSTEM ON” POWER SAVE

NRF_POWER->SYSTEMOFF = 1;
}

void loop()
{
}

Important thing is NOT to select ‘Seeed nRF52 mbed-enabled Board’, but to select ‘Seeed nRF52 Board’.

2 Likes