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

nrf log not shown on RTT viewer

I know there have been many posts on this forum regarding a similar issue, I have spent a whole day reading them and trying to get this working, to no avail.

Basically my goal is to view logs through nRF52840 chip SW pin -> segger flasher box -> laptop RTT viewer program.

The nRF52840 is put on our custom board so it does not have an ARM chip helping with UART, hence this effort to view logs on RTT viewer. 

The flasher box looks like this:

The example project i used is usbd_cdc_acm_pca10056.

As mentioned so many times with other posts, I modified the sdk_config.h file to have the following code:

#defineNRF_LOG_BACKEND_RTT_ENABLED 1
#defineNRF_LOG_BACKEND_UART_ENABLED 0
#defineNRF_LOG_ENABLED 1

#define NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0

And I added NRF_LOG_DEFAULT_BACKENDS_INIT() to the main function.

fired up RTT viewer, got a window like below:

https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Jlink_5F00_RTT_5F00_Viwer_5F00_Log_5F00_Window.JPG

"All terminal" window all black. No log.

All above is done on our custom board. However on nRF52840DK (see picture below) I got the same all black terminal on RTT viewer too. Logs through Putty is working. Just nothing on RTT viewer terminal.

The settings of RTT viewer is similar to the one as below (only it's nrf52840):

https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-375dae7bcf00487385c54cc03e1a34dc/Jlink_5F00_RTT_5F00_Viwer_5F00_Config.JPG

We have used the flasher box to download hex to our custom board and it's working, so shouldn't be any hardware problem there.

Segger version: 4.30c,  RTT viewer version V6.60e

Can anyone shed some light on this issue? Many thanks.

Parents
  • To begin with, could you try the following:

    • Open C:\Nordic\nRF5_SDK\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\temperature\pca10056\blank\ses\temperature_pca10056.emProject
    • Replace C:\Nordic\nRF5_SDK\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\temperature\pca10056\blank\config\sdk_config.h with the following file:sdk_config.h
    • Connect your nRF52840 DK (pca10056) to your computer and turn it on
    • Open a debugger session in SES
      • Debug-->Go
    • Check if you see the RTT logging in the Debug Terminal:

    Best regards,

    Simon

Reply
  • To begin with, could you try the following:

    • Open C:\Nordic\nRF5_SDK\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\temperature\pca10056\blank\ses\temperature_pca10056.emProject
    • Replace C:\Nordic\nRF5_SDK\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\temperature\pca10056\blank\config\sdk_config.h with the following file:sdk_config.h
    • Connect your nRF52840 DK (pca10056) to your computer and turn it on
    • Open a debugger session in SES
      • Debug-->Go
    • Check if you see the RTT logging in the Debug Terminal:

    Best regards,

    Simon

Children
Related