-1

I'm using eclipse software and when I want to upload my code to the MCU(atmega32) with a clock of 16MHZ the avrdude takes longer than it should, however the program runs as it should but the only problem is the avrdude uploading time. the following example shows that it took more than 1.5 minutes to upload the program, so how can I decrease this time?

Launching D:\Programs\03- IMT SDK\IMT_SDK_Win_64\WinAVR\bin\avrdude -pm32 -cusbasp -P230400 -b230400 -Uflash:w:1542.hex:a 
Output:

avrdude: AVR device initialized and ready to accept instructions

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

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

Writing | ################################################## | 100% 62.72s

avrdude: 7518 bytes of flash written
avrdude: verifying flash memory against 1542.hex:
avrdude: load data flash data from input file 1542.hex:
avrdude: input file 1542.hex auto detected as Intel Hex
avrdude: input file 1542.hex contains 7518 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 34.79s

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

avrdude done.  Thank you.

avrdude finished
kaylum
  • 13,833
  • 2
  • 22
  • 31
  • I’m voting to close this question because it's not about software programming. It's about hardware programming using a widely-available and well-documented tool. – TomServo Sep 14 '21 at 21:56

1 Answers1

0

Calculating the value of 7518 bytes / 62.72 s gives an upload speed of 120 bytes/sec, while USBasp could provide a programming speed of up to 5 kBytes/sec. The upload speed could certainly be increased.

First of all, make sure that the jumper connected to PC2 port of the USBasp is removed. It is designed to activate the slow operation option to support targets with low clock speed (< 1,5 MHz).

Secondly, you do not have to specify the upload speed manually, so the command could be simplified:

avrdude –c usbasp –p m32 –U flash:w:1542.hex

Mephistt
  • 156
  • 5