Skip to content

Fixing enumeration when rebooting into the program from bootloader #91

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

monte-monte
Copy link
Contributor

Boards that doesn't have a dedicated DPU pin, can't properly re-enumerate from b003 to d003 after rebooting from bootloader. To fix this we need to pull down D- pin for a short period of time. To make this hassle free to the end user, I implemented it in the bootloader code plus corresponding changes to minichlink. This requires extra space, but it fits.
If you are still using dedicated DPU pin, only changes will be the extra 4 bytes used by the updated linker script.

Also fixed added one missing line to the soft reboot into bootloader function. Without it bootloader was booting straight into user code.

The last commit ensures that resulted bin will always be 1920 bytes, so we always rewrite whole boot partition and no junk could be left in the end of it from previous bootloader. This is somewhat important, because with updated minichlink we are looking into last 4 bytes of the partition. And in some edge cases we could see unwanted behavior.

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

Successfully merging this pull request may close these issues.

2 participants