2016-03-31 05:21 AM
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.2016-03-31 07:02 AM
Hi urbanek.mirek,
usbd_cdc_if.c is a driver for user application, and the code implemented now is just for help so you can modify it or add your own code [in user code section].
I recommend that you refer to the user code proposed in this [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32%20Virtual%20Com%20Port%20problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx?View%3D%257bA4EEE515%252d04F0%252d42D9%252dAC32%252dA6D8340F101B%257d%26FolderCTID%3D0x012001¤tviews=161]discussion.For more details, on how you use the STM32Cube USB device library, please refer to
user manual.-Hannibal-