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

Advertising and sleep

I tried searching for this response but cant find exact answer

SDK15.2 and API6.1

I am trying to have an advertiser but would like to put it in some sleep mode and advertise. if i do sd_power_system_off() it turns off until i hit the wake GPIO. I tried using sd_app_evt_wait(), however that too doe snot seem to allow me to advertise and sleep at the same time.

What is recommended call to put the thing to sleep but be able to wake on ble event when the scanner tries to connect.

Parents
  • Hi,

    It is not possible to advertise when you are in deep sleep. In system off mode, all clock sources will be turned off, and you will only be able to wake on certain peripherals (reset, GPIO, NFCT, LPCOMP).

    It is also not possible to "advertise and sleep at the same time". You can enter system on idle mode between advertising events, but the chip will wake up to process and prepare advertising, as the CPU is required to start the advertising and setup buffers, etc.

    Running sd_app_evt_wait() in the main-loop is the correct way to enter lowest possible sleep mode while doing advertising and receive connection events.

    Best regards,
    Jørgen

  • Put it in idle_state_handler. As long as you do not have any blocking loops in your application, the application will enter the idle_state_handler when there is no more work to be done, allowing the CPU to go to sleep. This is what we do in all our BLE examples in the SDK.

  • Is there something i am missing here. that may be mis representing actual results

    I am running the code in debug mode and i am pulling 8mA of current. I am re-writing some code and right now all it is doing is is sitting there advertising, yet i am pulling 8mA whereas before i was pulling 0.8mA. How do i adjust the advertising duration ands interval with respect to the scanner so as I can achieve an advertisement. 

    I tried adjusting the APP_ADV_DURATION and APP_ADV_INTERVAL but if i adjust those from the values to shorter ones to reduce current draw, i cannot see them advertising in the nRF connect app. 

    How can i choose proper ADV and SCAN DURATION, INTERVALS and WINDOWS so that i can get best power consumption

Reply
  • Is there something i am missing here. that may be mis representing actual results

    I am running the code in debug mode and i am pulling 8mA of current. I am re-writing some code and right now all it is doing is is sitting there advertising, yet i am pulling 8mA whereas before i was pulling 0.8mA. How do i adjust the advertising duration ands interval with respect to the scanner so as I can achieve an advertisement. 

    I tried adjusting the APP_ADV_DURATION and APP_ADV_INTERVAL but if i adjust those from the values to shorter ones to reduce current draw, i cannot see them advertising in the nRF connect app. 

    How can i choose proper ADV and SCAN DURATION, INTERVALS and WINDOWS so that i can get best power consumption

Children
No Data
Related