Device disconnected

The USB device was removed during the session.

DEVICE_DISCONNECTED

Symptoms

  • An active session ends with "device disconnected" without anyone touching the board.
  • The probe re-enumerates (USB chime on Windows) by itself.
  • Drops happen under load — during flashing or fast monitoring.

Likely causes

  • Marginal USB cable or connector — micro-USB connectors wear out and drop under vibration.
  • USB hubs/docks power-cycling ports, or OS USB power management suspending the device.
  • Board-side EMI: motor drivers or switching loads resetting the probe.
  • The target board browns out when flash programming raises current draw.

How to fix it

  1. Replace the cable and go direct

    Use a short, known-good cable straight into the computer. This alone fixes the majority of random disconnects.

  2. Disable USB power saving

    Windows: Device Manager → USB Root Hub → Power Management → uncheck "Allow the computer to turn off this device". Linux: check powertop/autosuspend settings.

  3. Separate probe wiring from power electronics

    If drops correlate with motors/relays switching, shorten SWD wires, add common ground, and route away from power paths.

  4. Check board power budget

    If the board is USB-powered through the probe, confirm it does not brown out during flash — power it externally to test.