Descriptor error 43, Teensy 4.0, Windows 10

Hi, I have a problem with Teensy 4.0 programming. It worked as usual, successfully programmed, but yesterday it stopped programming. Seems like there was disconnected power while programming. Now I have descriptor error in device manager on windows 10. If I use Teensy Loader with HEX files, it works.
Screenshot 2022-11-08 122237.jpg
Screenshot 2022-11-08 122341.jpg
IMG_20221108_122612.jpg
Screenshot 2022-11-08 123051.png
 
Usually Error 43 is caused by a program which crashes or otherwise goes wrong in a way that disrupts USB communication while your PC is still reading the USB descriptors to learn which type of USB device just appeared. The first second or two after startup is the time while your PC reads the USB descriptors.

Try adding a delay at the beginning of setup(). Also check if you're using any C++ classes which do substantial stuff in their constructors, which run before setup() for any static instances you've created in your code. Of course this won't fix the problem, but enough delay to allow USB to come up properly might make troubleshooting easier.
 
An example of what Paul mentioned that has hit me before was calling Serial.print() like functions from a constructor of a class, which I had declared instances of. (Actually, the last time, it was not directly in it, but instead within a function it called...

In that case I solved it with something like: if(Serial)Serial.print(...)
 
Back
Top