-
Notifications
You must be signed in to change notification settings - Fork 7.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
ESP32S3 usb_host_cdc_acm Bad transfer status: CHECK_FULL_DEV_DESC (IDFGH-9036) #10444
Comments
Plugging in the rp2040 as msc:
And as cdc acm right after ESP_ERROR_CHECK(usb_host_install(&host_config));:
Saleae logic analyzer capture attached if it helps. |
Hello @barbiani this bug was fixed in |
@barbiani Thanks for the logic analyzer capture. From the capture, it looks your device is not acknowledge the setup packets of the "Get Device Descriptor" control transfer However, the previous "Set Address" control transfer was successful. On the "Get Device Descriptor" control transfer, the Host is sending the setup packet, but the device not acknowledge this packet. The Host retries the setup packet 3 times before reporting back that the transfer has failed. Maybe the device needs more time after the "Set Address" request before it starts responding to control transfers on its newly assigned address? Could you try adding a short delay before the "Get Device Descriptor" stage as follows and see if that resolves the issue (link to code). // In hcd.c
#include "freertos/task.h"
...
case ENUM_STAGE_GET_FULL_DEV_DESC: {
// Add a short delay here
vTaskDelay(pdMS_TO_TICKS(500));
USB_SETUP_PACKET_INIT_GET_DEVICE_DESC((usb_setup_packet_t *)transfer->data_buffer);
....
} |
I have exactly the same scenario and had exactly the same issue. I can't assess if the suggested delay is to be classified as workaround or as fix. Anyhow, it solves the issue for me. |
@oliverschmidt @barbiani We just double checked the USB2.0 specification. The delay is actually required (thus the lack of delay turns out to be a bug). Quoting from section 9.2.6.3 Set Address Processing
We'll add a fix for this. |
Thanks :-) |
Answers checklist.
IDF version.
v5.0
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.1
Power Supply used.
USB
What is the expected behavior?
Enumerate cdc acm device (pico rp2040) of pid:vid 0x000A:0x2E8A as per the example.
Device correctly enumerates and communicates on windows 11.
USB connection between the esp32 and the device seems to be fine because msc on the same device is working (and running another example).
What is the actual behavior?
Currently not finding the cdc acm device.
Steps to reproduce.
Flash example
Connect esp32s3 dp and dm to rp2040 (running the cdc acm stdio example) dp and dm.
Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: