Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_SDH_BLE_GAP_EVENT_LENGTH

Using SDK14.2.

I'm trying to optimize the throughput of my ble_nus-based app (I'm getting about 5k/sec right now). I've read elsewhere on this forum that increasing NRF_SDH_BLE_GAP_EVENT_LENGTH from the default of 3 to 16 might help, and I also read that doing so requires increasing ram_start. I updated sdk_config.h, and the changed the RAM address in the linker script from 20002076 to 20002800, but I continue to get error 4 from nrf_sdh_ble_enable(). Is there some other setting that needs to be tweaked at the same time? Did I not change the ram start enough? Any other suggestions?

  • Hi,

     

    Sorry for misunderstanding.

    I suspect that your sdk_config has the "info" level set, and not the "debug" level for nrf_log.

    You can set this in sdk_config.h:

    #define NRF_SDH_BLE_LOG_LEVEL 4

    and to set it to this level by-default:

    #define NRF_LOG_DEFAULT_LEVEL 4

     

    When setting it to print at a debug level, it outputs:

    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: Notify observer 0x0003BBE4 => ready
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> nrf_sdh_ble: RAM starts at 0x20002B90
    <debug> nrf_sdh_ble: RAM start location can be adjusted to 0x20002B88.
    <debug> nrf_sdh_ble: RAM size for application can be adjusted to 0xD478.
    <info> app: Heart Rate Sensor example started.
    <info> app: Fast advertising.

     

    Did your overall transfer rate change when trying 7.5 ms connection interval?

     

    Cheers,

    Håkon

  • I wasn't using logging at all--I had it turned off and not even linked in. I was looking at the variables directly with GDB after setting a breakpoint, and they did not show memory usage. But I see my mistake now--the value is only set after the enable() call.

Related