Content originally posted in LPCWare by BPC on Thu Jul 11 11:04:27 MST 2013
I am running into what I believe is some type of data overwrite when I call 2 consecutive WriteEP commands. Unless I put a delay between these commands, some data from the second buffer appears in the USB transfer from the first buffer. It is also completely random. Sometimes each command goes through as expected. Sometimes the data is garbled together. I am guessing these commands are being called too closely together and violating some spec (USB FS frame rate maybe?). Any help here would be greatly appreciated.
pUsbApi->hw->WriteEP (hUsb, USB_CDC_EP_BULK_IN, (unsigned char *)&buffer_1[0], strlen(buffer_1));
pUsbApi->hw->WriteEP (hUsb, USB_CDC_EP_BULK_IN, (unsigned char *)&buffer_2[0], strlen(buffer_2));