I was working with a 32U4 ( Adafruit 32U4 Basic Proto Feather) and all of a sudden I got a message from the PC saying that the USB device had malfunctioned. Since then I was unable to use the module as it stopped running my code.
I then was able to download the Blink.ino by forcing reset twice and it is working. But that is about all i can do now. My code which was running well uses LCD and Serial and that is gone for good. The LCD does not even initialize. ( But i am able download the full code by forcing reset)
Is there any way to recover this "bricked " 32U4 ? And going by the symptoms as above is it even worth trying ?
To get a new 32U4 feather board in India it will take atleast 2 weeks.
Connected the bricked 32U4 Feather and the bootloader burn in happend via a UNO with no glitches at all.
I then removed the 32U4 and directly plugged that into the PC. And instantly the PC came up with the "The USB device malfunctioned ...."warning.
And even now i can download code into the 32U4 by double pressing the Reset button and its only the normal serial operation that gets into a problem.
SO this rules out issue with bootloader ?
( I would have been happy if the Adafruit support eco-system was a little bit more active ... truly they must be responding to this issue. I had posted there also the same day i posted here )
I then removed the 32U4 and directly plugged that into the PC. And instantly the PC came up with the "The USB device malfunctioned ...."warning.
I normally get this kind of message from the PC when there is some sort of hardware issue, usually a wiring problem, if the USB socket is not properly soldered on the PCB etc.
In your case however, you say that you are able to use the serial port to upload a sketch which rules out USB wiring issues.
I am running out of ideas...
Are you able to connect and properly operate any other (commercial) 32U4 board?
What is the voltage level available from the PC USB port ? Is it really 5V or has it been degraded?
Try also connecting a, say, 47-100uF capacitor across the supply rails to see if it makes any difference.
As I understand when Power is applied two things happen :
First the boot loader kicks in on a Serial port say COM 5.
Waits for sometime.
When no code download is happening it switches over to user code Serial port and which normally is One number less than previous ... so COM 4
Does all this happen on account of the boot loader or there is some native firmware that is responsible for this com port switching. ?
I am not an expert on bootloaders, but my understanding is that the sketch upload procedure is indeed handled by the bootloader and in the absence of an upload, the bootloader hands over control to the main program.