Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query re upload time #86

Open
paulskirk53 opened this issue Nov 16, 2021 · 7 comments
Open

Query re upload time #86

paulskirk53 opened this issue Nov 16, 2021 · 7 comments

Comments

@paulskirk53
Copy link

Hi, Just observing that my PyUPDI on an AVR4809 takes circa 30 seconds to upload an 11Kbyte program. Is this ok? It works, so no complaints, just seems a relatively long time. Thanks.

@mraardvark
Copy link
Owner

quick test with pymcuprog and a canned 16k hexfile takes 2.1 seconds (3.1 with verification)

@paulskirk53
Copy link
Author

Thanks very much for that, I'm using an FTDI and the resistor, the upload speed is 115200. Is there anything I can do to improve ?

@paulskirk53
Copy link
Author

Ah just noticed you mentioned pymcuprog, would it be better to use that?

@mraardvark
Copy link
Owner

indeed. its maintained :)
also use -x to get quick timing output

@mraardvark
Copy link
Owner

mraardvark commented Nov 16, 2021

Ah, of course - sorry, in my haste I tested the native USB programming speed using a CNANO. Using the serialUPDI mechanism will be slower, but you should be able to go to ~500k baud.
I can't test right now because my box of serialUPDI tricks is at home...
Edit: pymcuprog is still favoured over pyupdi.

@paulskirk53
Copy link
Author

I have had some help from the PlatformIO IDE forum and I managed to get pymcuprog to work, but upload of the 11k bytes code takes a longish 3 minutes. The max -c parameter I can use which still initialises is 250k....

@mraardvark
Copy link
Owner

Hmmm, slow indeed - I think this is a function of the python serial send/receive, which needs some optimising, and could also be affected by the HW adapter's USB handling (whether its optimised for latency on single characters, or optimised to fill USB frames and get the best bandwidth).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants