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

which settings can increase the buffer capacity of ble_nus_data_send function ?

Hello ,

Which settings can increase the buffer capacity of ble_nus_data_send function? I get NRF_ERROR_RESOURCES when I try to load new data, i was going to create fifo buffer or queue then I realized that ble_nus_data_send  have already a buffer so why i dont increase it's capacity instead of creating fifo... so Is there any setting to increase buffering capacity of the function ?

Best regards

Parents
  • Hi

    The size of the buffer is controlled by the NRF_SDH_BLE_GAP_EVENT_LENGTH parameter in the sdk_config.h file. Essentially this parameter controls how much time you can spend during each connection event sending packets, in a unit of 1.25ms. 

    The default value is 6, which means you can send packets for up to 7.5ms, but you can increase this if you like to increase the size of the internal buffers. 

    Please note that when increasing this value you might need to increase the amount of RAM assigned to the SoftDevice. 

    Best regards
    Torbjørn

  • Thank you so much for the answer and how can I increase the amount of RAM assigned to the SoftDevice? 

    And also do we have any number for the amount of the ram required let's say if I increase it from 6 to 12 ? ex: each 6 corresponds 4k ram increment in internal buffers.

  • Hi

    If you have logging enabled and run the application in debug mode you should see a log message telling you what the RAM start address and size should be for the application. 

    How to change this in Segger Embedder Studio is described in chapter 4 of this blog

    Best regards
    Torbjørn

Reply Children
No Data
Related