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

esp32 s2 tiny usb driver lost complete interrupt during concurrent IN & OUT test (IDFGH-6285) #7952

Closed
chuanjinpang opened this issue Nov 23, 2021 · 4 comments
Assignees
Labels
Awaiting Response awaiting a response from the author Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally

Comments

@chuanjinpang
Copy link

chuanjinpang commented Nov 23, 2021

Environment
verion:esp-idf-4.3-beta3
EPS32 S2 as a usb device
host : centos7
Describe your problem
esp-idf-4.3-beta3\esp-idf-4.3-beta3\components\tinyusb\tinyusb\src\portable\espressif\esp32s2\dcd_esp32s2.c
when concurrent issue USB IN & OUT transcation in stress test. it seem lost complete interrupt that cause USB can't work.
(USB0.out_ep_reg[n].doepint & USB_XFERCOMPL0_M) or(USB0.in_ep_reg[n].diepint & USB_D_XFERCOMPL0_M) can't ocurr in bad case.

I suspect the esp-idf tiny usb have known limitation beacuse the IOT project use a Semphore for switch IN or OUT transfer.
refer:
esp-iot-solution\components\usb\tinyusb\additions\tusb\src\class\net\net_device.c
3. my queston:
is that it's a limitation for usb transfer? or it's a bug ?

@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 23, 2021
@github-actions github-actions bot changed the title esp32 s2 tiny usb driver lost complete interrupt during concurrent IN & OUT test esp32 s2 tiny usb driver lost complete interrupt during concurrent IN & OUT test (IDFGH-6285) Nov 23, 2021
@chuanjinpang
Copy link
Author

let me update status .
my diy project is a usb 802.11 wireless network card with esp32s2,
the root cause maybe the wifi EMI affect the USB transfer that cause esp32s2 usb transfer failed. and the esp32s2 usb tinyusb seem doesn't have any error recovery flow, then the USB endpoint work abnormal.
the USB recieve the data from host, then issue the data to wifi interface, then wifi start transmit, and the wifi also input data to host, then the EMI affect the USB transfer.
I doesn't have the USB sniffer now, maybe 202201 got one . i will check the bus status .

@chuanjinpang
Copy link
Author

20211231 update status:

  1. it's no t EMI related issue. I check the USB signal with Oscilloscope. the D+ D- signal seem ok.
  2. it's maybe esp32s2 usb chip hardware issue.

@tore-espressif
Copy link
Collaborator

Hello @chuanjinpang sorry for such a long delay.
this may be the same case as #7404 and #8241

Could you please try your code on latest master branch of esp-idf?

@Alvin1Zhang Alvin1Zhang added the Awaiting Response awaiting a response from the author label Sep 23, 2022
@espressif-bot espressif-bot added Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally and removed Status: Opened Issue is new labels Feb 22, 2023
@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Response awaiting a response from the author Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants