NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Low Sleep Mode

Open j45p41 opened this issue 1 year ago • 2 comments

Hi,

I am trying to use put NRF52840 to sleep.

I have tried Arduino_nRF5x_lowPower library but it seems to not work with thislinrary showing the following error:

.pio/libdeps/nrf52840_dk_adafruit/Arduino nRF5x lowPower/src/Arduino_nRF5x_lowPower.h:25:10: fatal error: nrf_sdm.h

I simply want to put the device to sleep and wake up on interrupt, while using ADXL362 and interrupt source.

Otherwise great library that I want to keep on using.

Thanks!

j45p41 avatar Sep 19 '23 16:09 j45p41

This is not a function of this library, more of a core function. That said, you can follow the Nordic examples and use NRF_POWER->SYSTEMOFF = 1; to enter system off sleep mode after enabling a GPIO wakeup.

h2zero avatar Sep 24 '23 05:09 h2zero

Just to add to my response above, the Arduino_nRF5x_lowPower library is only for use with the softdevice, not NimBLE. n-able core has the systemPowerOff() function that should work for this purpose.

h2zero avatar Nov 17 '23 15:11 h2zero