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

Improve/battle-test USB implementation #28

Open
tmplt opened this issue Sep 17, 2022 · 2 comments
Open

Improve/battle-test USB implementation #28

tmplt opened this issue Sep 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tmplt
Copy link
Member

tmplt commented Sep 17, 2022

Copied from internal issue tracker:

The current usb-device implementation is a reverse-engineering feat that was compared to the ATSAMx5x family implementation, along with an RTT (and Wireshark) trace of a CDC-serial example (the branch of which I have forgotten at the moment where I put it), and some ideas taken from the tinyusb implementation of the x7x.

At the time, the latter was not traceable due to tinyusb/#1520, but with it closed, we can now gather additional data and improve our own implementation. tinyusb also contains some abstracted class implementations in case available usb-device implementations are found to be lacking.

So, what we should do now is RTT/Wireshark trace the current implementation in this HAL and compare it with that of the tinyusb example. In this trace, we should send some known payload to the device which is simply echoed back (usb_serial_echo example). These should be attached in this issue and relevant MRs should be created, closing this issue when traces match.

@tmplt
Copy link
Member Author

tmplt commented Sep 17, 2022

Correction: the traced x5x application was not an echo application, but a simple USB enumerator. It is available here.

@tmplt
Copy link
Member Author

tmplt commented Sep 17, 2022

We also need to look into how the interrupts behave. In the example application, is USBHS always active, or do we eventually enter idle again? We only want USBHS to be active when needed.

We also need to test if the implementation can handle large payloads, and how large they can be before any eventual bytes are discarded.

@michalfita michalfita added the enhancement New feature or request label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants