cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to run MSC and CDC in composite mode

devjeetmandal09
Associate

BOARD: STM32H743IITX
ACTICLE FOLLOWED: https://community.st.com/t5/stm32-mcus/how-to-implement-a-usb-device-composite-in-stm32h5/ta-p/708078

Hello everyone,
I was trying to use USB CDC+MSC in composite mode. After following the article mentioned above, i was able to build the project. But after running i was able to only get MSC (as shown in pc) and getting the CDC port with windows error 10.

Few things i have changed, in usbd_desc.c updated these lines

 
 0xEF, /* bDeviceClass */

 0x02, /* bDeviceSubClass */

 0x01, /* bDeviceProtocol */



Also i have updated CDC_IN_EP, CDC_OUT_EP, CDC_CMD_EP so it should not match MSC_EPIN_ADDR and MSC_EPOUT_ADDR

 
 
#ifndef CDC_IN_EP

#define CDC_IN_EP 0x82U /* EP1 for data IN */

#endif /* CDC_IN_EP */

#ifndef CDC_OUT_EP

#define CDC_OUT_EP 0x02U /* EP1 for data OUT */

#endif /* CDC_OUT_EP */

#ifndef CDC_CMD_EP

#define CDC_CMD_EP 0x83U /* EP2 for CDC commands */

#endif /* CDC_CMD_EP */

 

#ifndef MSC_EPIN_ADDR

#define MSC_EPIN_ADDR 0x81U

#endif /* MSC_EPIN_ADDR */



#ifndef MSC_EPOUT_ADDR

#define MSC_EPOUT_ADDR 0x01U

#endif /* MSC_EPOUT_ADDR */



Also i can individually, use cdc and msc from this code.
For CDC, i have to use bDeviceClass as 0x02
For MSC, i have to use bDeviceClass as 0xEF,

The windows error is

This device cannot start. (Code 10)

A device which does not exist was specified.

Any help will be appreciated.
Thanks

Devjeet Mandal



0 REPLIES 0