Is it possible to use the RST switch for another action on the Xiao Sense nRF52840? I wanted to use it as an ON/OFF switch, where OFF would be deep sleep:
// Put device into deep sleep mode
NRF_POWER->SYSTEMOFF = 1;
Based on the schematic, and an excerpt of the schematic below, it doesn’t seem possible. But I wanted to double check. Thanks
Reset Button schematic section:
maybe the boot button could be programmed… but probably not the reset… lets see what PJGlasso has to say about it!
Hi there,
So if you checkout the Datasheet , section 5.3.3 speaks on reset and Power supply
But if I read your intention the point is moot, really because in Deep Sleep, guess what
It can only be restored by reset. so
LOL, just use a power switch on the battery or even better the Xiao Grove expansion board it has one on board, plus a bonus you can add more Flash if needed. Check out the demo I posted on it.
short answer is NO
HTH
GL PJ
BTW, you can read a register to see why it was reset if that adds anything to your function.
2 Likes
Thanks - so it actually seems the RESET button can be used as an ON switch because it’s the only way out of Deep Sleep (if you consider this OFF)
My project does not have room for a switch due to its size, so this is a workable solution for me
It is a shame there isn’t one working button (even as tiny as the current RESET) on the Xiao Sense, maybe on V2 they can shift the BT antenna!
Thanks!
1 Like