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

App crashes in sd_ble_cfg_set when NRF_SDH_BLE_VS_UUID_COUNT is nonzero.

Hi!

I am customizing the template app for my product which includes 128 bit custom UUIDs.

So, adding the first of these to the app I edited m_adv_uuids to include it;

static ble_uuid_t m_adv_uuids[] =                                               /**< Universally unique service identifiers. */
{
    {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE},
    {UUID_SERVICE_CONTROLLER_CONFIGURATION, BLE_UUID_TYPE_VENDOR_BEGIN}
};

And in sdk_config I changed NRF_SDH_BLE_VS_UUID_COUNT from 0 to 1.

And when it is nonzero, we get to NRF_BREAKPOINT_COND trap.

Since this is inside of the softdevice (SVCALL-ed) I do not have a lot of visibility on the issue.

So, a set of questions;

1. When I do reach that NRF_BREAKPOINT_COND trap, the call stack appears to be lost. Is there any good way of telling what happened here?
Is the error code stored somewhere I can inspect?

2. I see many, many similar questions regarding inclusion of a custom service UUID, and have tried to apply some of the suggestions,
but without luck. Is there an example application that encapsulates the behavior of having one SID-defined service and one or more
custom services? If I had one that was working I could work out what I am missing.

Thanks! I have been working with this a short time and am still struggling up the learning curve.
-Ben Burch
BTR Controls, Inc.
  • OK, saw some comments that RAM_START needs to be moved to accommodate additional custom UUIDs, and indeed when I add 0x2000 to that starting address we mo longer crash in this spot.  (I crash later) So, there has to be some documentation on how much to increase this for each custom uuid?  Where?  And is there a good example or tutorial on this process?  Thanks!

    -Ben Burch

    BTR Controls Inc.

  • OK, figured this out on my own.  I had to increase log levels and then use the Segger RTT viewer, and the software logs how much additional RAM it needs.

    Output in the log looks like this;

    00> <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    00>
    00> <warning> nrf_sdh_ble: Change the RAM start location from 0x20002260 to 0x20002270.
    00>
    00> <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3DD90.

Related