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

nrf52832 not working outside debugger.

Hi

I have a wired situation in my project. Everything is working fine when I am running my heart-rate device with the debugger. When I detach the debugger or just power-cycle the device behaviour becomes wired. The device still advertise, so I can see it from my phone. But, when I try to connect to it from my phone, it will not connect anymore. If I do "connect jLink" from Segger studio, then everything works fine again.

I am using SEGGER_RTT_WriteString a lot, and I suspected that it could be that the output to the debugger via SWD was blocking when I am not running the debugger. So, I have checked in my code that I am doing SEGGER_RTT_Init() at start, and I have set the SEGGER_RTT_CONFIG_DEFAULT_MODE to 0 (i.e SKIP when buffer is full).

I am using nRF52832 with our own HW, Segger Studio and j-Link Ultra. The sdk version 14.2.0.

Any idea where to start looking for a solution?

Regards Arne

Parents Reply
  • That is 100% incorrect. RTT writes to a circular buffer and if nothing reads it, it just overwrites. RTT is designed and documented to be left enabled even if you don't have a debugger connected with that exact purpose, ensuring that you don't need to change code depending on whether you are debugging or not.

    Quote from the Segger RTT site

    A:	SEGGER-RTT uses non-blocking mode per default, which means it does not halt program execution if no debugger is present and J-Link is not even connected. The application program will continue to work.
    

    So whatever the original poster's issue is, it's not that.

Children
No Data
Related