cancel
Showing results for 
Search instead for 
Did you mean: 

USBX Add Custom Class

Jason927
Associate

MCU:STM32U585xx

Env:ThreadX + USBX + FileX

I want to use USBX add my own class type, but I'm already have 3 classes, HID, MSC and CDC ACM, it means 4 classes after added my own.

In file (ux_device_descriptors.h) have a define (USBD_MAX_SUPPORTED_CLASS  3U), this value determined the (tclasslist) array size, also the framework max class, can not be changed by user define or STM32CubeMX(no option find).

If I change this define, it will be overwrite by STM32CubeMX when generated code. How can I do this correctly?

1 REPLY 1
FBL
ST Employee

Hi @Jason927 

Using latest CubeMX version, it is supported on H5 not sure on U5. So, ensure that there is enough RAM, stack and heap memory allocated, configuration descriptor to handle the additional class in USBX. 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.