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

Problems to get the RTT SWD output in a custom board.

Hi to everyone!

I have been getting the output of NRF_LOG_INFO functions through RTT in J-Link RTT Viewer terminal. The code has been executing in nRF52832DK.

Now I want to execute the code in a custom board with the same MCU (nRF52832), but I don't get any output in the terminal.

I thought the output would work in the same way as in DK, but it hasn't worked. In fact I don't receive anything.

I know the code is working because I see the leds blinking in the custom board as it has to be.

I've been looking for the way to fix the problem and I've see in this blog that SWDIO and SWCLK have their own GPIO ports (P0.26 and P0.25, respectively), but in the custom board they don't have any GPIO port assigned.

SWDIO and SWCLK, from custom board, are connected directly to their coresponding pins on P19 port (Debug out) of the development board.

Could this be the problem?

Thanks in advance!

Parents
  • I think you are confusing standard UART terminal sessions and Segger RTT. RTT uses SWD for its communications path and does not require UART. And, SWD comms are not on gpio but are dedicated pins on nRF.

    The segger chip on the DKs provides for virtual SWD comms and also a virtual UART. RTT uses SWD but it sounds like you were actually using UART for logging/debug info and when you switched to your custom board you lost the virtual UART connection that the DKs provide.

    At this point you will either have to provide for the UART path from your custom board or you will need to go through the process to correctly setup RTT.

    Here is some info on RTT:

    devzone.nordicsemi.com/.../

    www.segger.com/.../

  • Maybe I'm confusing UART with RTT a little bit, but I'm sure I'm using RTT because in sdk_config.h file I have checked NRF_LOG_BACKEND_RTT_ENABLED and unchecked NRF_LOG_BACKEND_UART_ENABLED.

    Also, I followed the tutorial to getting started with RTT and in that tutorial doesn't say if I have to change something to use RTT with a custom board.

    You say there is a Segger chip on developer board for virtual SWD comms. So, if there is not that chip on the custom board, I can't use RTT?

Reply
  • Maybe I'm confusing UART with RTT a little bit, but I'm sure I'm using RTT because in sdk_config.h file I have checked NRF_LOG_BACKEND_RTT_ENABLED and unchecked NRF_LOG_BACKEND_UART_ENABLED.

    Also, I followed the tutorial to getting started with RTT and in that tutorial doesn't say if I have to change something to use RTT with a custom board.

    You say there is a Segger chip on developer board for virtual SWD comms. So, if there is not that chip on the custom board, I can't use RTT?

Children
No Data
Related