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

Reduce wait time in dwReadBytes to boost transfer rate from 160Bps to 487Bps #42

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DeqingSun
Copy link
Contributor

There used to be a 30ms interval between 2 debugWIRE access.

screen shot 2018-11-06 at 1 14 11 pm

It seems dwReadBytes wait 23ms after receiving the last byte.

dwreadbytestakes23mstoexit

So I added a test in dwReadBytes, if the coming byte is not the 1st one, it will only wait for about 1 Byte's time.

dwreadbytestakesabout1bytetoexit

At this moment, the interval between 2 debugWIRE access reduced to 6ms.

In previous implementaion, the DebugWIRE func waited 2ms to for all USB transactions to complete. Now it waits 100us, if there is USB transactions, it waits for another 100us.

If there is no USB transactions for 100us, the function will proceeed.
When using SIGTRAP (singal 5), VScode no loger show exception warning, and continue works properly.
@DeqingSun
Copy link
Contributor Author

Now the branch has been both tested in OSX 10.13 and Win7

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

Successfully merging this pull request may close these issues.

1 participant