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

USB init process violates datasheet recommendations #83

Open
abcminiuser opened this Issue Apr 10, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@abcminiuser
Copy link
Owner

abcminiuser commented Apr 10, 2016

As found by @NicoHood, the current core init code violates the best practice instructions in the datasheet for the U2 series (at a minimum). The PLL and pad regulators should be initialized before enabling the USB core.

@abcminiuser abcminiuser added the bug label Apr 10, 2016

@NicoHood

This comment has been minimized.

Copy link
Contributor

NicoHood commented Apr 10, 2016

This is how I handle the init process:
https://github.com/NicoHood/SecureLoader/blob/5ad74a64cdcf78b24e19940e90a780517122bd8c/SecureLoader/USB/USBController.h#L166

However this does not check if the Device is already running etc, what lufa does. And I totally removed those u4 interrupts which used a lot of space.

If you update this code It would be highly appreciated to have more comments with details about what is going on, in what order and why. That'd be really nice, as the usb stuff is very complex to understand and to do it right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment