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

Memory configuration, cannot add vendor specific UUID count

Hello!

I'm having trouble adding vendor specific UUID and configuring the memory. My service will require 3 vendor specific 128 bit UUID. One for the service and two for characteristics. I have been using the NUS peripheral as an example. I'm using gcc.

In the linked script for the NUS peripheral example this is the memory configuration in the linker script:

MEMORY
{
  FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000
  RAM (rwx) :  ORIGIN = 0x200025f8, LENGTH = 0xda08
}

I configure the system to use 3 UUID with this code:

memset(&ble_cfg, 0x00, sizeof(ble_cfg));
ble_cfg.common_cfg.vs_uuid_cfg.vs_uuid_count        = BLE_NUM_VENDOR_UUID; // 3
err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);

When enabling the softdevice i get the message that the memory settings should be changed:

SDH:DEBUG:RAM start at 0x200025f8.
SDH:WARNING:RAM start should be adjusted to 0x20002588.
SDH:WARNING:RAM size should be adjusted to 0xda78.

When changing according to this in the linker script i end up in some error state. What am i missing here?

Furher:

At a later point i am planning to increase the number of concurrent connections, how should i configure the linker script for this? I.e, how much more RAM is required by the softdevice for this? I didn't find the numbers in the documentation (i believe i just missed it).

Edit: I realized that the default number of vendor specific UUID is 10, however, i am not able to add my UUIDs anyway,

  • Hello again,

    The linker didn't report any errors. I made some progress in debugging this problem, but there are some things i still need to find out.

    1. I don't understand why i could change the memory configuration when changing the number of vendor specific UUID's. The default settings is 10, so i don't need to increase this value. I used a very old version of the softdevice previously (2.0.0), in that version 1 was the default value.
    2. I was able to add the vendor UUID in the NUS example, and i initiate the ble stack similar to that, so i couldn't understand why it crashed in my application. I more peripherals and drivers than that example and i found out that when if i enable the RTC2 the crash occurs. Even in the NUS example. I need the RTC2 in my application so i need to solve that problem, will dig into that tomorrow. There might be some documentation about using RTC2 and the softdevice that i missed.

    I will post more information when i know more.

Related