Fix usb missed ep0 out packet and add recommended sync delays #405
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.
The ep0-out buffer must not be marked as available unless required.
Otherwise, the controller will acknowledge the data-out packet but won't reflect that in its status registers.
This patch forces the controller to nack the data-out phase until we have processed the setup packet.
As per 4.1.2.5.1, the access to the DPSRAM should "be considered asynchronous and not atomic".
It is recommended to write to buffer control register in two steps.
The pico-sdk uses a blanket 12tick asm block so proposing a 12tick delay here too.