h2zero / n-able-Arduino

An arduino core for ARM based BLE devices supported by the NimBLE stack.
GNU Lesser General Public License v2.1
34 stars 12 forks source link

SystemON Sleep works with platform = nordicnrf52 #30

Closed j45p41 closed 8 months ago

j45p41 commented 8 months ago

Hi, thanks again for a great library.

I am near the end of my project and realised that I need to implement systemON sleep for faster wakeup.

I know this should be a core function but when I am using the following code:

https://github.com/ProMiniMicros/ProMininRF52/blob/master/Low%20Power/System%20ON%20Sleep/Pro_Mini_nRF52--Example_System_ON_Sleep.ino

in my platformio.ini when I declare:

platform = https://github.com/h2zero/platform-n-able.git#1.0.0 The device goes to sleep and then a few seconds later wakes up without any trigger but behaves like a reset (eg runs the code in setup) and does not continue from where it left off.

Could this be an issue with the SDK that is being used?

I notice that when I specify:

build_flags =
    -D CONFIG_WDT_TIMEOUT_SECONDS=0

that the board does not restart, but does not wake up either from the assigned interrupt.

when I use Sandeep's version by enabling it works.

platform = nordicnrf52

I also notice that when I click on the NRF_POWER function it seems to point to nrf51.h - should this not be pointing to nrf52.h like it does when I switch to the platform = nordicnrf52 ?

Thanks again for your help.

j45p41 commented 8 months ago

Sorry I just realized that this example is for the nrf51.