Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_ERROR_NO_MEM during call to sd_ble_uuid_vs_add

I can use standard UUIDs and successfully add a Service and several characteristics, so I think the error message above is a red herring. When I attempt to create a custom UUID (since none of the BLE-standardized UUIDs actually fit my application), I get the above error returned from the call to  sd_ble_uuid_vs_add. I have plenty of memory, and indeed the linker offers that it has more than enough:

<warning> nrf_sdh_ble: RAM starts at 0x20005668, can be adjusted to 0x200020E0.
<warning> nrf_sdh_ble: RAM size can be adjusted to 0xDF20.
<error> app: ERROR 4 [NRF_ERROR_NO_MEM] at GlucoseControl.c:170

The above function call traces to an SVCALL macro and there the trail goes cold, so I can't even see what's really happening inside the function. Surely I'm not the only one who has tried following the tutorial at https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial. What am i missing?

Parents Reply Children
  • Well, it looks like it is the root of the issue. I don't know how much other you have changed in the example, but the RAM settings works dynamically, and will let you know if you should change these settings.

     

    If this doesn't solve the issue, check what function you call right before line 170 (probably 169) in GlucoseControl.c (This is a file you created yourself, right?)

     

    If it is an sd_... call, check infocenter what different values this call may return, and what they mean. You will find this information in the SDK as well, if you do a "find all" and search for this sd_ call. It should be described around a line where it says "SVCALL(SD_..."

     

    Best regards,

    Edvin

  • That is, you must find out what function that returned the err_code that is used in APP_ERROR_CHECK(err_code) on line 170 in GlucoseControl.c.

Related