This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF_ERROR_NO_MEM

Hi,

I'm developing a FW with a lot of services and characteristics. Since I added the ANCS service, I have the "NRF_ERROR_NO_MEM".

Configuration : NRF51822_XXAC / S130 V2 / custom secure bootloader + DFU / Segger embedded studio / bootloader setting file to allow programing without DFU.

Section placement macro (Embedded studio) : FLASH_START=0x1b000 SRAM_START=0x20002008

I read a lot of things about this error : increase the size of the gatt table, adding "BLE_GATTS_VLOC_USER"...

Like explained on the migration guide, I checked the expected RAM size. The debug result is described below :

SDH:DEBUG:sd_ble_enable: RAM start at 0x20002008 SDH:DEBUG:RAM size should be adjusted to 0x5ff8 SDH:DEBUG:sd_ble_enable: RAM start should be adjusted to 0x20002008 :INFO:running nrf_dfu_settings_init APP:INFO:app_error_fault_handler : id=0x00004001, pc=0x00000000, info=0x20007f64 APP:INFO:err_code 00000004 in line 298 of XXXANCS/ble/ble_services.c APP:INFO:-> NRF_ERROR_BASE_NUM

I changed the SRAM size and attr_tab_size but after that, the application doesn't start like if the bootloader doesn't know where to find the application start address. Do I have to change something in the bootloader or something else that I missed?

Thank you

Parents
  • Which SDK version are you using, is it SDK v12.x.x? Which function returns NRF_ERROR_NO_MEM? Is it sd_ble_gatts_service_add() or sd_ble_gatts_characteristic_add()?

    If it is one of those two functions then you need to increase the size of the GATT table by setting the .attr_tab_size field of ble_enable_params.gatts_enable_params in ble_stack_init(), e.g.

    ble_enable_params.gatts_enable_params.attr_tab_size = 0x1000;
    

    Otherwise if will be set equal to SOFTDEVICE_GATTS_ATTR_TAB_SIZE == BLE_GATTS_ATTR_TAB_SIZE_DEFAULT == 0x000 which causes the SoftDevice to use the default GATT table size which is 0x580 bytes for S130 v2.x.x.

Reply
  • Which SDK version are you using, is it SDK v12.x.x? Which function returns NRF_ERROR_NO_MEM? Is it sd_ble_gatts_service_add() or sd_ble_gatts_characteristic_add()?

    If it is one of those two functions then you need to increase the size of the GATT table by setting the .attr_tab_size field of ble_enable_params.gatts_enable_params in ble_stack_init(), e.g.

    ble_enable_params.gatts_enable_params.attr_tab_size = 0x1000;
    

    Otherwise if will be set equal to SOFTDEVICE_GATTS_ATTR_TAB_SIZE == BLE_GATTS_ATTR_TAB_SIZE_DEFAULT == 0x000 which causes the SoftDevice to use the default GATT table size which is 0x580 bytes for S130 v2.x.x.

Children
No Data
Related