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

MCU hanging due to Segger RTT log

I am using NRF52840 custom board and SEGGER RTT log for debugging.

I set the NRF_LOG_BACKEND_RTT_ENABLED 1 and NRF_LOG_ENABLED 1 

The following is a screenshot of my settings

I am able to have my debug log printing on RTT viewer. However, if I disconnect my device to J-Link debugger, the mcu keeps running for around 10 seconds and then stops.

Coincidentally, I found two ways seemed to resolve this issue.

1. decrease SEGGER_RTT_CONFIG_BUFFER_SIZE_DOWN to 16 

2. set NRF_LOG_BACKEND_RTT_ENABLED and NRF_LOG_ENABLED to 0

I have no idea what the correct setting should be.

Any help is appreciated.

Thank you!

Parents
  •  It is the nRF52840 you are referring to that keeps running, correct?

         --> Yes, it was running but somehow it hanged after a few seconds. And nRF52840 would be normal after I reconnect to SEGGER RTT log again.

    If you set the NRF_LOG_ENABLED to 0 are you able to see any log messages at all?

        --> Yes, I can still see log printing even after setting it to 0

Reply
  •  It is the nRF52840 you are referring to that keeps running, correct?

         --> Yes, it was running but somehow it hanged after a few seconds. And nRF52840 would be normal after I reconnect to SEGGER RTT log again.

    If you set the NRF_LOG_ENABLED to 0 are you able to see any log messages at all?

        --> Yes, I can still see log printing even after setting it to 0

Children
No Data
Related