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
  • I am not the guy who made the original question, but we followed this approach in two devices we are testing right now: a small helicopter drone and a beacon. Programming/debugging is working fine in both, and we connected them directly to an smartphone charger (5V) and nothing happened, they just turned on and worked. Still we have to do extra tests connecting them to PCs, other devices, etc, To see if anything rare happens, or firmware is erased, etc. But looking good so far!

Children
No Data
Related