AVRDude writing eeProm very slow

How to use eePe
Post Reply
Saschko
Posts: 7
Joined: Wed Apr 22, 2015 9:25 am
Country: Germany

AVRDude writing eeProm very slow

Post by Saschko » Fri Apr 24, 2015 10:40 pm

Hi to all,

I wonder why programming the eeprom via USBasp or STK500 takes over 40 seconds with AVRDude?
AVRStudio 4.19 can do the same in less than 4 seconds.

I've tried for hours now to speed up things with AVRDude without succsess :-(

Any help would be appreciated

Sascha

User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: AVRDude writing eeProm very slow

Post by rperkins » Fri Apr 24, 2015 11:02 pm

that sounds like something I would do. Spend hours trying to save 40 seconds :)

just a guess but maybe avrdude is erasing pages at a time where asAVRStudio uses a faster(proprietary) method to update the eeprom.

- Mike. thanks for clarifying this in the next post

I know with usbasp there is a -B option to control the speed of the programming. Then again most (chinese) usbasp do not use the open source usbasp firmware and the speed is automatically controlled by the firmware. With true firmware the default speed is 375khz but there is a max speed of 1.5mhz . In my experience if you set it at 1.5 mhz ( -B .5) the speed gains are reduced by retries. I do not know if the STK500 has a similar interface.

http://9xrprogrammer.com/index.php/lear ... p-firmware
Last edited by rperkins on Fri Apr 24, 2015 11:22 pm, edited 1 time in total.

User avatar
MikeB
9x Developer
Posts: 15717
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: AVRDude writing eeProm very slow

Post by MikeB » Fri Apr 24, 2015 11:20 pm

The EEPROM is written 1 byte at a time, and each byte takes around 10mS to write, so a write speed of 100 bytes/second.
It therefore takes 20 seconds to write 2K and 40 seconds to write 4K minimum.
AVRStudio may be skipping writing bytes if there are already correct.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Saschko
Posts: 7
Joined: Wed Apr 22, 2015 9:25 am
Country: Germany

Re: AVRDude writing eeProm very slow

Post by Saschko » Sat Apr 25, 2015 7:46 am

I have tried out the -B option, but nothing changes.

But if I think of the behavior of AVRStudi, I think this sounds like the
better way just to write Bytes that are different.

Is it possible to change these behavior in AVRDude.

Or do you wait 40s every time you change your profiles with eePe?

Thanks very very much

Sascha

btw. You are dooing an excelent job. Is it possible to help you in any other way except money?

Post Reply

Return to “eePe”