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

BLE_GATTS_EVT_HVX_TX_COMPLETE triggered too late

Hi,

In our current project we use nordic NRF52832 ble to send some data(~200 Byte / packet) to host, we expect each transmission to be done within 10ms, but results from experiment shows non-deterministic delay varies from 10ms to 60ms, how can we achieve more stable result?

Here is the configuration parameters used:

`MIN_CONNECTION_INTERVAL`: MSEC_TO_UNITS(8, UNIT_1_25_MS)

`MAX_CONNECTION_INTERVAL`: MSEC_TO_UNITS(8, UNIT_1_25_MS)

`NRF_SDH_BLE_GATTS_MAX_MTU_SIZE`: 247

`NRF_SDH_BLE_GAP_EVENT_LENGTH`: 6

delay time is measured using `app_timer_cnt_get()`, started from `ble_nus_data_send()` and stopped when `BLE_GATTS_EVT_HVX_TX_COMPLETE` was received


the following shows our experiment's result:

delay

delay_dist

regards,

chxt

Parents Reply Children
  • Hi, Siguad

    thanks for you reply, after many trials, I found this phenomenal is mainly caused by the logic I send packet, where I send packet use a timer at a fixed timeout which may not be aligned with Link timeslot start point, so delay is random distributed with 1-CI variation, the other factor is scanning spends some timeslots which adds additional delay.

    regards

Related