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

nrf52840-DK Evaluation

Purchased nrf52840-DK boards for evaluation. Tested ESB protocol example successfully using Segger environment. 

1. I could not find any prints on my host screen after i have added Printf statements in the example to debug and print packet transmitted and received.  Any pointers specific to Segger environment?

2. How to write a new example for nrf52840-DK board Using Segger environment? Any pointers?

    

Parents
  • Hi,

    1. The SDK comes with a Logger module, which is typically what you would use to print messages. It gives you printf-like string formatting and you can select whether you want to log to RTT or UART by configuring the projects sdk_config.h. Most SDK examples use the logger module, so you can see how it is done. You need to remember to enable logging by setting NRF_LOG_ENABLED in sdk_config.h. You also have to enable a backend. Since you use Segger, you probably want RTT, which you get by setting NRF_LOG_BACKEND_RTT_ENABLED to 1. If you want UART logging, you set NRF_LOG_BACKEND_UART_ENABLED to 1 instead. If you use RTT logging, the logs will be displayed directly in Segger Embedded Studio. Alternatively, when you are not debugging, you can use the J-Link RTT Viewer.

    2. I recommend you start with a example project. There is no reason to do the work of setting up a project from scratch when you can adapt a example project instead, saving time and avoiding issues.

Reply
  • Hi,

    1. The SDK comes with a Logger module, which is typically what you would use to print messages. It gives you printf-like string formatting and you can select whether you want to log to RTT or UART by configuring the projects sdk_config.h. Most SDK examples use the logger module, so you can see how it is done. You need to remember to enable logging by setting NRF_LOG_ENABLED in sdk_config.h. You also have to enable a backend. Since you use Segger, you probably want RTT, which you get by setting NRF_LOG_BACKEND_RTT_ENABLED to 1. If you want UART logging, you set NRF_LOG_BACKEND_UART_ENABLED to 1 instead. If you use RTT logging, the logs will be displayed directly in Segger Embedded Studio. Alternatively, when you are not debugging, you can use the J-Link RTT Viewer.

    2. I recommend you start with a example project. There is no reason to do the work of setting up a project from scratch when you can adapt a example project instead, saving time and avoiding issues.

Children
No Data
Related