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

Babble error is not in HCD_HC_IN_IRQHandler #3

Closed
froha opened this issue Jun 19, 2020 · 6 comments
Closed

Babble error is not in HCD_HC_IN_IRQHandler #3

froha opened this issue Jun 19, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request hal HAL-LL driver-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet
Milestone

Comments

@froha
Copy link

froha commented Jun 19, 2020

The flag USB_OTG_HCINT_BBERR is not handled in the HCD_HC_IN_IRQHandler.
So if this occurs, then the flag would never be cleared and the interrupt is always running.

The CubeF4 HCD_HC_IN_IRQHandler does handle the babble error:

else if ((USBx_HC(ch_num)->HCINT & USB_OTG_HCINT_BBERR) == USB_OTG_HCINT_BBERR) { __HAL_HCD_CLEAR_HC_INT(ch_num, USB_OTG_HCINT_BBERR); hhcd->hc[ch_num].state = HC_BBLERR; __HAL_HCD_UNMASK_HALT_HC_INT(ch_num); (void)USB_HC_Halt(hhcd->Instance, (uint8_t)ch_num); }

@ALABSTM
Copy link
Contributor

ALABSTM commented Jul 21, 2020

Hi @froha,

Thank you for your report. May I ask you the firmware version you are using and the file the potential issue is located into.

With regards,

@froha
Copy link
Author

froha commented Jul 21, 2020

Hi @ALABSTM,

we use a combination from the old Standard Peripherals Library and only the USB part from the STM32CubeF2 library.
We made this for supporting multiclass devices like CDC+MSC, but that is an other story.

STM32F2xx Standard Peripherals Library Drivers V1.1.2
STM32CubeF2
STM32F2xx HAL Drivers V1.1.1
STM32 USB Host Library V3.2.2

Best regards

@ALABSTM
Copy link
Contributor

ALABSTM commented Jul 21, 2020

Hi @froha,

Regarding the F2 HAL, latest version is v1.2.4. Regarding USB Host library, latest version supported in F2 firmware is v3.3.3. Would you mind migrating to these and check whether the issue still persists?

May I also know which source file the couple of lines of code you put in your first comment are extracted from. It would help us very much to locate and fix the issue if confirmed.

Thank you,

@froha
Copy link
Author

froha commented Jul 22, 2020

Hi @ALABSTM,

no, because the flag is not handled in the source code, so it wouldn't solve the problem.
We fixed it ourselves and made other changes.
And i cannot reproduce a Babble Error now to verify.

The line of codes are from the STM32CubeF4 / Drivers / STM32F4xx_HAL_Driver / Src / stm32f4xx_hal_hcd.c file.
https://github.com/STMicroelectronics/STM32CubeF4/blob/5d01400afd60410f6e049cbd19179a67d44d53fd/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_hcd.c#L1173

Best regards

@ALABSTM
Copy link
Contributor

ALABSTM commented Jul 22, 2020

Hi @froha,

Thank you for these details. Your report will be sent to our development teams for further analysis. I will get back to you as soon as I get their feedback.

Best regards,

@ALABSTM ALABSTM moved this from To do to Assigned in stm32cube-mcu-fw-dashboard Jul 22, 2020
@ALABSTM
Copy link
Contributor

ALABSTM commented Aug 6, 2020

Hi @froha,

The issue you pointed out has been confirmed by our development teams.

Actually, the handling of the babble error has been internally implemented. The update should be available in the frame of the next release of the STM32CubeF2 FW package. We cannot share a date for the moment. It should be done soon enough hopefully.

In the meanwhile, please find attached the updated version of the hal_hcd source files (along with hal_pcd and ll_usb source files needed for successful compilation) hoping this helps. Thank you again for your contribution.

With regards,

@ALABSTM ALABSTM added enhancement New feature or request spotted before customer Spotted and fixed internally before being pointed out by users but not published yet labels Aug 6, 2020
@ALABSTM ALABSTM moved this from Assigned to To release in stm32cube-mcu-fw-dashboard Aug 6, 2020
@ALABSTM ALABSTM added the hal HAL-LL driver-related issue or pull-request. label Sep 28, 2020
@ALABSTM ALABSTM added this to the v1.9.1 milestone Oct 13, 2020
@ALABSTM ALABSTM closed this as completed Oct 13, 2020
stm32cube-mcu-fw-dashboard automation moved this from To release to Done Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hal HAL-LL driver-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet
Projects
Development

No branches or pull requests

2 participants