Author Topic: Unusually Long Programming Times With ATmega328P and avrdude [SOLVED]  (Read 854 times)

0 Members and 1 Guest are viewing this topic.

Offline KalciferTopic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: ca
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 don't remember programming the microcontroller being this slow when working with it in the past.
« Last Edit: June 05, 2021, 08:27:48 pm by Kalcifer »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Unusually Long Programming Times With ATmega328P and avrdude
« Reply #1 on: June 05, 2021, 09:00:47 am »
AVRdude supports a multitude of programmers + a few serial bootloaders, so unless you post what hardware you are using, how its hooked up, and your AVRdude command line, its unlikely anyone will be able to help . . .
 

Offline KalciferTopic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: ca
Re: Unusually Long Programming Times With ATmega328P and avrdude
« Reply #2 on: June 05, 2021, 09:24:11 am »
Code: [Select]
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.

As requested, here is the output of avrdude, and I am using an Atmel-ICE
 

Offline KalciferTopic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: ca
Re: Unusually Long Programming Times With ATmega328P and avrdude
« Reply #3 on: June 05, 2021, 08:27:32 pm »
Solution found to be manually setting the `-B` option in avrdude to be `-B 1`. This gives a programming speed of about 0.16s. I don't know why the Atmel ICE wasn't automatically picking the fastest speed, but either way, solved.
 
The following users thanked this post: I wanted a rude username

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Hmm.  Check the  default_bitclock setting in the config file.  See: https://www.nongnu.org/avrdude/user-manual/avrdude_11.html#AVRDUDE-Defaults
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf