diff --git a/src/main/vcp_hal/usbd_cdc_interface.c b/src/main/vcp_hal/usbd_cdc_interface.c index 0522cf2c3c..cfc4400a96 100644 --- a/src/main/vcp_hal/usbd_cdc_interface.c +++ b/src/main/vcp_hal/usbd_cdc_interface.c @@ -299,6 +299,12 @@ static int8_t CDC_Itf_Receive(uint8_t* Buf, uint32_t *Len) { rxAvailable = *Len; rxBuffPtr = Buf; + if (!rxAvailable) { + // Received an empty packet, trigger receiving the next packet. + // This will happen after a packet that's exactly 64 bytes is received. + // The USB protocol requires that an empty (0 byte) packet immediately follow. + USBD_CDC_ReceivePacket(&USBD_Device); + } return (USBD_OK); }