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

USBD_UnRegisterClassComposite always fails #104

Open
x-moe-x opened this issue Sep 25, 2024 · 3 comments
Open

USBD_UnRegisterClassComposite always fails #104

x-moe-x opened this issue Sep 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working internal bug tracker Issue confirmed and logged into the internal bug tracking system mw Middleware-related issue or pull-request. usb Universal Serial Bus

Comments

@x-moe-x
Copy link

x-moe-x commented Sep 25, 2024

The function USBD_UnRegisterClassComposite(...) in Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c always fails.

Initially, ret is set to USBD_FAIL ...

USBD_StatusTypeDef USBD_UnRegisterClassComposite(USBD_HandleTypeDef *pdev)
{
USBD_StatusTypeDef ret = USBD_FAIL;
uint8_t idx1;
uint8_t idx2;
/* Unroll all activated classes */
for (idx1 = 0; idx1 < pdev->NumClasses; idx1++)

... and on failure it is set again to USBD_FAIL

if (pdev->pClass[pdev->classId]->DeInit(pdev, (uint8_t)pdev->dev_config) != 0U)
{
#if (USBD_DEBUG_LEVEL > 1U)
USBD_ErrLog("Class DeInit didn't succeed!, can't unregister selected class");
#endif /* (USBD_DEBUG_LEVEL > 1U) */
ret = USBD_FAIL;
}
}

so on finish it fails all the time.

/* Reset the configuration descriptor */
(void)USBD_CMPST_ClearConfDesc(pdev);
/* Reset the class ID and number of classes */
pdev->classId = 0U;
pdev->NumClasses = 0U;
return ret;
}

@TOUNSTM TOUNSTM added mw Middleware-related issue or pull-request. usb Universal Serial Bus labels Sep 27, 2024
@ALABSTM ALABSTM added the bug Something isn't working label Sep 30, 2024
@ALABSTM
Copy link
Contributor

ALABSTM commented Sep 30, 2024

Hi @x-moe-x,

Looks like you're right. Your report will be forwarded to our development teams. Thank you for the heads-up.

With regards,

@ALABSTM ALABSTM moved this from To do to Analyzed in stm32cube-mcu-fw-dashboard Sep 30, 2024
@ALABSTM
Copy link
Contributor

ALABSTM commented Sep 30, 2024

ST Internal Reference: 192427

@ALABSTM ALABSTM moved this from Analyzed to In progress in stm32cube-mcu-fw-dashboard Sep 30, 2024
@ALABSTM ALABSTM added the internal bug tracker Issue confirmed and logged into the internal bug tracking system label Sep 30, 2024
@ALABSTM
Copy link
Contributor

ALABSTM commented Oct 31, 2024

Hi @x-moe-x,

For your information, our development teams confirmed the issue. A fix will be available in a future release. We cannot share a date for the moment. I will keep you informed.

With regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal bug tracker Issue confirmed and logged into the internal bug tracking system mw Middleware-related issue or pull-request. usb Universal Serial Bus
Projects
Status: In progress
Development

No branches or pull requests

3 participants