TimeSaver3000 USB cable for those finickity dev-kits
But have you really tried turning it off and on again?
Date:
[]
Views: [100]
Categories:
[embedded]
Tags:
[usb],
[dev]
This cable is one of the things I wish I could go back and gift myself as a junior embedded systems engineer 20-odd years ago.
A huge part of my career has been spent unplugging and plugging back in USB dev-kits, comms cables, and other bits of hardware to make them work. Suppliers expect developers to just live with these inconveniences, and for the most part, we do.
The most recent culprit I’ve found with this issue is the Atmel-ICE when running under Windows using the open-cortex toolchain and VSCode. When I use the same hardware and SDK under my Linux VM, I've no problems, but under Windows, I need to unplug and plug it back in again between each debug session.
I’d been living like this for around a year, searching for software solutions, but I recently lost the tattie and decided to fix it in hardware. Not a proper fix, like resolving some dodgy termination, but making a cable that I can cycle the connection of with the flick of a switch. The great thing about this fix is I can reuse it next time I’ve got a dodgy Aardvark or an Arduino that refuses to go into boot-mode smoothly.
I took a short USB extension cable, which I think came with an Amazon Fire Stick, and did the following:
- Carefully spliced it open
- Cut the power and ground cables
- Wired them through a couple of NC switches (switches that are ON until they’re pushed)
- Heat-shrunk the whole thing together
Now, when I need to reset the device, I just pinch the two switches and voila, debugging works!
The first approach I tried was to pull the data lines low, like the USB protocol suggests to invoke a reset, but this didn’t fully reset the Atmel-ICE. I also tried using just one switch on the power line, but again, no dice.
The only thing I’d do differently next time is get a dual-throw switch to reduce the part count. For now, though, the TimeSaver3000 is perfect.
PS: Top tip. Put coloured zip-ties at the end of your cables so you can easily spot which cable goes where when you've got a spiders-nest of cables on your desk.