2025-01-14 09:26 AM
Dear Members,
Is there any guidelines to select the values or size of three parameters in STM32cubeMX, middleware (USB device, CDC) to achieve the highest speed on CDC? I am using STM32L4P5VGT. My application streams the sensor data to the Laptop using USB CDC class, once powered on.
To understand the question more in detail, I attached my current settings, are acceptable or can be optimised by reduction or increase, same time, need to avoid wastage of RAM also, so it can be used for other purposes if I am using too much.
Regards
Solved! Go to Solution.
2025-01-16 12:59 AM
Hello @mahapusha
First let me thank you for posting .
Please check this POST , it could be very helpful.
THX
Ghofrane
2025-01-16 12:59 AM
Hello @mahapusha
First let me thank you for posting .
Please check this POST , it could be very helpful.
THX
Ghofrane
2025-01-29 08:01 AM
@Ghofrane GSOURI
I have checked the above link and found it useful for some tricks for dual buffer swapping which was better than mine in code and performance.
Regarding the size allocation, it also does not provide useful info.
1) Can the caller pass the buffer size within 64K to this function for live data buffer? - uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)? The buffer size defined using CubeMx will be used to command exchange between the PC to the device, User RX/TX buffers are also defined in CubeM separately.
2) UserTxBufferFS[APP_TX_DATA_SIZE] and UserRxBufferFS[APP_RX_DATA_SIZE] are used for application data only on USB CDC overhead also will be part of these buffers?
3) ST has any plan for USB device in LL library also, ie without HAL?
Regards