AnsweredAssumed Answered

Get lenght of all data transferred in CDC

Question asked by urbanek.mirek on Mar 31, 2016
Latest reply on Mar 31, 2016 by FTITI.Walid
Hi all,
I have a problem with CDC class. I have 26464 bytes on USB Host to transfer to my SM32F429 Discovery device.

I need to receive all these data and after that do some parsing.

How to do this trick in this function? :

static int8_t CDC_Receive_HS (uint8_t* Buf, uint32_t *Len)
{
/* USER CODE BEGIN 11 */
USBD_CDC_ReceivePacket(hUsbDevice_1);
return (USBD_OK);
/* USER CODE END 11 */
}

I cant get the total lenght of data. USBD_CDC_ReceivePacket only receives another 64/512 bytes from hosts buffer. Am i right? How can i detect end of recieving?

Thanks a lot.

Outcomes