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

Using Segger Embedded Studio

I'm using the Laird Connectivity BL654-DVK board as a basis for evaluating the nRF52840 for our application.

I started by using the .../examples/ble_peripheral/ble_app_hrs_freertos example from the nRF5 SDK (v16).    I'm using version 4.52a of the Segger Embedded Studio with a USB cable connected to the BL654-DVK board.


I was able to add some of my own FreeRTOS tasks and  BLE services and characteristics to the example project and interact with them using LightBlue and a modified version of our testing app.

I then attempted to increase the MTU size to 247 bytes (as discussed in the Nordic Devzone postings) by setting NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 247.

A couple of Nordic YouTube videos seem to be pretty current, but they show features that I don't see in my version of the tool.    For example, they show opening the sdk_config.h file using a CMSS configuration wizard editor that assists in turning on/off feature defines.   I didn't see that in my version of the tool, so had to read through the code to determine what things to set (and find that I should probably be using app_config.h).  I'm using V4.52a of Segger Embedded Studio (using the license that comes with the BL654-DVK board.   Is this feature in a different version of the tool?

Rather than set these defines directly in the sdk_config.h file, I created a file named app_config.h and set the define "USE_APP_CONFIG" in the project preprocessor definitions list.     As I understand it, this allows me to keep the sdk_config.h file unchanged and consolidate all my changes into the app_config.h file.

When I did this, the BL654 advertises, but as soon as I tried to connect to it, it crashed.     It was unclear where it crashed (or why).

So to try to debug, I thought I would try the Logger and Debug terminal feature.   (I've used other IDEs before, but this is my first use of the Segger tools.)

Per the YouTube examples, I did the following:   Set NRF_LOG_ENABLED=1 in the project preprocessor definitions list     and   set NRF_LOG_BACKEND_RTT_ENABLED to 1 and NRF_LOG_BACKEND_UART_ENABLED to 0 in the app_config.h file.

However, I don't see anything in the debug terminal window or in the J-Link - Log window (other than Logging started @ ...).


I'm guessing that I  set something wrong, or not set something I should have.

So my questions are:

1.  Any clues on what I might be doing wrong to get Logging or output to the Debug Terminal?

2.  Are there other things that must be done to enable MTUs larger than the default 20 bytes in the Nordic part?   Is it more than just setting the define?

Thanks!

Related