Replies: 2 comments 9 replies
-
Reading without overhead perhaps, writing needs to program flash in addition to comms. And there is always protocol overhead, so no. Here an estimate on the back of a schematics drawing: Erasing and writing a page will be some 10 ms, probably a bit less. At 512 byte in a page there are 768 pages, so we have 6-8 s programming time for writing all of flash once. Flash has around 3m bits, so with a bitclock of 1 MHz we have min 3 s for pushing flash from the programmer to the target and another 3 s for reading it to verify (realistically more like 5 s each). The programmer also needs to maintain a comms link to the host, where the data ultimately come from and return to. That comms stream could conceivably run concurrently and be faster, so no time burden. We don't know how big your two files are and how efficient the two .hex files encode the applications (if the .hex files use holes programming is a lot faster and worst case the two uploads write most of flash twice). So, in absence of any more info, 30 s is cool. Not sure one can expect much better. Ultimately it comes down to the programmer HW, how well its firmware is written and protocol overhead. |
Beta Was this translation helpful? Give feedback.
-
Use
This tells us that the bootloader is in 2 sections of 2 pages occupying 438 bytes. Very reasonable. If flash of the such prepared part were written to a backup file and that uploaded, this would be much less efficient:
... assuming ideal conditions otherwise? short good-quality cables, twisted pair drivers, digital isolators, high-quality programmer HW using an MCU that can actually generate 26 MHz and handle comms at that speed, a fine-tuned programmer firmware that focuses on speed etc I am not surprised the standard setup tops out at 7-8 MHz. What's the use case? Programming small batches of 3600 production runs every month, where shaving 1 s off the programming time translates to saving 1 hour for you? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm programming a software for serial production which programs an XMEGA/PDI and checks some things.
This is my programming command:
avrdude.exe -c atmelice_pdi -P usb:J41800038194 -B ?? -p x384c3 -e -l out.txt -U flash:w:bootloader.hex -U flash:w:firmware.hex -U eeprom:w:eeprom.hex -U fuse1:w:0xFF:m -U fuse2:w:0xBF:m -U fuse4:w:0xFE:m -U fuse5:w:0xEb:m -U lock:w:0xfc:m
It works, but the problem is, it takes very long.
At first I used the mk2 which took about 30s to program but was very unstable (I often got some errors).
Now I switched to the atmel ice, which works really stable but is much slower.
So I tried to tweak with the
-B
parameter, but barely got any satisfactory results:With 0.5 its ~15s slower than mk2. And whats confusing me, since this is the bit clock period, shouldn't the speed increase be linear? Did I set some parameter wrong?
Is there maybe an even better PDI programmer for fast programming in production use? Haven't really found anything.
I hope someone can help me,
Tropaion
Beta Was this translation helpful? Give feedback.
All reactions