I'm trying to create a USB composite device with 2 registered classes DFU and CDC ACM, using USBX middleware on stm32u585 mcu.
I was going through those two examples on git:
- STM32CubeU5/Projects/B-U585I-IOT02A/Applications/USBX/Ux_Device_DFU/
- STM32CubeU5/Projects/B-U585I-IOT02A/Applications/USBX/Ux_Device_HID_CDC_ACM/
Both examples work as expected when running separately.
As a starting point I used Ux_Device_DFU example and started copying CDC ACM part into my project. DFU and CDC ACM device classes are successfully registered using ux_device_stack_class_register function.
However when HAL_PCD_Start is called only DFU class is visible in device manager on PC.
I have noticed that in function MX_USB_Device_Init there are functions HAL_PCDEx_SetRxFiFo and HAL_PCDEx_SetTxFiFo being called and I do not understand how and which endpoints should be configured. I'm thinking this could be the case that CDC ACM class is not visible in device manager.
I was hoping if someone could help me out on this.
Some additinal info: MCU: STM32U585QIIx
STM32CubeMX version: Version 6.5.0
FW package version: SWM32Cube FW_U5 V1.1.0
From your description it seems the device framework (USB descriptors reported to host) are not updated, if you want to add CDC things into DFU, you should modify configuration descriptors in the device framework, to report to host that CDC is included in device side.