2024-03-17 05:13 PM
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?
2024-03-17 07:51 PM
No, 64 bytes is the limit on the packet size in the USB FS protocol. It cannot be changed.
2024-03-17 08:44 PM
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?
2024-03-18 05:33 AM
Yes, transmitted data is also subject to the same limitation. Packets are created in 64-byte chunks after the call to CDC_Transmit_FS.