USBD_VCOM_SendData function bug. Does not send if Length is a multiple of 64

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User13960
Level 3
Level 3
First like received
Hi Infineon support,

I hope you can help. I am raising this bug again as the original trail has gone cold.

If the Length passed to the USBD_VCOM_SendData function is a multiple of 64, the data is not sent. Calling the function again with new data and a non 64 multiple length will cause the original data and the new data to be sent.

Would you be able to resolve this or suggest a work around please as I have a critical project to deliver.


Thank you very much
PHAB


PS. Here is the original report of the bug in March 2017...

https://www.infineonforums.com/threads/4889-USBD_VCOM_SendData-Problem?p=17644#post17644
0 Likes
1 Reply
User13960
Level 3
Level 3
First like received
This bug can be extremely difficult to find in a system transmitting variable length strings as the fault may only occur once over several hours, days, weeks etc.

For anyone experiencing this problem the work around I have implemented is...


Fill buffer

if (buffer length is a multiple of 64)
{
Append a NULL character to the end of the buffer
Increment Length variable
}

Hope this helps

PHAB
0 Likes