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

BLE_NUS not working in BLE_APP_TEMPLATE SDK15.3 + SD132 6.1.1

Dear Nordic team,

I am using a NRF52832 and SDK15.3 + SD6.1.1 and Segger Embedded Studio to develop my code.

I started developing my code from the example "ble_app_template_pca10040_s132", and I am using the BAS and the NUS service. I use the PCA10040 to debug.

Everything goes fine if NUS Service is not initiliced. Once I initialice NUS (with no compilation errors and not warnings), I always get a hard fault.

The functions that fails is the ble_nus_init, that returns the error code 0x4, that means "no memory"

To debug further, I opened the ble_nus.c file and I noticed that the function call err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_nus->uuid_type) is who causes the error code 0x4.

I tryied to check the ble_app_uart example and it works prefectly. So I decided to set in my project the same memory linker RAM address and size that is used in the ble_app_uart example.

In other words, In my project I changed:

RAM_START = 0x20002218 to 0x20002a98

RAM_SIZE = 0xdde8 to 0xd568

But it does not work.

I know that this topic has been commented in other threads of the forum, but they did not help my. By reading them and applying here their answers, I can say that nrf_sdh_ble_enable(&ram_start) does not throws any error nor warning. Also I have check other ram setups as RAM_START = 0x20003000 RAM_SIZE = 0xd000 and it not works.

Could you help me , please?

Thanks in advance,

    Kind Regards

Parents Reply Children
No Data
Related