Dear all,
I used the LPC1778 and I will sending data via USB CDC class. Sending a big amount of data from the device to the host is no problem. The Problem is that I don't be able to detect the end of an OUT transition. The device max packet length is 64 Byte and the host send 138 Byte in the best case the device will get three ISR with 64 + 64 + 10 Byte. How can I knew that the frame ends?
USB normally uses short - or empty - frames to report end of a message.
But an important thing is that COM ports are stream devices. So there are no "end-of-file" in the carrier. So COM protocols that requires packet processing must introduce some framing information within the serial data to let the receiver know when it has a complete message.
That makes sense and I tried it. It runs stable a several times. I send 20 Byte between device and host faster than 1ms. I got after a few thousand or more no response from the device, but I can restart the communication after a timeout while the port is open. That is no problem. I use W7 and when the communication is running I pluck the USB cable and back while the port is open. After I will connect the device again by open the port the device will not response anything. It first response when I use “devcon restart *[VID]*”. Why I have to restart the driver?