Using a USB cable for SWD interface

I've seen a few posts about this, but they are all old, and maybe don't apply to USB-C

We have a device that already uses USB-C for battery charging. We want to carry the SWDIO and CLK signals using the USB-C cable. We don't expect to be able to just plug this into a computer to flash. We will of course have a custom interface to connect this properly to the JLink or other programmer.

The question is, is it safe to do this? We don't want damage to either the computer or the nRF52832 if the user connects this to the computer. It would be common for users to charge the device with a computer, so 100% this will happen often. 

Anyone got recommendations on which pins to use? Anyone done and tested this?

Parents
  • Hi,

    The question is, is it safe to do this? We don't want damage to either the computer or the nRF52832 if the user connects this to the computer. It would be common for users to charge the device with a computer, so 100% this will happen often. 

    As long as the signals connected to the SWD port doesn't exceed the absolute maximum ratings then it should be safe,

    Whether it will work is a different question, and tbh you just have to build a prototype and test. I can't tell you for sure, I've seen designs where people have routed the SWD lines through USB and it resulted in it not working because of the long trace, or it worked but only on the lowest possible programming frequency also due to the long trace.

    regards

    Jared 

  • I don't think the wire length will be an issue. We will have a custom interface board to plug into the JLink. Just have a short cable for that. And you are correct, just need to test this. Probably some protection on the pins would also be a good idea.

Reply Children
No Data
Related