Skip to content
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

fix usb resume bug on esp32sx (IDFGH-10000) #11281

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

paul356
Copy link
Contributor

@paul356 paul356 commented Apr 27, 2023

I have encounter this issue on esp32s3 that my usb hid device can't recover from suspend state after computer went to sleep and waked up. After long time of debugging it turned out that we didn't handle resume interrupt in dcd file for esp32sx. The fix is straight forward. I add USB_WKUPINT related bits in function dcd_init and dcd_int_handler. Having tested on my esp32s3 hid keyboard, I think it also works for other USB devices using esp32sx. Please comment if you need me to do further testing.

@CLAassistant
Copy link

CLAassistant commented Apr 27, 2023

CLA assistant check
All committers have signed the CLA.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 27, 2023
@github-actions github-actions bot changed the title fix usb resume bug on esp32sx fix usb resume bug on esp32sx (IDFGH-10000) Apr 27, 2023
@tore-espressif
Copy link
Collaborator

Hello @paul356 , thank you for the contribution!
We'll test on more targets and hosts and then merge, thanks

@paul356
Copy link
Contributor Author

paul356 commented Apr 29, 2023

This issue relates to esp32s2 and esp32s3 only. You just need to test these two chips.

@tore-espressif
Copy link
Collaborator

Thank you again for you contribution. All tests OK, we will merge in out internal git and this issue will be closed automatically after it get synchronized to GitHub.

For IDF version >= 5.0 this will be fixed in tinyusb component

@paul356 paul356 closed this May 6, 2023
@paul356 paul356 reopened this May 6, 2023
@paul356
Copy link
Contributor Author

paul356 commented May 6, 2023

Thank you again for you contribution. All tests OK, we will merge in out internal git and this issue will be closed automatically after it get synchronized to GitHub.

For IDF version >= 5.0 this will be fixed in tinyusb component

Thanks you for the information. I have tried IDF 5.0 several months ago. In that time, I didn't find tinyusb in IDF 5.0. So I went back to IDF 4.4. Is tinyusb still a component as in IDF 4.4 in the "components" folder? If that is the case, I may consider migrate my project to esp-idf 5.0. I also need to fix USB HID device related code in IDF 4.4, which I have previously opened a pull request. I am told that it is fixed in IDF 5.0. It will be better to work without a private IDF version.

@paul356
Copy link
Contributor Author

paul356 commented May 6, 2023

I find where tinyusb is in IDF 5.0. It is a dynamic component. It is installed through Component Manager.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels May 9, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Reviewing Issue is being reviewed labels May 17, 2023
@tore-espressif
Copy link
Collaborator

The fix is included in our release of TinyUSB v0.14.3 so you can use it with IDFv5.x

related espressif/tinyusb#11

IDF v4.x should wait until the fix is synced to GitHub from our internal servers

@espressif-bot espressif-bot merged commit ea9d916 into espressif:release/v4.4 Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants