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

Insufficient RAM allocated for the SoftDevice in nrf_sdh_ble_enable

Hi,

I've defined:

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 120 (in sdk_config.h)

I get "Insufficient RAM allocated for the SoftDevice" in nrf_sdh_ble_enable

nrf_sdh_ble_enable parameter *p_app_ram_start == 0

I'm using the last SDK version (15.0) on nRF52840

Please advise.

Thanks!,

Daniel

Parents
  • Hi Daniel,

    When you change your MTU size you should also change the RAM allocation since the RAM usage for the stack will depend on certain things, like the GATT table size, MTU and TX-buffering settings, and similar.

    If you modify NRF_SDH_BLE_GATT_MAX_MTU_SIZE you should adjust RAM start and RAM size for your project. If you have some log output maybe it is reporting you some warnings like this:

    nrf_sdh_ble: RAM start should be adjusted to 0x20002968. nrf_sdh_ble: RAM size should be adjusted to 0xD698. nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM. app: Fatal

    If you are using, for example, Keil MDK it can be adjusted at Options for target -> Target (similar thread)

Reply
  • Hi Daniel,

    When you change your MTU size you should also change the RAM allocation since the RAM usage for the stack will depend on certain things, like the GATT table size, MTU and TX-buffering settings, and similar.

    If you modify NRF_SDH_BLE_GATT_MAX_MTU_SIZE you should adjust RAM start and RAM size for your project. If you have some log output maybe it is reporting you some warnings like this:

    nrf_sdh_ble: RAM start should be adjusted to 0x20002968. nrf_sdh_ble: RAM size should be adjusted to 0xD698. nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM. app: Fatal

    If you are using, for example, Keil MDK it can be adjusted at Options for target -> Target (similar thread)

Children
Related