-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
USB re-connection fails on SAM E70 #24626
Comments
There is just nothing implemented to give/set allocated resource free after re-attach/reset (EORST). The patch below fix the issue but I guess needs more investigation. Lower priority to low. diff --git a/drivers/usb/device/usb_dc_sam.c b/drivers/usb/device/usb_dc_sam.c
index 01673e6ad4..ac8873260b 100644
--- a/drivers/usb/device/usb_dc_sam.c
+++ b/drivers/usb/device/usb_dc_sam.c
@@ -256,6 +256,11 @@ static void usb_dc_isr(void)
usb_dc_ep_enable_interrupts(0);
}
+ for (int ep_idx = 1; ep_idx < NUM_OF_EP_MAX; ep_idx++) {
+ usb_dc_ep_disable(ep_idx);
+ USBHS->USBHS_DEVEPTCFG[ep_idx] &= ~USBHS_DEVEPTCFG_ALLOC;
+ }
+
/* Callback function */
dev_data.status_cb(USB_DC_RESET, NULL);
} |
Tested @jfischer-phytec-iot patch on SAM_V71_XULT. procedures:
|
@nandojve Thanks for testing, there are a lot of suspended events, I have not seen this behavior on same70Xplained. |
Free endpoint memory on End of Reset event (EORST). Fixes: zephyrproject-rtos#24626 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Indeed there are! I shared all messages to aware everyone. Not sure if that is evidence to do more investigation right now. Well, "today is better than yesterday" and I prefer moving forward. Off Topic: The only errata documented that affects both Rev A/B silicon (that make sense for stack) is:
|
Free endpoint memory on End of Reset event (EORST). Fixes: #24626 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Free endpoint memory on End of Reset event (EORST). Fixes: zephyrproject-rtos#24626 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Describe the bug
On the SAM E70 SoC, the first USB device connection works, but all subsequent re-connections fail (host fails to detect the device and "failed to configure endpoint" is logged).
To Reproduce
samples/subsys/usb/cdc_acm
or any other USB device sample with the device USB cable connected.Expected behavior
Host successfully detects the device upon re-connection.
Screenshots or console output
Running
samples/subsys/usb/cdc_acm
onsam_e70_xplained
Environment (please complete the following information):
Additional context
sam_e70_xplained
with the Rev. B chipsam_v71_xplained
(cc @nandojve)The text was updated successfully, but these errors were encountered: