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

softdevice_enable: NRF_ERROR_NO_MEM, 0x4

I'm trying to make the nRF51422xxAC advertise. Using Segger Embedded Studio.

I have this code: bpaste.net/.../f29f74986c10

On line 109, I have a breakpoint. At that point in the code, err_code = 4, and after that, the nRF resets.

#define 	NRF_ERROR_NO_MEM   (NRF_ERROR_BASE_NUM + 4)
 	No Memory for operation. 

I have tried with different SRAM_START in the Linker settings: from 0x20001FE8 up to 0x20007000. The chip should have 0x8000 bytes of memory if I read correctly. Anyway - I get the same behaviour every attempt.

I have looked at other forum posts but haven't found anything directly applicable. Line 105 is from trying one of the solutions to no avail.

From the softdevice_enable documentation:

If the app_ram_base is too low, this function will return an error. Using a app_ram_base that is too high will not fail, but will result in RAM that is never used

But I can't find any further information on how much memory is needed. However, I would be surprised if a bigger SRAM_START than 0x20007000 is needed... The problem is probably something else.

Parents
  • Hi Erlend,

    Have you tried to search similar questions about ble_stack_init(...) function on this forum? I'd recommend this one as an example. It solves your problem for GCC but I hope that SES will have very similar construct for any SoftDevice S13x V2 or newer (just find equivalent of __data_start__ external variable if it isn't the same). Not sure if SRAM_START is equivalent of RAM memory segment in GCC linker script (LD file), that would explain the failure as well.

    Cheers Jan

Reply
  • Hi Erlend,

    Have you tried to search similar questions about ble_stack_init(...) function on this forum? I'd recommend this one as an example. It solves your problem for GCC but I hope that SES will have very similar construct for any SoftDevice S13x V2 or newer (just find equivalent of __data_start__ external variable if it isn't the same). Not sure if SRAM_START is equivalent of RAM memory segment in GCC linker script (LD file), that would explain the failure as well.

    Cheers Jan

Children
Related