Hi,
I have LAUNCHXL-CC26X2R1 boards with CCS v9.1.0 and I am using the simplelink_cc13x2_26x2_sdk_3_10_01_11 SDK for project.
I am working on the Simple Peripheral application and have modified the project so it can supports the 5 Legacy Advertising data set and 1 Extended Advertising data set. For Advertisement, I have to change the advertisement set after each advertisement interval. Because of which I am using different timer of advertisement interval and using GapAdv_enable() and GapAdv_disable() to switch between the advertising data set. So when receive GAP_EVT_ADV_END we disable the advertisement and switch to next advertising set. And whenever timer expires we use GapAdv_enable() to send next advertisement data set.
But when I send GapAdv_enable() to BLE Stack to start advertisement, I receive GAP_EVT_ADV_START_AFTER_ENABLE event after random delay each time. Because of which at central side I receives advertisement data packet at random advertisement interval not at the expected advertisement interval.
I tried to observe how much delay did TI BLE Stack is adding before sending out the first advertisement data packet by calculating the system tick (i.e. in our project 1 tick = 10 micro second) between GapAdv_enable() and GAP_EVT_ADV_START_AFTER_ENABLE. Following are my observation:
From multiple debug session I had observe, BLE stack adds 0ms to around 16ms for each advertising data set before sending first advertisement data packet for advertising. And same is observe at the Central side while receiving the advertisement data set.
Can you please explain this behavior of the TI BLE Stack? Why its adding a delay rather than just directly sending out the advertising data set for advertisement?
Regards,
Shiv