March 25, 2025

Black Pill boards - F411 USB -- bad cable

This isn't the first time I have wasted time due to bad USB cable.

I am working with my F429 discovery board. I am in the midst of tidying up the VCP source code. Just to make sure I haven't done something stupid, I recompile frequently, which often reveals unexpected dependencies and other surprises. Also, once in a while, I boot the code and test it to be sure that it runs properly.

Running properly means that it enumerates and gets identified as some kind of /dev/ttyACM device by linux. It also means that I can successfully send some data.

After some edits, the code would not run properly. I had no idea what I had done wrong, so I resorted to using git to take me back to a commit that I had noted did work. However it did not work. So I tried powering off the board for a time and starting it up again. No luck still. I am using the micro-USB OTG connection. In the midst of this I plug and unplug the micro-USB and get some action, albeit erratic. I find that if I hold the cable a certain way, it does work. I hope the connector to the disco board is not what is damaged.

Conclusion

What can we learn from this? Test and commit often! I only commit when I get a clean compile. And I mostly only commit when the code runs properly (but not always if I am in the midst of some big development).

Cheap cables are your worst enemy, and there are lots of cheap USB cables out there. The bad one that caused this trouble was black, and I replaced it with a white one. I am reluctant to place the blame on color, but you never know.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org