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

Replicating BLE LED Button Service - NRF_BREAK_COND error

Hello,

I wanted to replicate and build the LED Button Service using my own custom service. I used the template BLE project as a starting point.

I am using nRF52 DK, and SDK v15.0.

So far, I am pretty confident that I have followed the steps correctly based on this and this tutorials.

To test that I have truly understood the concepts, I decided to make my own LED and Button Service. However, at this point, my aim is to create and add my service on the BLE stack, then add the characteristics later on.

To get my setup up and running:

1. Please copy the "ble_jade.zip" folder to SDK/components/ble/ble_services/

2. Please copy the "ble_app_jade_test.zip" to SDK/examples/ble_peripheral/

3. On the Preprocessor, please also add the SDK/components/ble/ble_services/ble_jade

If you try to run my setup, I get an NRF_BREAK_COND error. May I ask for your assistance in resolving my issue?

Thank you so much.

 

  • Try to add DEBUG to your preprocessor definitions, and monitor the log.

    If you aren't sure how to add preprocessor definitions, please let me know what IDE you are using. Segger Embedded Studio? Keil?

    If you are not sure how to monitor or enable the log, let me know.

    Best regards,

    Edvin

  • To be honest, I do not know how to do the steps you mentioned. I am using Segger Embedded Studio.

  • Hello Edvin,

    I came across a ticket here in Devzone in which you happened to replied to. I read this blog and I have gained some knowledge about basic debugging.

    So I enabled the DEBUG preprocessor in SES and also the NRF_LOG and RTT thru the CMSIS configuration wizard.

    I can now see the error messages:

    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\BLE Projects\nRF52\nRF5_SDK_15.0.0_a53641a\components\ble\ble_services\ble_jade\ble_jade.c:17
    PC at: 0x000392DB
    <error> app: End of error report

    It seems the error is found on the "ble_jade.c" line 17 where I attempted to add the UUID.

  • So the function sd_ble_uuid_vs_add() returned the err_code = 4, which was passed into APP_ERROR_CHECK() on line 17, right?

    Try to increase NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h. NRF_SDH_BLE_VS_UUID_COUNT should reflect the number of services that use custom (Vendor Specific) UUIDs. That is, all services that are not the standardized BLE services (battery service, heart rate service and so on). 

    BR,

    Edvin

  • Hello Edvin,

    Since  I am only using 1 vendor specific UUID, I adjusted the following lines of code in the sdk_config.h

    #ifndef NRF_SDH_BLE_VS_UUID_COUNT
    #define NRF_SDH_BLE_VS_UUID_COUNT 1
    #endif

    After building the projected and attempted to run a debug, the following lines of error codes show:

    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20002218 to 0x20002220.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0xDDE0.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\BLE Projects\nRF52\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_jade_test\main.c:604
    PC at: 0x000310E3
    <error> app: End of error report

    Best Regards,

    Jade

Related