Open hepr-skylotec opened 2 years ago
Hi @h-actsafe
Can you please take a look at this example of PMA config with Ux_Device_CDC_ACM developed on G0 [STM32G0C1E-EV] https://github.com/STMicroelectronics/x-cube-azrtos-g0/blob/2b77e6fa7dd42cd60a959cff12abc8c3055dc543/Projects/STM32G0C1E-EV/Applications/USBX/Ux_Device_CDC_ACM/USBX/App/app_usbx_device.c#L273
Best Regards. Mohamed
Using:
While trying to get UsbX working all different setups would fail. Hardware is known good as the built in ST Bootloader enumerates correctly and works perfectly to flash over USB from Windows.
I finally tracked it down to the Buffer Descriptor table in PMA Memory not being correcly initialised by the UsbX STM adaptation layer in x-cube-azrtos-l4/tree/main/Middlewares/ST/usbx/common/usbx_stm32_device_controllers/
A "dumb" workaround by calling HAL_PCDEx_PMAConfig() before starting the stack makes enumeration work.
E.g. for a CDC class use the following works.
But this should really be fixed in
ux_dcd_stm32_initialize()
orux_dcd_stm32_initialize_complete()
Without any reasonable PMA configuration USB will always fail and be completely unusable.