AnsweredAssumed Answered

STM32CubeMX USB CDC memory wastage for FS USB

Question asked by hosken.david on Jul 14, 2015
When creating USB CDC code for devices with a USB FS port, 448 bytes are wasted. The USBD_CDC_HandleTypeDef structure in usbd_cdc.h uses CDC_DATA_HS_MAX_PACKET_SIZE to create data buffer. This is defined as 512 bytes(message size for USB HS). But, the CDC_DATA_FS_MAX_PACKET_SIZE define can be used for USB FS devices, which only requires 64 bytes.

ST should modify code to check if USB is FS or HS.

Outcomes