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

Use two stop bits for packet driver / File-To-SD #51

Open
Wuerfel21 opened this issue Aug 15, 2020 · 3 comments
Open

Use two stop bits for packet driver / File-To-SD #51

Wuerfel21 opened this issue Aug 15, 2020 · 3 comments

Comments

@Wuerfel21
Copy link
Contributor

Wuerfel21 commented Aug 15, 2020

There's a lot of stuff going on in the packet driver after a byte is received, causing it to miss the next start bit when using over ~200_000 baud
When using two stop bits (tested by changing serial_mingw.c line 101 - this enables 2 stop bits for everything, which is less than ideal...), the maximum stable baudrate increases to about ~450_000.
Empirically, this translates to ~70% faster loads (testing 200_000 baud 1 stop bit vs 450_000 baud 2 stop bits with a ~430K file)

Relatedly: Can the baud rate for File-To-SD become it's own config variable please?

@dbetz
Copy link
Collaborator

dbetz commented Aug 15, 2020

If you have a better packet driver I'd be happy to use it. The one in PropLoader is basically derived from FDS and is almost certainly not optimial.

@Wuerfel21
Copy link
Contributor Author

I don't think there's any major prop-side optimization that can be achieved without cutting functionality (for example, a less expensive packet checksum could be used at the expense of a higher likelyhood of errors - not sure how often the CRC errors out, anyways?) or spinning the packet handling off into a second cog.

As I said, setting 2 stop bits gets a good bit of extra performance out of the current driver.

@dbetz
Copy link
Collaborator

dbetz commented Aug 15, 2020

I'm afraid I don't have time to work on this right now. Sorry.

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