I've encountered a weird problem with my WCH-LinkE programming adapter that I'm at a loss to explain. I simply can't fathom what is going on.
I've got this project involving a CH32V003 that I've been working with on-and-off for a while that involves it emulating an I2C EEPROM connected to a Raspberry Pi. I've been working towards allowing the emulated EEPROM contents to be written to from the Pi. Now I'm at the stage where I'm trying to test my code.
The weird problem I ran into with the WCH-LinkE is as follows:
1. The CH32V003 is connected via I2C to the Raspberry Pi. The WCH-LinkE is connected to SWIO, RST, UART TX, UART RX, and GND. It is
not powering my device. I also have a Saleae clone logic analyser connected to the I2C bus.
2. When I attempt to write to the emulated EEPROM from the Pi, I have some kind of bug in my code (yet to be determined) that causes the MCU to crash or lock-up (possibly an exception occurs or maybe it gets stuck in a loop, I dunno).
3. For some reason, this causes the
WCH-LinkE to die and become completely unresponsive!
And somehow this
persists even when I un-plug and re-plug its USB connection to my PC, because it fails to enumerate when I do so (with error message popup from Windows - "USB device not recognised").
And as if that wasn't weird enough, there's more:
The WCH-LinkE only refuses to enumerate with the two specific USB2 ports on the front of my PC (one of which it was originally connected to). I can re-connect it to one of the USB3 ports on the front, and it works fine straight away. And I can un-plug from there straight back to a USB2 port and it doesn't work again. But after an indeterminate amount of time, it will work again in the USB2 ports.
I don't know WTF is going on here. Anyone got any ideas?