STM32Cube FW_G4 V1.4.0 breaks USB HID communication
I have been having much difficulty trying to port a custom USB HID protocol from a previous project using the STM32F405 to the STM32G431. Connection would initially be established, immediately followed by pipe errors. Eventually I found that if I downgraded from the V1.4.0 firmware package to the V1.3.0, the application was able to successfully establish USB communication with my PC. After some painstaking file comparison and testing with GIT, I found the lines of code in V1.4.0 that break USB HID communication:
"Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pcd.c" - line 1854: A conditional that checks for non bulk transactions that was removed from V1.4.0
"Middlewares/ST/STM32_USB_Device_Libarary/Class/CustomHID/Src/usbd_customhid.c" - line 682: A call to "USBD_LL_PrepareReceive" was removed from the "USBD_CUSTOM_HID_DataOut" function.
Restoring both of these lines restored USB functionality.
