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

Can the nRF52 detect whether a JLink is connected to the debug port?

I want to dump lengthy log data out through an RTT connection if the JLink is connected but NOT spend that time if there's no physical RTT channel present. The idea is that our customers won't have JLink connected and won't suffer through that delay (slow flash memory read), but engineering will have the choice of either capturing that data or having a rapid power down.

Parents
  • Hi,

    There is no way for the nRF to determine if a debugger is connected, so the RTT logging must be the same regardless of if the RTT buffer is actually read by a debugger or not. In most cases this is solved by only including logging in debug builds of the firmware.

    Please note that RTT only store data in a circular RAM buffer, so flash memory read or write speeds has no impact on RTT logging.

Reply
  • Hi,

    There is no way for the nRF to determine if a debugger is connected, so the RTT logging must be the same regardless of if the RTT buffer is actually read by a debugger or not. In most cases this is solved by only including logging in debug builds of the firmware.

    Please note that RTT only store data in a circular RAM buffer, so flash memory read or write speeds has no impact on RTT logging.

Children
No Data
Related