I am doing a test between a PC and an embedded device, and I have a duplicated Start-Of-Frame “issue”, or, maybe is it a normal USB behavior.
A PC is sending a 200 bytes packet to a phytec device thru a usb cable. When the device receives the packet, it sends back a copy to the PC with few updated values. This sequence is repeated 10 000 times. The total time elapsed from first sent packet to last received packet is between 2.8 seconds to 4.9-5.0 seconds.
These values are close to:
(1 ms / 8 ) x 2 x 10 000 = 2.5 seconds (single SOF)
And
2.5 seconds x 2 = 5.0 seconds (when SOF are duplicated, with no data between duplicated SOF).
When sniffing the USB with a Ellisys USB Explorer, sometimes, the SOF packet is duplicated:
[SOF][SOF][TOKEN PING][ACK][TOKEN OUT][DATA0][[NACK]
[SOF][SOF][TOKEN IN][DATA0][ACK]
[SOF][SOF][TOKEN PING][ACK][TOKEN OUT][DATA1][[NACK]
[SOF][SOF][TOKEN IN][DATA1][ACK]
[…]
With duplicated SOF, total test time is about 4.9 seconds.
Some other times that "appear to be random”, there is one single SOF, and then, the total test time is about 2.8 seconds.
My question is:
Is there a way to always (or, most of the time) have one SOF per packet transfer?