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

USB init process violates datasheet recommendations #83

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

USB init process violates datasheet recommendations #83

abcminiuser opened this issue Apr 10, 2016 · 1 comment
Labels

Comments

@abcminiuser
Copy link
Owner

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.

@NicoHood
Copy link
Contributor

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants