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
  • Hi

    Seeing any log messages after setting NRF_LOG_ENABLED to 0 in your project should not be possible. Can you tell me more about your setup, as what you're describing sounds impossible. Are you using an nRF52 DK as a debugger? Are you sure that you're rebuilding and flashing the edited example every time you make any changes?

    Also, what SDK example project is this based on? Are you able to recreate the behavior on a Development Kit?

    Best regards,

    Simon

Reply
  • Hi

    Seeing any log messages after setting NRF_LOG_ENABLED to 0 in your project should not be possible. Can you tell me more about your setup, as what you're describing sounds impossible. Are you using an nRF52 DK as a debugger? Are you sure that you're rebuilding and flashing the edited example every time you make any changes?

    Also, what SDK example project is this based on? Are you able to recreate the behavior on a Development Kit?

    Best regards,

    Simon

Children
No Data
Related