AnsweredAssumed Answered

STM32F0 HAL Firmware 1.0.9 Usb bug

Question asked by Simon Benoit on Jun 1, 2018
Latest reply on Jun 8, 2018 by Khouloud G



I am new to forum posting and I don't really know how to start ....

It's been a while since I wanted to give the HAL drivers a chance and every time ... I get disappointed. My guess is that they use their interns to code the drivers and no one review them before releasing a package.


Enough said, let's get to the point. I generated a template with STM32 CubeMx on my discovery STM32F072 and wanted to have the USB CDC interface. While looking for a mysterious bug that hangs the micro and bring it to a hard fault, I have found some interesting thing in the file : usbd_code.h


Once again, I don't know where else to go to report this bug, so. Let's take, for example

* @brief USBD_Start
* Start the USB Device Core.
* @param pdev: Device Handle
* @retval USBD Status
USBD_StatusTypeDef USBD_Start (USBD_HandleTypeDef *pdev)
    /* Start the low level driver */
   return USB_OK;
See that return value that always return USB_OK ?
So my fix here would be :
USBD_StatusTypeDef USBD_Start (USBD_HandleTypeDef *pdev)
/* Start the low level driver */
return USBD_LL_Start(pdev);
Let me know if I am wrong, but I have to go through all this file to edit all the return values or else ... they are useless.