Custom Board with UART and SWD

I am looking to build a custom board using nrf52840 and want both UART and flashing capabilty on the custom board. I have a NRF52840dk that I will use to program the custom board and act as an interface for uart for the custom board. I am planing on using a USB port on the custom board. Now since the usb port has 5 pins at max where as I need 6, power, gnd, swdio, swdclk, rx & tx for uart. 

What are my options here. I have the following ideas would be great to know if they are possible:

- I don't power the custom board via usb and power it using a battery and connect all other pins to the DK.

- I use RTT instead of UART for communication and data transfer that would take four pins. 

- If there is a way to use the swd pins for uart. 

Thanks in advance.

  • Hi,

     

    - I don't power the custom board via usb and power it using a battery and connect all other pins to the DK.

     This is an ok option.

     

    - I use RTT instead of UART for communication and data transfer that would take four pins. 

     What kind of communication are you thinking of? The RTT interface is only meant to be used for debugging and should not replace UART as a communication interface in a final product.

     

    - If there is a way to use the swd pins for uart. 

     No, not really. The pins are dedicated for SWD. 

    Adding an extra pin header would also solve this issue :)

    regards

    Jared 

Related