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

Soft device 7.2.0 Flash and RAM configuration

Hi

I am updating from Softdevice 6.1.1 to 7.2.0 and have issues with nrf_sdh_ble_enable(..), My setup is:

  • NRF52840
  • SDK 17.0.2
  • SoftDevice 7.2.0
  • Running FreeRtos
  • GCC compiler using linker script

What I did:

  • I updated the linker script as below

MEMORY
{
FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xD9000
RAM (rwx) : ORIGIN = 0x200016FC, LENGTH = 0x38000
}

  • The Flash values I'm sure are OK for Soft Device 7.2.0?
  • The RAM Origin was obtained by booting the device and calling nrf_sdh_ble_default_cfg_set
  • The RAM size is 256K - the value in the soft device release note (5.6K) plus a bit more

What is happening

  • I boot the device but get an error when I run the following sequence:

uint32_t ram_start = 0;
err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start); << Returns NRF_SUCCESS (0)

//Note this returns 0=Success
//NOTE! ram_start = 536888912

nrf_sdh_ble_enable(&ram_start); << RETURNS NRF_ERROR_NO_MEM (4)

Any Ideas? 

Parents Reply
  • We think we found the issue.  It seems that when using SDK 17.0.2 (Soft Device 7.2.0) we have to increase the value of #define:

    • #define NRF_BLE_FREERTOS_SDH_TASK_STACK 256 in file nrf_sdh_freertos.c

    This is a hard coded define within the Nordic SDK.  We have provisionally double it to 512 and the FreeRtos stack overflow exception is no longer thrown (a smaller value could also work)

    Q1) As this is a hard coded value within the SDK should it not just work "out of the box"

    Q2) If the value has to be modified per application should it not be part of the Config setup?

Children
Related