cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB_CDC fails to receive data of 50 bytes and reports wrong data incoming data length

AMuya.1
Associate II

Hi, I'm working on a modified CDC USB device in full-speed mode (STM32WB55, with STM Cube 1.9.0). I modified it to be a CCID class device.
The issue I'm having is that when I send data of length 50 (51, 52, 242,243,244, 247,248,249), it just fails and crashes the USB port.
After trying to find the source of the problem. I have found that the length of data returned passed to my CCID code is the wrong length.
I've pinpointed that the USBD_LL_getrxdatasize function is returning the wrong length or gets corrupted somewhere (when it fails it returns something like 50000 bytes and that's what probably crashes the device). 
Any help would be appreciated

0 REPLIES 0