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

fast serialUSB read #76

Open
sined23 opened this issue Apr 15, 2016 · 10 comments
Open

fast serialUSB read #76

sined23 opened this issue Apr 15, 2016 · 10 comments

Comments

@sined23
Copy link

sined23 commented Apr 15, 2016

Hi guys! I increased serialUSB read speed from 1Mbit/s up to 12Mbit/s.
Details are here http://forum.arduino.cc/index.php?topic=391757.0
I suggest you to take it for new arduino version.

@facchinm
Copy link
Member

Hi @sined23 ,
would you mind opening a proper PR ? So we can review easily 😄

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

Sorry, I don't know how to do it. You can review these new libraries and compare with existing
http://forum.arduino.cc/index.php?action=dlattach;topic=391757.0;attach=163027

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

if you have questions for changes pls ask

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

The main idea is that bytes are written and read into/from CDC buffer not one by one but block of bytes

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

Serial_::accept write into CDC buffer as maximum as possible (only to not overflow the buffer)
Serial_::readb (you can change just read, not use readb) get from CDC buffer as maximum as possible or nessasary length

and one more important thing: in USBD_Recv "while (n--) *dst++ = UDD_Recv8(ep & 0xF);" should be replaced into UDD_Recv(ep & 0xF, dst, len);

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

after that read speed is incredible increases !!!

@NicoHood
Copy link

Fork the repo, do the changes, upload and open a pr. Its very simple, just learn some basic git commands (clone, add, commit, push).

@sined23
Copy link
Author

sined23 commented Apr 15, 2016

created PR

@sined23
Copy link
Author

sined23 commented May 16, 2016

Hi guys! Do you plan to merge this PR?
arduino/Arduino#4871

@sandeepmistry sandeepmistry transferred this issue from arduino/Arduino Sep 16, 2019
@iddq
Copy link

iddq commented Jan 28, 2020

merged?

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

4 participants