promicropins

The case of the broken Pro Micro (reprise)

Revisited – one year later

Looking at this issue again, The case of the broken Pro Micro, one year later, when I connect the Pro Micro to a USB port on the PC, it is just not recognised. It is worth noting that I was using a newer version of the Arduino IDE (1.6.11) this time around. Last year I was using version 1.6.5.

The Pro Micro board, that I have, is a 3.3V board, and one can tell, because the J1 jumper is not connected. The image below shows a 5V Pro Micro, with J1 connected (or rather with its contacts soldered together)

Location of jumper J1
Location of jumper J1

On the 5V Pro Micro they are connected, among other things – from Pro Micro – 3.3V/8MHz

“Yeah, the only difference is between the two are the voltage regulators, external crystal oscillator, jumper J1 next to the microB USB connector (closed for the 5V version). The ATMega32U4 chips are the same that is used for each of the boards but they are uploaded with VID in the bootloader. This is why the board is not recognized in the device manager after uploading code with the wrong board selection. Somewhere when programming the board with the bootloader, there’s a line of code that needs to be changed. Our engineer hasn’t looked at it in a while but it there is a line where it has “PLR CSR.” The reason why is because the 3.3V and the 5V have different PIDs. They are indicated in the boards.txt in the SF32u4_boards folder for the board definitions. Looking at the boards.txt file, it looks like the extended bits are also different. You should keep that in mind when programming the ATMega32U4 microcontroller. I think it would be easier to just buy a 3.3V Pro Micro board than to mess around with the firmware and rework the board.“

I thought I would try the USBasp bootloader burning again. However, I did not have a USBasp, so I would need to use an Arduino Uno, or rather an Arduino Ethernet Board. In order to use an Arduino as an ISP, and make the right connections for a Pro Micro, I followed the links below:

These links provided invaluable images for completing the task. From the first link:

Arduino used as an ISP
Arduino used as an ISP

From the second link

The connections from ASP to Arduino Pro Micro are as follows

USB-ASP Arduino
1 MOSI D16
2 VCC VCC
5 RST RST
7 SCK D15
9 MISO D14
10 GND GND

However, as I do not have a 10 pin header, and as the top image (of the Arduino Uno to Arduino Uno) does not label which pins on the AVR 6 pin header, of the Arduino being programmed, are which signals, it still does not help when trying to connect the Uno (or Arduino Ethernet Board) to a Pro Micro.

So, using the following diagram of a 6 pin AVR header, to decypher the top fritzing diagram, it is possible to work out which pins from the Arduino Uno (or Arduino Ethernet board) go to which pins on the Pro Micro

AVR 6 pin header
AVR 6 pin header

We can see that the table now becomes

Arduino Uno (Programmer) Arduino Pro Micro
11 MOSI D16
VCC VCC
10 RST RST
13 SCK D15
12 MISO D14
GND GND

The wiring is thus

Arduino Ethernet Board to Pro Micro
Arduino Ethernet Board to Pro Micro

Fritzing Pro Micro

As an aside, regarding the Pro Micro used in the Fritzing diagram:

Fritzing Pro Micro
Fritzing Pro Micro

For the Fritzing version of a Pro Micro use Github: unorthodox-engineers/unorthodox-arduino/Unorthodox/fritzing/parts/Pro Micro.fzpz

This version I could not get to import correctly: Github: htho/fritzing-parts/sparkfun-promicro/, so I discarded it.


Now that the Arduinos are wired up correctly, we turn to the software.

  1. Open the Arduino IDE
  2. Select the Port
  3. In the Tools menu select the “Board” as Arduino Uno, or Arduino Ethernet, as appropriate
  4. Compile and Upload the example sketch “11. ArduinoISP”
  5. Now, in the Tools menu select the “SparkFun Pro Micro 3.3V/8MHz” option for the “Board”
  6. Staying in the Tools menu, select for “Programmer” the “Arduino as ISP” option
  7. Then, again in the “Tools” menu, select “Burn Bootloader”

This was the output that I got:

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/bin/avrdude -CC:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM16 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xfe:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m 

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xfe"
avrdude: writing efuse (1 bytes):

