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

Stalling at the DataOutStage in usbd_core.c leads to enumeration issues under Windows 10/7 #22

Closed
fstap opened this issue Jan 30, 2020 · 2 comments
Assignees
Labels
bug Something isn't working mw Middleware-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet st community Also reported by users on the community.st.com usb USB-related (host or device) issue or pull-request
Milestone

Comments

@fstap
Copy link

fstap commented Jan 30, 2020

Hi,

enumeration fails for a lot of users because of stalling of the endpoint during the usb configuration stage. The issue seems to occure with pretty much every STM32, I can confirm it for the STM32L4, STM32H7 and STM32F7 series. The effects can easily be seen by using a USB protocol analyzer like USBTrace. A quick fix is to remove the line USBD_LL_StallEP(pdev, 0U); completely which does not interfere with the USB functionality in any way. The folowing thread describes the bug in more detail where I also recently posted the solution: https://community.st.com/s/question/0D50X00009XkiIASAZ/stm32f405rg-vcp-error-this-device-cannot-startcode-10

Kind regards

fstap

@ALABSTM ALABSTM added the st community Also reported by users on the community.st.com label Feb 3, 2020
@ALABSTM
Copy link
Contributor

ALABSTM commented Feb 3, 2020

Hi Fstap,

Thank you for having reported this issue.

This issue may already have been detected and fixed internally. If it is the case, the fix may already be available in some firmware Cube package recently published. If not, we will make a fix available soon, hopefully.

Please allow me to introduce @bouattay who will comment your post and provide you with more details about this point and thank you once more for your contribution.

With regards,

@ALABSTM ALABSTM moved this from To do to Assigned in stm32cube-mcu-fw-dashboard Feb 3, 2020
@ALABSTM ALABSTM self-assigned this Feb 3, 2020
@bouattay
Copy link

bouattay commented Feb 3, 2020

Hi Fstap,

Absolutely this is known issue already fixed in our latest USB device Lib v2.6.0 to be published sooner
proposed fix:
usbd_core.c:
USBD_LL_DataOutStage()
{
...
else
{
#if 0
if (pdev->ep0_state == USBD_EP0_STATUS_OUT)
{
/*
* STATUS PHASE completed, update ep0_state to idle
*/
pdev->ep0_state = USBD_EP0_IDLE;
(void)USBD_LL_StallEP(pdev, 0U);
}
#endif
}
}

USBD_LL_DataInStage()
{
...
else
{
#if 0
if ((pdev->ep0_state == USBD_EP0_STATUS_IN) ||
(pdev->ep0_state == USBD_EP0_IDLE))
{
(void)USBD_LL_StallEP(pdev, 0x80U);
}
#endif
}
}

Regards,
Aymen

@ALABSTM ALABSTM moved this from Assigned to In progress in stm32cube-mcu-fw-dashboard Feb 3, 2020
@ALABSTM ALABSTM added bug Something isn't working spotted before customer Spotted and fixed internally before being pointed out by users but not published yet labels Feb 3, 2020
@ALABSTM ALABSTM moved this from In progress to To release in stm32cube-mcu-fw-dashboard Apr 3, 2020
@ALABSTM ALABSTM added this to the v1.8.0 milestone Aug 3, 2020
@ALABSTM ALABSTM closed this as completed Aug 3, 2020
stm32cube-mcu-fw-dashboard automation moved this from To release to Done Aug 3, 2020
@ALABSTM ALABSTM added the mw Middleware-related issue or pull-request. label Sep 21, 2020
@ALABSTM ALABSTM added the usb USB-related (host or device) issue or pull-request label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mw Middleware-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet st community Also reported by users on the community.st.com usb USB-related (host or device) issue or pull-request
Projects
Development

No branches or pull requests

3 participants