2022-07-07 11:01 AM
Hello!
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
Best regards,
Miha
Solved! Go to Solution.
2022-07-16 01:40 AM
By changing VID and PID of device, different USB devices shows up in Device Manager. I tried two different configurations:
a) VID: 1155 PID: 57105 // defined in Ux_Device_DFU example
result: DFU device shows up, no composite device and no CDC_ADC (USB serial device)
This was my setup and that's why USB composite device and USB Serial Device did not show up.
b) VID: 1155 PID: 22352 // defined in Ux_Device_HID_CDC_ACM
result: USB Composite Device shows, USB Serial Device shows, DFU class is unrecognized, it is shown as in "Other devices" in device manager with Device desctiption: "@Internal Flash /0x0800.."
2022-07-16 01:40 AM
By changing VID and PID of device, different USB devices shows up in Device Manager. I tried two different configurations:
a) VID: 1155 PID: 57105 // defined in Ux_Device_DFU example
result: DFU device shows up, no composite device and no CDC_ADC (USB serial device)
This was my setup and that's why USB composite device and USB Serial Device did not show up.
b) VID: 1155 PID: 22352 // defined in Ux_Device_HID_CDC_ACM
result: USB Composite Device shows, USB Serial Device shows, DFU class is unrecognized, it is shown as in "Other devices" in device manager with Device desctiption: "@Internal Flash /0x0800.."