I got a strange error in the USB CDC on the STM32F2. I use HAL implementation of the driver. The size of the buffer transferred in USBD_CDC_SetTxBuffer () is 4096 bytes. On the PC side, I accept the data in the terminal.
The problem is as follows. I am trying to transfer large amounts of data on 4096 bytes. Large parcels and send them in a cycle of 4096 bytes.
In case I do not touch the PC successfully transfer data. Tested on 165 MB. However, if on PC I start using the browser, open pictures, listen to music and in every possible way load it, then I don’t receive the entire data packet. I get <165 MB. What is the reason for this problem. PC Operating System - Windows
if I send this large buffer (165 MB) by 256 bytes in cycle - all right