[time-nuts] time transfer over USB

Herbert Poetzl herbert at 13thfloor.at
Tue May 14 01:22:26 EDT 2013

On Mon, May 13, 2013 at 08:36:14PM -0700, Peter Monta wrote:
> I wonder if the following scheme would work to improve
> measurement precision over USB for use with GPS devices 
> or similar.

> Instead of USB interrupt transfers, which occur on 1 ms
> boundaries with some unknown epoch, use bulk transfers. 
> In the good case, there are no other USB transactions in
> flight, the request goes out immediately, the device 
> responds immediately, and the entire link has the lowest 
> latency possible. 

IMHO the transfer mode of choice for this purpose should 
be the Isochronous Transfer (in USB 2.0 and 3.0) because
it happens periodically and thus can achieve a guaranteed
maximum latency (for high speed this means 125us).

> If these conditions don't hold, the completion time will be
> delayed. Now use robust estimation techniques to get rid
> of these exceptions and instead follow the smooth line of
> best-case responses. NTP implementations do something like 
> this already, but at longer timescales, and targeted at
> Internet links rather than a single local USB link.

> If the best-case response time is calibrated out, how good 
> can this get? Microseconds?

With 125us latency and a fixed interval, it should be
possible to calculate the relation between the transfer
intervall (USB clock crystal) and the PPS (or whatever 
information is transmitted) and thus easily get below 
the 100us.


> Cheers,
> Peter
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

More information about the time-nuts mailing list