This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541: Maximum advertising interval

Part Number: CC2541
Other Parts Discussed in Thread: BLE-STACK

Hey there,

I'am programming on a sensor using the CC2541 controller.

The Software is based on the BLE-Stack simpleBLEBroadcaster Software using scannable undirected advertisements.

For power saving I want to set the advertising interval up to 15 - 30 seconds.

Due to the BLE-Stack limitation on 10,24s I decided to use a seperate timer waking up the device, and start/stop the broadcast.

While meassuring the power cosumption of the device I noticed that the workaround I'am using does increase the power consumption because of increased pre- and postprocessing time to enable and disable the broadcaster (~4ms). So it comes to the question if it is possible to avoid this wasted time/energy?

In the file "ll.h" I have found definitions for the maximum advertising interval but changing this parameters does not effect the maxmimum interval I can use with the broadcaster.

I have also tried to increase the sleeping time by editing in file "hal_sleep.c" the line "timeout = llTimeout;" to "timeout = llTimeout + x;" but this stops the advertising.

  • Hi Samuel,

    The behavior of the BLE Link Layer is already built inside the statically linked libraries that implement the stack code. Since these #defines are set at build time, they are not changeable without recompiling the libraries, which is not supported.

    The current BLE controller implementation is optimized to sleep for as long as possible and only keep the radio on when needed.
  • Hello Samuel,

    Just as a matter of clarity, the Bluetooth 4.0 LE Controller specification specifies range of permissible ADV rates: "The advInterval shall be an integer multiple of 0.625 ms in the range of 20 ms to 10.24 s."

    The BLE-Stack supports the defined range for advInterval via configuration of the related TGAP params, e.g., as in the SimpleBLEPeripheral sample application:

      // Set advertising interval
      {
        uint16 advInt = DEFAULT_ADVERTISING_INTERVAL;
    
        GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MIN, advInt );
        GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MAX, advInt );
        GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MIN, advInt );
        GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MAX, advInt );
      }

    See gap.h.

    Any time you wake the radio and invoke the application (e.g., to enable ADV) there will be some energy consumed which is more than if the radio woke to send an ADV event. It may be best to profile your app to see if using the max 10.24s ADV interval is more energy efficient than trying to wake the MCU every X seconds and configure/stop ADV.

    Best wishes

  • Frist of all thank you for the answers.

    It's like I thought that the interval can't be more than 10,24 s because of the library.

    I have already done some calculations:

    10,24s interval: 4,2ms awake: 11,3mA average current => 3,75 years with CR2032
    20,00s interval: 8,0ms awake: 10,0mA average current => 4,5  years with CR2032

    So I would choose my own interval and waste some energy ...

    Is there a way to speed up the activation of the broadcasting?
    Like in this post someone found out that he can decrease the time needed for updating the advertising data by calling directly the "LL_SetAdvData" function.
    https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/t/528008

    I have tried calling the function "LL_SetAdvControl (LL_ADV_MODE_ON)" and it works
    but when using the "LL_SetAdvControl (LL_ADV_MODE_OFF)" the Advertising stops and doesn't start again.