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
  • Have you tried to change the RAM settings, according to the warnings from the log? It is done a bit differently in different IDEs. What do you use? Keil, SES, IAR or gcc with the plain makefile?

     

    It is usually found inside the IDEs project settings for your project. For armgcc you will change these settings in the .ld file located in the same folder as your makefile.

     

    The reason for this return is that when you use custom UUIDs, which are longer than the BLE SIG UUIDs, you must reserve more space for the softdevice. 

    In keil, you change these settings in the project settings, as you can see in the attached screenshot.

     

    Best regards,

    Edvin

Reply
  • Have you tried to change the RAM settings, according to the warnings from the log? It is done a bit differently in different IDEs. What do you use? Keil, SES, IAR or gcc with the plain makefile?

     

    It is usually found inside the IDEs project settings for your project. For armgcc you will change these settings in the .ld file located in the same folder as your makefile.

     

    The reason for this return is that when you use custom UUIDs, which are longer than the BLE SIG UUIDs, you must reserve more space for the softdevice. 

    In keil, you change these settings in the project settings, as you can see in the attached screenshot.

     

    Best regards,

    Edvin

Children
No Data
Related