I'm testing the dev_composite_cdc_vcom_cdc_vcom_freertos demo -
In virtual_com.c , if I comment out the copy to TX, so that there is no data TX, then it appears that the RX will only execute once and all subsequent RX data is ignored.
Any idea on why that is?
I'm referring to the below function.
So normally, the "user code" check for recvSize is true every time I send data from terminal via USB.
BUT if i comment out the code to trigger a send, for some reason vcomInstance->recvSize is only ever != 0 once.
usb_status_t error = kStatus_USB_Error;
volatile usb_cdc_vcom_struct_t *vcomInstance;
for (uint8_t i = 0; i < USB_DEVICE_CONFIG_CDC_ACM; i++)
vcomInstance = &g_deviceComposite->cdcVcom[i];
if ((1 == vcomInstance->attach) && (1 == vcomInstance->startTransactions))
/* User Code */
if ((0 != vcomInstance->recvSize) && (0xFFFFFFFFU != vcomInstance->recvSize))
/* Copy Buffer to Send Buff */
// Comment out the below 3 lines - then the RX block is only executed once
// for (i = 0; i < vcomInstance->recvSize; i++)
// vcomInstance->currSendBuf[vcomInstance->sendSize++] = vcomInstance->currRecvBuf[i];
vcomInstance->recvSize = 0;