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
  • For users of other IDE's such as Eclipse, this is my summary of the process, but I could be wrong....  the call to nrf_sdh_ble_enable has one argument that is an OUT variable (*p_app_ram_start, a pointer to an integer) telling you the address where application RAM SHOULD start (from calculations that nrf_sdh_ble_enable() does based on how you have configured the SD in sdk_config.h)  The SDK code also knows where you have already declared application RAM to start, and gives this error if they differ.  If you are logging, nrf_sdh_ble_enable() logs the OUT value (should be.)  Alternatively, you can use a debugger and step through the call and then read the value of the OUT variable.  Then you take the value, enter it in your linker script (Linux terminology, e.g. gcc_nrf52.ld; SES calls it the flash_placement.xml file) and rebuild.   This process is applicable to recent versions of the SDK (since v14.0?).   Whenever you change the configuration of the SD, you might need to repeat this process.  You will know whether your configuration change has affected SD RAM usage because you will get this error again.

  • Thanks for this detailed and clear explanation!

    Is there a similar procedure to determine the flash start and size? 

Reply Children
Related