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

Get debug info from production nRF51822 device via SWD connection

I have a production device which I have soldered an SWD connection from a Keil project via the nrf51822 DK (port 20). I can flash code to this production device, but I cannot debug it since I need to power the device first before I can run the debugger. By then the sensor MCU and nrf51822 MCU have initialized and anything I do will corrupt the behavior and the device will not function. The device is designed that way and I cannot change it. So the best I can do is make changes, flash, and run.

What I would like to do is put in the equivalent of 'print' statements that would get sent back to Keil through the SWD connection WITHOUT running the Keil debugger (since that will corrupt the behavior). So when I restart the device, this information would be displayed on the PC in one of the Keil windows. Is this possible or just a pipe dream?

Thanks

Parents
  • Hi Brian, 
    I don't fully understand what you described about your setup. 

    My understanding is that when you start debugging with KEIL, nRF51 will be reset and start from booting. Is the issue related to that the sensor MCU may already initialized and won't work with the just-reset nRF51 ? 

    If you want to get the log without running debugging you can think of using RTT log. The logging is printed to RAM and the SWD interface will access the RAM area and throw them to RTT interface. You can use Jlink RTT Viewer to read the log. We have RTT logging backend in our examples in SDK v12. 

Reply
  • Hi Brian, 
    I don't fully understand what you described about your setup. 

    My understanding is that when you start debugging with KEIL, nRF51 will be reset and start from booting. Is the issue related to that the sensor MCU may already initialized and won't work with the just-reset nRF51 ? 

    If you want to get the log without running debugging you can think of using RTT log. The logging is printed to RAM and the SWD interface will access the RAM area and throw them to RTT interface. You can use Jlink RTT Viewer to read the log. We have RTT logging backend in our examples in SDK v12. 

Children
Related