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

Can I use UART with an external module linked up to nRF51DK via SWD?

I am really struggling getting anything to work on my revision 1 module and as it has nothing connected at this moment all I can use is BLE or UART to observe any function.

If it is possible.. how to find out the correct values for

  RX_PIN_NUMBER,
  TX_PIN_NUMBER,
  RTS_PIN_NUMBER,
  CTS_PIN_NUMBER,

?

Parents
  • Hi.

    Maybe J-Link Real Time Terminal is what you seek? Tutorial here: Debugging with Real Time Terminal.

    If this is not applicable to you, what module are you using? Correct values for the pins totally depends on what GPIOs are available on your module. And remember that you can route the UART signals on the nRF51 to any GPIO pins you want and you don't necessarily need the RTS and CTS pins.

  • Of course UART can't be routed via SWD. There are some logging protocols ARM provides which do run over the debug interface, but the NRF51 doesn't have any of them and I don't often see them used anyway. None of them have anything to do with a UART which is entirely a different thing.

    RTT is a Segger thing. Look up Segger RTT, it's documented on their site. It's very easy to use and I see now there's even a tutorial someone has kindly written for Nordic's chips. yes it uses the USB on the PC but not the serial port piece, it uses the Segger J-Link piece directly. All it really does is read a chunk of memory off the chip at regular intervals like any other chunk of memory can be read, the Segger RTT code sets up a ring buffer to dump text into, bidirectionally. It's actually very simple, just that Segger have made it into a defined API and integrated it into their debugger.

Reply
  • Of course UART can't be routed via SWD. There are some logging protocols ARM provides which do run over the debug interface, but the NRF51 doesn't have any of them and I don't often see them used anyway. None of them have anything to do with a UART which is entirely a different thing.

    RTT is a Segger thing. Look up Segger RTT, it's documented on their site. It's very easy to use and I see now there's even a tutorial someone has kindly written for Nordic's chips. yes it uses the USB on the PC but not the serial port piece, it uses the Segger J-Link piece directly. All it really does is read a chunk of memory off the chip at regular intervals like any other chunk of memory can be read, the Segger RTT code sets up a ring buffer to dump text into, bidirectionally. It's actually very simple, just that Segger have made it into a defined API and integrated it into their debugger.

Children
No Data
Related