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

NRF_ERROR_NO_MEM in sd_ble_gatts_characteristic_add

Hi,

I get NRF_ERROR_NO_MEM calling sd_ble_gatts_characteristic_add when using more than 15 uuids. Can you help mitigating this?

Thanks,

Daniel

Parents Reply
  • Hi Daniel, 

    The attribute table is stored in Softdevice's RAM region (memory layout) and the debug log will ask you to increase the APP_RAM_BASE address if it is set too low for the current configuration, hence allocate more RAM for the Softdevice.

    When you increase the UUID count you need to adjust your ram settings. Otherwise, Error 4 returned by softdevice_enable corresponds to the NRF_ERROR_NO_MEM error. This error is generated by the sd_ble_enable function which is called within softdevice_enable.

    The easiest way of finding the correct RAM settings is by using a terminal such as putty to read the logs supplied by the chip. First make the changes you need to your code (setting the UUID count to what you need), build and load. If the RAM settings are different from the optimal settings the logs displayed in putty will tell you what the RAM start and size should be set to. Then simply change the RAM settings in the target options.

    -Amanda H.

Children
Related