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

Getting NRF_ERROR_NO_MEM when changing advertising interval at run-time

Hi,

I'm getting NRF_ERROR_NO_MEM when changing advertising interval at run-time. I've added a custom service with 7 characteristics and used fds in the app. The code for changing advertisement interval during run-time is:

    sd_ble_gap_adv_stop(m_advertising.adv_handle);
    advertising_init();
    advertising_start(true);

I get error in the following line:

    err_code = ble_advertising_init(&m_advertising, &init);

I even enabled debug log. But did not get any memory suggestions.

App config:
arm_linker_heap_size="8192"
arm_linker_process_stack_size="0"
arm_linker_stack_size="8192"
arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
arm_target_device_name="nRF52832_xxAA"
c_preprocessor_definitions="BOARD_PCA10040;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;NRF52;NRF52832_XXAA;NRF52_PAN_74;NRF_SD_BLE_API_VERSION=6;S132;SOFTDEVICE_PRESENT;SWI_DISABLE0;"
linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x10000;FLASH_START=0x26000;FLASH_SIZE=0x5a000;RAM_START=0x20002220;RAM_SIZE=0xdde8"
linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x10000"

Thanks,
Prakash

Parents Reply
  • Hi Andreas,

    I changed the RAM_START from 0x20002220 to 0x20001628 as given in the tutorial. I used the entry for S132 6.1.0

    But when I ran the app, I got the following error in log:

    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20001628 to 0x20002220.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0xDDE0.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.

Children
Related