XIAO BLE Sense in deep sleep mode

[env:adafruit_feather_nrf52840]
platform = nordicnrf52
board = xiao_ble_sense
framework = arduino
lib_deps = 
	adafruit/Adafruit SPIFlash@^4.0.0
	adafruit/SdFat - Adafruit Fork@^2.2.1

Platform.ini looks fine, maybe you are missing the Arduino.h include for your Dx pin defs. Note that when calling nrf api directly through nrf functions, macros or register manipulations you must use nrf pin numbers, these are mapped via the g_ADigitalPinMap global array, e.g. nrfPin = g_ADigitalPinMap[D0]

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

#define PIN_POT   A0
#define PIN_BTN   D7
#define PIN_POT_GND D10