Arduino Micro isn't being detected at all after aborting code upload from the IDE button. It powers on and reset resets it but it still doesnt detect it anymore.
Hi @ottoomio. The tricky thing about the boards with native USB capability like your board is the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the USB code, or stop it from running. When that happens, the board no longer produces a serial port.
This can be unexpected to those who previously mainly worked with the boards like Uno and Mega with a dedicated USB chip that can never be affected by the sketch code.
The missing port makes it so you can't upload normally any more. However, the situation is really not so bad because there is an independent program called the bootloader in a separate section of memory from your sketch, and that program has its own USB CDC code. So even if the sketch is completely broken, you only need to activate the bootloader to get a port back and be able to upload.
You need to get the timing right. If you press the reset button too early, the bootloader will have already timed out by the time the upload starts. The tricky thing is that when you press the "Upload" button in Arduino IDE, it first compiles your sketch before starting the actual upload. So you need to wait until after the compilation finishes before pressing the reset button.
Try this:
- Select Sketch > Upload from the Arduino IDE menus.
- Watch the black "Output" panel at the bottom of the Arduino IDE window until you see something like this:
Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. - Immediately press and release the reset button on the Arduino board.
The upload should now finish successfully.
Although this technique allows you to recover the board from the state where it doesn't produce a port, allowing the upload of a new sketch, it doesn't address the cause of the board going into that state. This means that if the no port state was unexpected and you upload a sketch that has the same problem that caused that state in the first place, the problem will persist. If you find this is the case, you can add a reply here on this forum topic to let us know and we'll provide assistance in identifying the problem.
For the Micro it should be a double tap as far as I know (mine is a what's next so that might be the difference). Clones with the Leonardo bootloader is a different story, in that case a single tap will do the job.
The official Arduino Micro board uses the same bootloader as the official Leonardo board, both of which are put into boot mode by a single reset.