STM32U3 + USBX device: init step missing from the generated HAL PCD code?
Hi,
I'm bringing up a USB MSC device on an STM32U385CGT6 with the USBX middleware in standalone mode. Everything comes from CubeMX 6.18.0 with STM32Cube FW_U3 V1.4.0 (USBX 6.4.0): USB_DRD_FS in device mode, USBX Core System + UX Device CoreStack + UX Device Controller + UX Device MSC.
While comparing the generated code and some example applications (NUCLEO-U385RG-Q Ux_Device_HID_Standalone) it looks there is a regression in the generated HAL_PCD_MspInit. While the version from the example application enables Vdd USB, this is missing from the currently generated version of HAL_PCD_MspInit causing the peripheral to remain powered down.
As a fix HAL_PWREx_EnableVddUSB(); can be called in the user code section at the bottom of HAL_PCD_MspInit.
Best Regards, Cecil
