-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
da146xx bus reset and sleep reworked #1101
da146xx bus reset and sleep reworked #1101
Conversation
Not much of an improvement but handle only interrupts that were enabled and are expected.
So far bus reset was handled (with some holes in it). Sleep and remote wakeup were not really tested and did not work. With this change: - bus reset is reworked - remote wakeup works - bus signal sleep is handled
I am in the middle of esp32s2 work. Give me a bit of time to pull out the da146xx usb to test and review this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late response, have been busy with other works. To be honest, I still haven't pull out my DA146xx USB board to test with, since I had an issue with flashing its bin previously. Anyway, the changes look good, it mostly to fine tune the bus event handling with precise reset, suspend & resume detection. Therefore I don't think I could do anything better than yours.
PS: If you tested with USCV and has its result, please let me know so that we could update DA146xx status in #1059
@kasjer it output an html result in its working directory (click on view result will bring you there), you could upload it here for reference |
Here are test results from running USCV, Chapter 9, HID and MSC. Let me know it MSC failure is due to driver not working as expected or cdc_msc example limitation. |
@kasjer I just re-run the MSC test on nrf52840, it seems to be fine. From the log, device seems to stop response to the Test Unit Ready after BOT MSC Reset. Sometimes a random failure can occur, could you
I am not entirely sure what is wrong, sometime it can be caused by Data toggle mismatched when unstall. Also make sure when endpoint is stalled, the current queued transfer should be aborted as well. If you don't have time, don't worry, we will just note this, and I could help to troubleshoot this later on. |
Thanks for confirmation that application is fine and should work without problems. |
@kasjer no problem at all, I am glad that I could help. Btw, for chapter9 test suite, it is best to test with hid_composite example, since that has remote wakeup attribute set, and the example will attempt to wake system up when suspended while |
Ups, I could have added Chapter 9 test on HID instead of MSC, that did ask for wake up button activation. It work on pro-dk and usb-dk. |
Describe the PR
So far bus reset was handled (with some holes in it).
Sleep and remote wake-up were not really tested and did not work.
With this change:
Additional context
While it work with Windows and Linux some change in usbd.c is needed
for USB3CV tests to pass due to EP0 size 8.
Following lines prevent tests but are good for normal usage:
This was tested with USB3CV tool Chapter 9 Tests [USB 2 devices] and HID Tests