[SOLVED] Problem to upload to Pro Micro

Hello, I connected a ProMicro 3.3V board on my PC. Windows recognized the material then the Arduino IDE detected it as "Arduino Leonardo/LilyPad USB". I uploaded the blink code to test the connexion but it ended by an error. Now each time I try to connect it to the computer, Windows alerts "unkonwn device", and the IDE doesn't see the board anymore.

I did it a second time, with another ProMicro board, it happens exactly the same thing. Do you know what happened?

|500x500

I thought I should flash the bootloader but why it was recognized the first time?

On your Pro Micro, is the metal can engraved with "16.000" like the one in the picture you shared, or does it say something like "8.000"?

There are 16 MHz and 8 MHz Pro Micros and if you have a 16 MHz board selected from the Arduino IDE's Tools > Board menu when uploading to an 8 MHz board, or vice versa, then it will cause the exact symptoms you have described.

Mine is 8Mhz, but I could select anything , in the menu AVR boards, there's just 1 Lilypad Arduino USB.

I solved it, I needed to burn the bootloader...

You should actually install SparkFun's boards package.

Go to file -> preferences and add the following in additional boards manager urls: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

Next go to tools -> board -> boards manager and find SparkFun AVR boards and install it. After that you will have entries in the boards menu for the SparkFun boards. Select the ProMicro and next you can select the speed version matching your board.

It's possible your method works only if Windows sees the board connected by USB. In my case the COM port was not available in the Arduino IDE menu, so how can you upload something if there's no serial connexion??

I did differently by writing the bootloader from an UNO to a Pro Micro and now the Pro Micro can be connected by USB and codes upload work fine.

Wally06: It's possible your method works only if Windows sees the board connected by USB. In my case the COM port was not available in the Arduino IDE menu, so how can you upload something if there's no serial connexion??

You can recover the board from that state by resetting it. The cause of the problem is the sketch you uploaded to the Pro Micro, but that doesn't affect the bootloader. So when you reset the board it activates the bootloader, which presents its own CDC COM port to the upload tool. The bootloader only runs for a second or two, so you have to do it right when the upload starts. I had written detailed instructions and explanation of this, but you accomplished the same via the other approach of burning the bootloader (which erases the problematic sketch) before I finished writing it.

But I mention it now because it's a valuable technique for the user of any native USB Arduino board to be aware of. It's pretty easy to "brick" these boards by uploading a problematic sketch, but that's not too much of a problem once you know how to recover quickly.

Ok, thanks for the explanations, interesting to know. By the way, the code was the official “blink” test.

Yeah, the sketch code was not the problem, it was that the sketch was compiled for the wrong board.

:wink: