I have a Arduino MKR Zero and I have a script flashed to work as a keyboard and type "Hello world".
I am not sure why sometimes it gets connected as a COM port and works as intended while many a times, the Device Manager says "Device Descriptor Request Failed". 3/4 times this error shows up and the device does not work. I have to disconnect and connect it multiple times to make it work as intended. I tried changing the cable but it didn't work. I have another Arduino MKR Zero but with the same cable and PC, it works as intended everytime.
Whenever it gets connected sometimes, while re-flashing the code, the update happens, "CPU reset" occurs then after that, it says "Upload Failed".
Why is this issue occurring intermittently? Any solution to it?
This may help on the Windows PC side regarding the "Device Descriptor" issue. It was because somehow Window OS detected that this USB Device/COM Port was not doing "well", so the OS flagged its USB Descriptor keys, and you'll have to do a special procedure to "clear" the bad info. Luckily, there is a free tool for that kind of issue, courtesy of Uwe Siebert. Go to the web link listed below,
and scroll down to find the tool named "Device Cleanup Tool V. 1.3.1" and install it as normal.
Next, make sure that you unplug your MKR Zero from that specific USB port that you were using. Hopefully you still remember which COM Port it was.
Then you'll have to run this program "As Administrator" then you'll see a typical screen like this
This was for my PC, where my MKR ZERO was connected to it as COM11 (6 minutes ago). You see that there are actually two USB items that you need to delete; a USB Composite Device and a USB Serial Device. Just right-click them with the mouse to delete them.
Lastly, reboot your PC and log back in. Then when you re-connect the MKR ZERO to your PC, Windows OS will reinstall back the proper drivers and settings for your MKR ZERO (as it was for the "first" time), and Arduino should behave as "normal" again - hopefully