I'm programming an ATmega328p using avrdude, and with a program size of 3074B, I am experiencing approximately 13 seconds of programming time. This is painfully slow when developing with the microcontroller. I've tried using both the internal oscillator, and an external oscillator both set at 8MHz. The CKDIV8
fuse is also unprogrammed. I'm not sure what I am doing wrong, I remember it being much faster when programming in the past.
EDIT: As requested, here is the output of avrdude
:
avrdude -c atmelice_isp -p m328p -U flash:w:debug.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f (probably m328p)
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 "debug.hex"
avrdude: input file debug.hex auto detected as Intel Hex
avrdude: writing flash (3074 bytes):
Writing | ################################################## | 100% 12.57s
avrdude: 3074 bytes of flash written
avrdude: verifying flash memory against debug.hex:
avrdude: load data flash data from input file debug.hex:
avrdude: input file debug.hex auto detected as Intel Hex
avrdude: input file debug.hex contains 3074 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 13.06s
avrdude: verifying ...
avrdude: 3074 bytes of flash verified
avrdude: safemode: Fuses OK (E:FF, H:D9, L:E0)
avrdude done. Thank you.
Also the programmer that I am using is the Atmel-ICE
1 Answer 1
There seems to be a common problem with the Atmel ICE being very slow to program using avrdude. It's to do with the programmer seemingly defaulting to a low clock rate for programming.
The problem can be resolved by instructing avrdude to run the programmer at a higher speed by adding -B1
to the command line arguments, for example:
avrdude -c atmelice_isp -B1 -p m328p -U flash:w:debug.hex
Explore related questions
See similar questions with these tags.
avrdude -c atmelice_isp -B1 -p m328p -U flash:w:debug.hex
\$\endgroup\$