This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

using Shutoff Mode at initial level

We are working on application which need below implementation.

1.) At starting the device should be in shutoff mode, and on button press it should be awaken and start advertising for 180 seconds

2.) If connection established the device never go again to shutoff mode .

Pls suggest how to achieve above functionalities ?

I have started building up my application using ble_app_template example project.

Thank you !

Parents Reply Children
  • Hi Jonathan,

    What SDK and soft device are you using ?

    :- nRF SDK 17.02, and soft device pca10040/s132

    Please understand My Use-Case :-

    1.) when board is powered on, it should be in shutoff mode.

    2.) When we press wakeup button it should come out of shutoff mode and then advertise .

    But in most of the examples it is like, it will advertise and when become idle then it enters shutoff mode.

    Observation :-

    As we know after coming out of shutoff mode, the system resets, so even if i put sleep_mode_enter() api, in main function it will always go into shutoff mode.

    I tried retained register "GPREGRET" , but no luck.

    i am getting a fatal error when i am trying to write the GPREGRET register value.

    suggest any method to achieve above use-case !

    Thank You ! 

  • If the SD is enabled then you have to use sd_power_gpregret_set to sett the register, ore else you will get a illegal memory access assert when you try tro write to NRF_POWER register. 

    And if DFU/Bootloader is in use then it that might also use/clear parts of the GPREGRET register.

    Regards,
    Jonathan
Related