I have a device (USB CDC) class that is connected to a host PC via USB. On this device there's a request-response task implemented, meaning I get a message, do some stuff and when I'm done I send a response. The problem I have is that it takes, from the host perspective, too long until I get a response to a certain request. My suspicion is that probably the polling of the USB input buffer on the host PC is too slow and therefore causes this delay. But to rule out a problem on my USB device, I thought I can hook up a scope to my data line (D+) and measure the time between the incoming and the outgoing message. Unfortunately there's a lot going on on this line even though no data is transmitted.
- Is there some idle communication on the USB line?
- Is there a way to distinguish this idle data from real data? Or is there a better way than measuring the data line?
I took a capture (at least I think I did) where the two PPP Unknown messages contain my data. Is this proof that the response time 55.624225 vs 55.625272 is less than 1ms?
As a consequence, this would mean that it's indeed the host application that cannot poll the USB Input Buffer fast enough?