cancel
Showing results for 
Search instead for 
Did you mean: 

Question regarding virtual COM port communication using CDC

pass3master
Associate III

This is a question regarding virtual COM port communication using CDC.
A STM32F412 Discovery with CDC installed is connected to a Windows PC, and 70 bytes of data is sent from the PC via serial communication.
However, when receiving with CDC_Receive_FS, it is divided into 64 bytes of data and 6 bytes of data.
If I change the Define definition, can I receive 70 bytes of data without being split?

3 REPLIES 3
TDK
Guru

No, 64 bytes is the limit on the packet size in the USB FS protocol. It cannot be changed. 

If you feel a post has answered your question, please click "Accept as Solution".

Thank you for your response.
I see, I understand. Does this constraint naturally affect CDC_Transmit_FS as well?

If I do CDC_Transmit_FS(&sendData[0], 70); and then run serialport1.Read(receiveData,0,70) on the PC side (C#), it seems to be received in one time...

Does this mean that it just looks that way?

Yes, transmitted data is also subject to the same limitation. Packets are created in 64-byte chunks after the call to CDC_Transmit_FS.

If you feel a post has answered your question, please click "Accept as Solution".