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

ANCS init issue with SDK11 s132 nRF52

Hello everybody,

I have a problem when I try initialize the ANCS service. The method ble_ancs_c_init(); from ble_ancs_c.h return the error NRF_ERROR_NO_MEM.

My configuration of the ble stack is :
sdEnableParams.gatts_enable_params.attr_tab_size = 0x1000;
sdEnableParams.gatts_enable_params.service_changed = 0;
sdEnableParams.gap_enable_params.periph_conn_count = 1;
sdEnableParams.gap_enable_params.central_conn_count = 0;

My configuration of the RAM area is:
start adress = 0x20002A68
RAM size = 0xD598

When I launch the application I have this log:
0> RAM START ADDR 0x20002A68 should be adjusted to 0x20001FE8
0> RAM SIZE should be adjusted to 0xE018
0> sd_ble_enable: RAM START at 0x20002A68

I modified the RAM area to match this:
start adress = 0x20001FE8
RAM size = 0xE018

I launch again the application I have now another error coming from softdevice_enable(). The returned error is also NRF_ERROR_NO_MEM

Strangely the log I have from the application is this:
0> sd_ble_enable: RAM START at 0x20001FE8
0> sd_ble_enable: app_ram_base should be adjusted to 0x20002A68
0> ram size should be adjusted to 0xD598

After that I tried to find where I messed up by comparing my project with a working example from Nordic and I only found that Nordic setted this configuration for the RAM area:
start adress = 0x200021B8
RAM size = 0xDE48

The same error is coming from softdevice_enable() after a launch.

It would be really great if you can help to solve this problem. I have already to increase the ble stack size with sdEnableParams.gatts_enable_params.attr_tab_size but nothing work.

Related