-
Notifications
You must be signed in to change notification settings - Fork 29
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
STM32F407 fails to enumerate when polled periodically #9
Comments
Hmm, I think I earlier faced with a situation when device responds to the first packet with garbage data. In this case, this reply is ignored by host and next reply is used as a reply to the first request. |
Further analysis and investigation has revealed this was a race condition in the processing order within |
Thank you for investigating this! |
@ryan-summers Could you check/confirm that this crate works with the latest released version of |
I have confirmed that using |
Thank you for investigating and fixing the problem! |
If the USB device is polled periodically, the STM32F407 fails to enumerate. To recreate, use the following example:
https://github.com/stm32-rs/stm32f4xx-hal/blob/master/examples/usb_serial.rs and update the
loop
as follows:A wireshark capture of the USB transactions with the device give some insight as to what is happening:
The first BOS descriptor request gets no response. The following 2 requests do get a response. However, then the first DEVICE_QUALIFIER descriptor gets a malformed packet as a response. Analysis of this packet seems to indicate that this is actually a BOS descriptor response from earlier.
This seems to indicate that the descriptor responses are offset by 1 improperly. It is unclear why the first BOS descriptor response fails, but initial debugging indicates it may be an improper
ControlState
setting. I'm still investigating root cause here.The text was updated successfully, but these errors were encountered: