Hi speed pyupdi options #426
Replies: 1 comment
-
Hi Spence, Sorry for any confusion. I moved my post to a new topic since it does not really fit with the original one - my mistake. You obviously replied during getting used to this forum an fussing around. I copy your reply and my new reply. "Doesnrt the same thing happen with avrdude in verbose mode in that case?" "If so it's a bug with the IDE that should be reported to the Arduino developers. If not it is a bug with the progress bar we display which I will refer to the python guru who made that. The real magic part that does stuff is the Microchiop pymcuprog tool which can't practically be interfaced directly to the Arduino IDE. Quentin wrote the code that acts as that bridge and did all the non-verbose output modes (the latest version core version gunned the verbose mode being enablable because it was too verbose), and I really couldn't do that myself. I don't know python very well. So this would be his department. I'm the one who has deeper understanding of UPDI protocol and sit watching everything in the 'scope and using that to improve the performance. How long did it take to upload? (based on the timestamps it prints out) I get 4 seconds including verify for a 32k full flash hex file for a 3216 or s3217 - the bottle neck is the write speed - not the block transfer where it transmits a page of data, but all the setup, which has a lot of round trips, which are very costly. On Dx-series where the pages are 512b, 345600 baud is 24k/s and the theoretical maximum speed that the hardware can write it's flash at is 28. My final round of optimizations exceeded my wildest dreams. (at 460800 we need to actually slow them down by chunking the writes to prevent it from outrunning the chip's ability to write - though with the one adapter I tried that on (because it didnt do 345600 or anything else between 256 and 406.8), the write speed was no faster.... but the read speed (unconstrained by that) hit 32k/s!. And yes, you read that correctly, tinyAVR can be written faster than Dx.-series. On the other hand, Dx-series is written a word at a time, while for tinyAVR you have to do a whole page." What ever you did and managed is amazing - never have I seen upload speeds like this. Here is the non-verbose output (verbose is a bit too "verbose"). It shows the size and upload/verify speeds"
Note: The above display is not entirely correct. The spaces making each output line the same length was dropped in the post. (Edit: It is now) As I said - absolutely amazing. A huge thanks for all your hard work. Willem Edit: How is the "insert code" (<>) suppose to work - It does not seem I did it correctly. Ha, figured it out. |
Beta Was this translation helpful? Give feedback.
-
Just upgraded to megaTinyCore version 2.3.2. I noticed the pyupdi 460800 baud option and tried it. Wow, the fastest I have ever been able to upload. Thanks for that option.
I think the upload speed is now limited by the screen update rate (??). Maybe you should change the upload status to a more compact format. I used it in IDE 2 and, unlike IDE1 where the status is displayed in a progressing single line, IDE 2 shows new lines for each step.
Willem.
Beta Was this translation helpful? Give feedback.
All reactions