On Wed, Aug 05, 2020 at 04:40:59PM -0700, Jacob Keller wrote:
> 
> 
> On 8/1/2020 10:46 AM, Vladimir Oltean wrote:
> > This propagates the use of "struct ts2phc_private" all the way into the
> > master API, in preparation of a new use case that will be supported
> > soon: some PPS masters (to be precise, the "PHC" kind) instantiate a
> > struct clock which could be disciplined by ts2phc.
> > 
> > When a PHC A emits a pulse and another PHC B timestamps it, the offset
> > between their precise timestamps can be used to synchronize either one
> > of them. So far in ts2phc, only the slave PHC (the one using extts) has
> > been synchronized to the master (the one using perout).
> > 
> > This is partly because there is no proper kernel API to report the
> > precise timestamp of a perout pulse. We only have the periodic API, and
> > that doesn't report precise timestamps either; we just use vague
> > approximations of what the PPS master PHC's time was, based on reading
> > that PHC immediately after a slave extts event was received by the
> > application. While this is far from ideal, it does work, and does allow
> > PHC A to be synchronized to B.
> > 
> 
> Seems like this would be a good place for an extension if HW could
> support it? I don't actually know if any existing HW supports this kind
> of "create a pulse and timestamp it at the same time" though.
> 

The sja1105 switch hardware supports it, for the oneshot (not periodic)
perout output. It even makes a lot of sense, when you think about it.
There's no race to get the whole array of servos done within .5 seconds.
When you're done you're done, and you simply schedule the next time when
you want to trigger the next oneshot pulse, that gets timestamped on
both the sja1105 acting as PPS master, as well as the sja1105 acting as
PPS slave. It makes life simpler for other reasons too, for example
there isn't any need for a FIFO or an interrupt line if you use it this
way. In a way, what I'm currently doing, with plain periodic output and
lack of oneshot, I'm having a much harder time aligning everything,
since the kernel driver has to poll for that extts timestamp.

I'm not aware of hardware that can emit precise timestamps for periodic
output and not oneshot, either. I would imagine that it might exist,
though.


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to