[Core] ChibiOS: shorten USB disconnect state on boot to 50ms #15805
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
(Disclaimer: This is the rationale a came up after reading the USB spec, please feel free the chime in if this is wrong)
A SE0 state for longer then 2.5us signals a device disconnect from the USB bus - according to the USB specs. So the 1500ms are much longer than actually needed and had been copied from the ChibiOS demo code. That code does not state any reason for the long wait.
The new 50ms wait was chosen arbitrarily to be barely noticeable, but to be plenty of time for hosts/hubs that do not adhere to the specs. For split keyboards which rely on a fast enumeration for primary / secondary negotiation this shortens the boot up noticeably.
Also a soft reset for the USB connection should only be necessary for:
to establish a USB connection to the host
Types of Changes
Issues Fixed or Closed by This PR
Checklist