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

Application note for using API for BLE power consumption in advertising mode

I want to make application for BLE peripheral with advertising interval at 1second. WHich Power management APIs I need to use for this? Is there any documentation for how to use in nRF52840?

Parents
  • Are you asking how to set the advertising interval to 1 second?

    If so, then you need to set your APP_ADV_INTERVAL to 1600 (in main.c).

    This is because advertising interval is given in units of 0.625ms. 1600*0.625ms = 1000ms = 1 second.

    Best regards,

    Edvin

  • Hello Edvin,

    The information I am looking for is how to put the BLE in power save mode. I know how to configure advertise interval, but the information I want is which function I need to use to put BLE in power save mode.

    Is there any user guide or API list to put a module in low power in BLE advertising as well as after connection with BLE master. Here BLE master I am gonna use is android phone.

    Any help on this will be helpful.

    Thanks

    Keyur

  • Hello Keyur,

    All of the examples in the SDK use low power mode. If you look at e.g. ble_app_uart, there is a call to: idle_state_handle() in the main-loop. They may be called a bit different things in the different examples, but in the end, all the BLE examples eventually call sd_app_evt_wait(), which allows the device to go to sleep, and save power until the next BLE event.

    This is called even if you are in a connection or advertising. The softdevice will wake up the nRF the next time it needs to use the radio.

    Best regards,

    Edvin

Reply
  • Hello Keyur,

    All of the examples in the SDK use low power mode. If you look at e.g. ble_app_uart, there is a call to: idle_state_handle() in the main-loop. They may be called a bit different things in the different examples, but in the end, all the BLE examples eventually call sd_app_evt_wait(), which allows the device to go to sleep, and save power until the next BLE event.

    This is called even if you are in a connection or advertising. The softdevice will wake up the nRF the next time it needs to use the radio.

    Best regards,

    Edvin

Children
Related