Writing |  ***failed;  
################################################## | 100% 0.10s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xfe:
avrdude: load data efuse data from input file 0xfe:
avrdude: input file 0xfe contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xce instead of 0xfe (double check with your datasheet first).
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xd8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd8:
avrdude: load data hfuse data from input file 0xd8:
avrdude: input file 0xd8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/bin/avrdude -CC:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM16 -b19200 -Uflash:w:C:\Users\davinci\Documents\Arduino\hardware\sparkfun\avr/bootloaders/caterina/Caterina-promicro8.hex:i -Ulock:w:0x2F:m 

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\davinci\Documents\Arduino\hardware\sparkfun\avr/bootloaders/caterina/Caterina-promicro8.hex"
avrdude: writing flash (32758 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32758 bytes of flash written
avrdude: verifying flash memory against C:\Users\davinci\Documents\Arduino\hardware\sparkfun\avr/bootloaders/caterina/Caterina-promicro8.hex:
avrdude: load data flash data from input file C:\Users\davinci\Documents\Arduino\hardware\sparkfun\avr/bootloaders/caterina/Caterina-promicro8.hex:
avrdude: input file C:\Users\davinci\Documents\Arduino\hardware\sparkfun\avr/bootloaders/caterina/Caterina-promicro8.hex contains 32758 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 32758 bytes of flash verified
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x2F:
avrdude: load data lock data from input file 0x2F:
avrdude: input file 0x2F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

This should do the trick, and the LED should start flashing. Unfortunately, the Pro Micro just sat there.

However, may I have been mistaken that the LED would start blinking, and maybe the bootloader did not install the Blink sketch?

So, I pulled the Pro Micro out of the breadboard, where it was wired up tot he Arduino Ethernetboard board that I was using as an ISP, and connected it directly to the PC via the USB. Hey presto! The device was finally recognised in Device manager, although there still seemed to be an issue (ignore the Unknown Device, that is a defect on my PC and is always there):

The Pro Micro appears in Device Manager
The Pro Micro appears in Device Manager

However, I got the following error in 1.6.11, when I tried to upload Blink.

Build options changed, rebuilding all
Warning: platform.txt from core 'SparkFun AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp: In function 'int USB_RecvControl(void*, int)':

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp:439:7: error: 'length' does not name a type

  auto length = len;

       ^

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp:440:8: error: 'length' was not declared in this scope

  while(length)

        ^

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp:444:8: error: 'recvLength' does not name a type

   auto recvLength = length;

        ^

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp:445:6: error: 'recvLength' was not declared in this scope

   if(recvLength > 64){

      ^

C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino\USBCore.cpp:451:31: error: 'recvLength' was not declared in this scope

   Recv((u8*)d + len - length, recvLength);

                               ^

exit status 1
Error compiling for board SparkFun Pro Micro 3.3V/8MHz.

I decided to download the drivers again, as there was an issue showing in Device Manager with the yellow triangle. I did so from Pro Micro & Fio V3 Hookup Guide – Installing: Windows, obtaining the zip file Arduino_Boards-Master.zip. Then selecting the defective Pro Micro in Windows Device Manager, right clicking and “Update Driver Software”, following these instructions, from the link:

Unzip that zip file, and don’t forget where you’ve left its contents. In that zip file, you should find an INF file, which contains all the information Windows needs to install the Pro Micro’s driver. This sparkfun.inf will be found in Arduino_Boards-master → sparkfun → avr → signed_driver.

Once the driver was installed, then the Pro Micro appeared correctly in Device Manager (ignore the Unknown Device, that is a defect on my PC and is always there).

Pro Micro correctly installed
Pro Micro correctly installed

Upon compiling Blink, I still got the error above

Warning: platform.txt from core 'SparkFun AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.

I clearly  needed to modify, or reinstall, the SparkFun board files in the 1.6.11 latest install. Remember I was using a newer install of the Arduino IDE (1.6.11, since the last time (last year) that I had approached the issue of the broken Pro Micro). Returning to Pro Micro & Fio V3 Hookup Guide – Installing: Windows, and adding the following URL to the Board Manager line in the Preferences dialog in the Arduino IDE:

https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

Then opening the “Board Manager…” in the Tools/Boards menu, I searched for the “SparkFun AVR Boards” package and installed it. After installation, I selected the newly added “SparkFun Pro Micro” option in the Tools/Boards Menu, en lieu of the previous “SparkFun Pro Micro 3.3V/8MHz”, which was still there. I noticed that there was a new Processor option in the Tools menu, in which was selected “ATmega32U4 (3.3V/8MHz)”, which was the correct option for my board.

The Processor menu
The Processor menu

This time, when I compiled and uploaded the Blink sketch, it worked without issue, or rather without compiler error.

Sketch uses 4,132 bytes (14%) of program storage space. Maximum is 28,672 bytes.
Global variables use 148 bytes (5%) of dynamic memory, leaving 2,412 bytes for local variables. Maximum is 2,560 bytes.
Forcing reset using 1200bps open/close on port COM20
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, } => {}
PORTS {COM3, } / {COM3, COM19, } => {COM19, }
Found upload port: COM19
C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/bin/avrdude -CC:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf -v -patmega32u4 -cavr109 -PCOM19 -b57600 -D -Uflash:w:C:\Users\davinci\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.hex:i

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf"

Using Port : COM19
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\davinci\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.hex"
avrdude: writing flash (4132 bytes):

Writing | ################################################## | 100% 0.41s

avrdude: 4132 bytes of flash written
avrdude: verifying flash memory against C:\Users\davinci\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\davinci\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.hex:
avrdude: input file C:\Users\davinci\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.hex contains 4132 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.13s

avrdude: verifying ...
avrdude: 4132 bytes of flash verified

avrdude done. Thank you.

However, there was still no blinking LED. Then it dawned on me.

As with the Arduino Ethernet Board, there is no LED wired to Pin 13 on the Pro Micro.  This was due to the small size of the board. Going to Pro Micro & Fio V3 Hookup Guide – Example 1: Blinkies! I uploaded the following code

/* Pro Micro Test Code
by: Nathan Seidle
modified by: Jim Lindblom
SparkFun Electronics
date: September 16, 2013
license: Public Domain - please use this code however you'd like.
It's provided as a learning tool.

This code is provided to show how to control the SparkFun
ProMicro's TX and RX LEDs within a sketch. It also serves
to explain the difference between Serial.print() and
Serial1.print().
*/

int RXLED = 17; // The RX LED has a defined Arduino pin
// The TX LED was not so lucky, we'll need to use pre-defined
// macros (TXLED1, TXLED0) to control that.
// (We could use the same macros for the RX LED too -- RXLED1,
// and RXLED0.)

void setup()
{
pinMode(RXLED, OUTPUT); // Set RX LED as an output
// TX LED is set as an output behind the scenes

Serial.begin(9600); //This pipes to the serial monitor
Serial1.begin(9600); //This is the UART, pipes to sensors attached to board
}

void loop()
{
Serial.println("Hello world"); // Print "Hello World" to the Serial Monitor
Serial1.println("Hello!"); // Print "Hello!" over hardware UART

digitalWrite(RXLED, LOW); // set the LED on
TXLED0; //TX LED is not tied to a normally controlled pin
delay(1000); // wait for a second
digitalWrite(RXLED, HIGH); // set the LED off
TXLED1;
delay(1000); // wait for a second
}

This worked!

Conclusions

  1. For some reason, last years attempt at recovery (see The case of the broken Pro Micro), with the USBasp failed
  2. This time around, using the Arduino Ethernet board it worked, and the, apparently bricked, Pro Micro was brought back to life
  3. Windows 7 needed the drivers to be added, for the Pro Micro to be assigned a COM Port
  4. The wild goose chase with the boards.txt file last year, seems to have been a bit of a red herring. Either that, or…
  5. There was a defect in the SparkFun AVR boards files that I used last year
  6. The new Arduino IDE 1.6.11 needed the new SparkFun AVR boards package to be added

Addendum

I did experience some further strange behaviour, which seems to be just in the nature of the Pro Micro.

I noticed for a while that the Pro Micro was listed in Device Manager as being on Port 19, with the label “Pro Micro Bootloader” (see screen shot). It resolutely stayed like that permanently, this was not a trasitional state due to a reset. It appeared to have hung in this state, although it was not “bricked” as before, because it was showing up in Device Manager (the “bricked” Pro Micro did not appear in Device Manager at all).

Pro Micro bootloader on COM port 19
Pro Micro bootloader on COM port 19

When I tried to upload the message I received was

Sketch uses 5,052 bytes (17%) of program storage space. Maximum is 28,672 bytes.
Global variables use 343 bytes (13%) of dynamic memory, leaving 2,217 bytes for local variables. Maximum is 2,560 bytes.
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.

However, when I tried to upload for the second time, the Arduino IDE appeared to force a reset, and the upload succeeded (weird!).

Sketch uses 5,052 bytes (17%) of program storage space. Maximum is 28,672 bytes.
Global variables use 343 bytes (13%) of dynamic memory, leaving 2,217 bytes for local variables. Maximum is 2,560 bytes.
Forcing reset using 1200bps open/close on port COM19
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
PORTS {COM3, COM19, } / {COM3, COM19, } => {}
Uploading using selected port: COM19
C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/bin/avrdude -CC:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf -v -patmega32u4 -cavr109 -PCOM19 -b57600 -D -Uflash:w:C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:i

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf"

Using Port : COM19
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex"
avrdude: writing flash (5052 bytes):

Writing | ################################################## | 100% 0.46s

avrdude: 5052 bytes of flash written
avrdude: verifying flash memory against C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:
avrdude: load data flash data from input file C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:
avrdude: input file C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex contains 5052 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.14s

avrdude: verifying ...
avrdude: 5052 bytes of flash verified

avrdude done. Thank you.

This reset not only caused the upload to work but also, after uploading, the Pro Micro was put on to Port 20 and in Device Manager reported “COM 20 Pro Micro”, without the “Bootloader label”

Pro Micro on COM port 20
Pro Micro on COM port 20

However, a subsequent attempt at uploading resulted in a repeat of the first error, “Couldn’t find a Board on the selected port”, but this time on Port 20, en lieu of Port 19

Sketch uses 5,052 bytes (17%) of program storage space. Maximum is 28,672 bytes.
Global variables use 343 bytes (13%) of dynamic memory, leaving 2,217 bytes for local variables. Maximum is 2,560 bytes.
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.

However, we already know that a reset, or power up, is required to put the Pro Micro into bootloader mode.

By starting the compile and upload, with the Pro Micro plugged in and on Port 20 on the Windows Device Manager, and the Arduino IDE having port 20 selected, and then unplugging the board from the USB while the compiling was going on and then carefully timing plugging the board back in, towards the end of the compile, but before the upload began, enabled me to upload the sketch again.

Unplugging, and more importantly, plugging back in, effectively forces a reset, for the bootloader to load. The same effect, as we all know can be achieved by grounding the reset (RST) pin.

Note in the output below, the transition from the Arduino IDE from port 20 where it thought the Pro Micro was, to Port 19, once it is plugged in and recognised as being in bootloader mode.

Sketch uses 5,052 bytes (17%) of program storage space. Maximum is 28,672 bytes.
Global variables use 343 bytes (13%) of dynamic memory, leaving 2,217 bytes for local variables. Maximum is 2,560 bytes.
Forcing reset using 1200bps open/close on port COM20
PORTS {COM3, COM20, } / {COM3, COM20, } => {}
PORTS {COM3, COM20, } / {COM3, } => {}
PORTS {COM3, } / {COM3, COM19, } => {COM19, }
Found upload port: COM19
C:\Users\davinci\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6/bin/avrdude -CC:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf -v -patmega32u4 -cavr109 -PCOM19 -b57600 -D -Uflash:w:C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:i

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\davinci\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.5/avrdude.conf"

Using Port : COM19
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex"
avrdude: writing flash (5052 bytes):

Writing | ################################################## | 100% 0.47s

avrdude: 5052 bytes of flash written
avrdude: verifying flash memory against C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:
avrdude: load data flash data from input file C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex:
avrdude: input file C:\Users\davinci\AppData\Local\Temp\build18ec045bf32c9c69c8579efec663f73c.tmp/BlinkyProMicro.ino.hex contains 5052 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.17s

avrdude: verifying ...
avrdude: 5052 bytes of flash verified

avrdude done. Thank you.

blah

Advertisements

4 thoughts on “The case of the broken Pro Micro (reprise)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s