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!