Question
STM32CubeMX USB CDC memory wastage for FS USB
Posted on July 14, 2015 at 06:16
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. #stm32cube #usb #cdc #com-port