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

Is it safe to use USB dp/dm pins for SWD interface?

We are building a new version of a small device with the new nRF52832. Its only external connection is a micro USB plug that we use for charging - we do not need it as USB data interface. But would like to (mis-)use the two data pins for Serial Wire Debug (SWCLK/SWDIO) for flashing, debugging, and RTT. As long as charging is done with our standard charger, everything is fine, because we do not connect the USB data lines.

Is it safe, if the device is connected/charged via a USB host, e.g. a PC, or is it possible that an USB host causes mal-functioning of the nRF52832, i.e. stops/crashes the application code?

EDIT: Assume that signals are clipped to protect the SWD-pins electrically from over-voltage.

Has anyone experience with a similar setting?

Parents Reply
  • In our current designs we have no special protection, SWD lines connected directly to USB lines. Also we do not do anything in software. The VUsb (5V or 3.3V if programmer) goes thru an 3.3V LDO before powering nRF. The idea of doing something in software could be interesting, maybe. New idea: link VUsb to resistor bridge and next to nRF ADC pin. Then in software you can sense that pin and do different things if 5V or 3.3V or 0V is present. And maybe disable SWD interface when 5V is present?? Not sure if that is even possible by software.

Children
No Data
Related