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

when the SoftDevice Event rise SD_EVT_IRQ in Central Role? What's connect timing mode for multi-link in Central Role?

Hi:

    We are develop an Central Device can Connect 8 BLE Device in same time. and want max throughout. it use queue and freeRTOS.  the Central TX is simple.

    use  sd_ble_gattc_write() with BLE_GATT_OP_WRITE_CMD to write.  wait semaphore event rise by BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event. 

   but between the SD_EVT_IRQ interrupt rise(BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE ) and sd_ble_gattc_write, it  take about 7.5ms. not our expect 2.5ms(1Mbps) or 1.4ms(2Mbps).  When SD_EVT_IRQ interrupt rise by SoftDevice?  why it same value as NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL ? 

Is NRF_SDH_BLE_GAP_EVENT_LENGTH  use to reduce SD_EVT_IRQ  frequency?  Do the Nordic Semiconductor have guidebook for these config parameters? or have excel document can calculate these parameters?

   how the SoftDevice handle Multi-linked peripheral connect timing? 

   from "Connection timing as a Central" charter of S140_SDS_v2.1,  Do SoftDevice use one Big time Slot to scan each connected peripheral? each peripheral get equalization chance?

|  peripheral 1 connect timing(7.5ms) | peripheral 2 connect timing(7.5ms)  | .... | peripheral 8connect timing(7.5ms)|   --> Next loop

|_____________________________|_____________________________|_______________________________|

   or just each peripheral has random shift start connect timing? 

           |  peripheral 1 connect timing(7.5ms) |

                |  peripheral 2 connect timing(7.5ms) |

                 .....

                     | peripheral 8connect timing(7.5ms)| 

 

Here the Central Config:

#define NRF_SDH_BLE_GAP_DATA_LENGTH 251

#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0

#define NRF_SDH_BLE_CENTRAL_LINK_COUNT  8

#define NRF_SDH_BLE_TOTAL_LINK_COUNT    8

#define NRF_SDH_BLE_GAP_EVENT_LENGTH 6

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247

#define NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL 7.5

the "Connection Event Length Extension" is enabled.  and connect peripheral use min_conn_interval=max_conn_interval=7.5ms.  peripheral use  BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE/BLE_GATT_CHAR_PROPERTIES_NOTIFY.

Parents
  • Thanks for your help.  Still have some question about SoftDevice inside.

    Question:

     1) central config support 8 peripheral link connection, if only one connection established, do the SoftDevice still handler other 7 connection  time slot? if yes, why ? is the "connectionInterval 0" value of by sd_ble_gap_connect() setting value? Not NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL? 

    2)  do the SoftDevice have own GATTC for each connection peripheral   in Central mode? Do SoftDevice have own inside buffer(sd_ble_gattc_write() API write to,  BLE_GATTC_EVT_HVX event receive buffer) for each connection? Do they are queue Buffers? or just single(from my debug info, seem this is true, because second call sd_ble_gattc_write() will return NRF_ERROR_RESOURCES) ?

    3)  when the SoftDevice trigger the SD_EVT_IRQHandler? for example, when the SoftDevice radio finish the sd_ble_gattc_write() data package? Or finished the one device connection timing?  my issue: the SD_EVT_IRQHandler frequency is too slow. it about 135Hz. about 7.5ms interval. not our expect 400Hz(1Mbps) or 714Hz(2Mbps). 

Reply
  • Thanks for your help.  Still have some question about SoftDevice inside.

    Question:

     1) central config support 8 peripheral link connection, if only one connection established, do the SoftDevice still handler other 7 connection  time slot? if yes, why ? is the "connectionInterval 0" value of by sd_ble_gap_connect() setting value? Not NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL? 

    2)  do the SoftDevice have own GATTC for each connection peripheral   in Central mode? Do SoftDevice have own inside buffer(sd_ble_gattc_write() API write to,  BLE_GATTC_EVT_HVX event receive buffer) for each connection? Do they are queue Buffers? or just single(from my debug info, seem this is true, because second call sd_ble_gattc_write() will return NRF_ERROR_RESOURCES) ?

    3)  when the SoftDevice trigger the SD_EVT_IRQHandler? for example, when the SoftDevice radio finish the sd_ble_gattc_write() data package? Or finished the one device connection timing?  my issue: the SD_EVT_IRQHandler frequency is too slow. it about 135Hz. about 7.5ms interval. not our expect 400Hz(1Mbps) or 714Hz(2Mbps). 

Children
No Data
Related