Go Down

Topic: Is there any way to speed up the ISP programming process? (Read 1 time) previous topic - next topic

scswift

I'm using a 1284P in my project and my uploads seem to be going really slow and I believe it is because the IDE is erasing all the flash on board each time it uploads.  Is it possible to avoid doing that and just leave any garbage data after the program?  I would assume it would not interfere with the program for it to be there and since my programs right now are small it should greatly speed up my testing process.

mkwired

How slow is slow?  FLASH memory must be erased before it can be programmed.

scswift

Eh, feels like it's taking maybe 20 seconds?  Haven't timed it.  Just seems slow. 

Also, I have an old laptop I used to program some other chips and with the same programmer it is way faster than my Macbook.  Any idea what might cause that? 

kf2qd


mkwired


scswift

Well, I set the fuses like so the first time because I was having trouble getting it to program (the IDE hides the option to upload with a programmer so even though I had a programmer selected I was getting com port errors and didn't know why until I figured out the right upload option was on the fil emenu):
http://www.frank-zhao.com/fusecalc/fusecalc.php?chip=atmega1284p&LOW=CE&HIGH=F9&EXTENDED=FF&LOCKBIT=FF

But the boards.txt file has the following fuses:
http://www.frank-zhao.com/fusecalc/fusecalc.php?chip=atmega1284p&LOW=FF&HIGH=DE&EXTENDED=FD&LOCKBIT=FF

I'm not sure if they get programmed though because a couple weeks ago I had a chip on a breadboard that was running slow and I was using the same boards.txt and the right chip selected on the menu.  So I don't think it was being programmed to use my external oscillator.  But the current chip is running at the right speed, going by the fact that my led now blinks once a second like it's supposed to.

Other than that, I just select upload via programmer from the file menu, and I have usbtiny seleced for programmer and avr-developers.com selected as the board for my 1284p.

The thing about one computer programming faster than the other was with 328P's.  I haven't tried it with this chip; I don't have time to mess around with that right now I gotta get this board working pronto and the slow programming is only a minor inconvenience.

CrossRoads

Use an Atmel AVR ISP MKii within AVR Studio- really fast, once you get past the reeeeeally slow opening screen - it takes so long, I use File :Upload Using Programmer within the IDE instead.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly


What size image are you uploading?  (What size is the dot-hex file?)

Nick Gammon


I'm using a 1284P in my project and my uploads seem to be going really slow and I believe it is because the IDE is erasing all the flash on board each time it uploads.  Is it possible to avoid doing that and just leave any garbage data after the program? 


According to the datasheet for the Atmega2560 a chip erase takes a maximum of 9 mS, so I don't think that is the big bottleneck (I can't find the figure for the 1284P but I presume it is similar).
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

scswift


scswift

I've also been getting avrdude verificatons errors, though the slowness has occurred before this and with multiple chips.  I then found the verbose option and turned that on.  It takes 24 seconds to write 8400 bytes.  Then it takes 14 seconds to verify it, then I get an error about a byte missmatch, but my program still seems to do what it's supposed to. 

scswift

I've unchecked the preference to verify code after upload, but it still seems to be doing it and I've restarted the IDE to be sure.  Is there no way to stop it from spending 14 seconds verifying code when it is going to error anyway?

mkwired

According to one of ladyada's webpages, the usbtinyisp takes a second to program a kilobyte.  Maybe you need a faster programmer.  The AVRISP mkII sells for $35 and it is supported by Atmel.

http://www.ladyada.net/make/usbtinyisp/

scswift

I'm actually using this:
https://www.sparkfun.com/products/9825

But I don't know if it's any faster or not.  Since it's using the usbtiny drivers perhaps not.

tylernt

Quote
According to one of ladyada's webpages, the usbtinyisp takes a second to program a kilobyte
Hm, that's only 8kbps. Is the bottleneck is in the programmer-programee interface? Or is the bottleneck in the PC-usbtinyisp interface (which appears to be bit-banged without the benefit of a FTDI or Max USB-serial IC)?

Go Up