Content originally posted in LPCWare by giedrius on Mon Jul 08 09:18:48 MST 2013
Hi,
I am working with LPC11U37 chip. I have somewhat modified USB CDC example (VCOM removed, more buffering added) and everything is running fine except when two subsequent calls to pUsbApi->hw->WriteEP are made. Calling WriteEP twice one after another causes undefined behavior in the data delivered to the PC - most of the time only the data specified in the second call is received on the PC and other times all data is lost.
Is it incorrect to call WriteEp, do a tiny or no pause, and call it again? If so, how can I check if it is safe to call WriteEp?
Thanks!