Go Down

Topic: Flashing bootloader on custom Arduino Micro board with Atmel-ICE (Read 920 times) previous topic - next topic

FreakyCoding

Mar 08, 2015, 11:04 am Last Edit: Mar 08, 2015, 11:09 am by FreakyCoding Reason: small typo, added programmer
I have created a bunch of Arduino Micro boards which i am having problems flashing. I have taken a look at the avrdude.conf file within Arduino IDE 1.6 and copied all the necessary fuses. But the lock fuse seems to be making some verification problems and the flashing via USB is not succeeding.

Here are the avrdude lines:

Code: [Select]
avrdude -c atmelice_isp -p m32u4 -P usb -e -u -U lock:w:0x3F:m efuse:w:0xCB:m -U hfuse:w:0xD8:m -U lfuse:w:0xFF:m
avrdude -c atmelice_isp -p m32u4 -P usb -V -U flash:w:Caterina-Micro.hex
avrdude -c atmelice_isp -p m32u4 -P usb -U lock:w:0x2F:m


When the first line is executed:

Code: [Select]
avrdude -c atmelice_isp -p m32u4 -P usb -e -u -U lock:w:0x3F:m efuse:w:0xCB:m -U hfuse:w:0xD8:m -U lfuse:w:0xFF:m


avrdude: AVR device initialized and ready to accept instructions

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

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

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

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: verification error, first mismatch at byte 0x0000
         0xff != 0x3f
avrdude: verification error; content mismatch

avrdude done.  Thank you.


The second line:

Code: [Select]
avrdude -c atmelice_isp -p m32u4 -P usb -V -U flash:w:Caterina-Micro.hex

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9587
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 "Caterina-Micro.hex"
avrdude: input file Caterina-Micro.hex auto detected as Intel Hex
avrdude: writing flash (32730 bytes):

Writing | ################################################## | 100% 38.91s

avrdude: 32730 bytes of flash written

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

avrdude done.  Thank you.


And the last line:

Code: [Select]
avrdude -c atmelice_isp -p m32u4 -P usb -U lock:w:0x2F:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9587
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

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

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: verification error, first mismatch at byte 0x0000
         0xff != 0x2f
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

avrdude done.  Thank you.



As you can see the lock fuses are failing. But why?

When attempting to program the board via Arduino IDE and USB connection i get following error while the LED is blinking extremely fast. I also notice that the green LED on pin 13 is blinking much slower than 1s. There is a 16MHz crystal external as the original Arduino Micro.

Quote
Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Go Up