Substantial work has been put in by my old research group at UCLA to expose
the am335x internal timers as PTP clocks. The general thrust of the project
is to expose Quality of Time (QoT) to the application layer, allowing the
OS to balance resources (sync) with demand (application time requirements).
If I recall correctly, we were able to generate a PWM signal from a
hardware timer with a known rising edge, which we internally used to
trigger a CPTS event. In so doing we synchronized the am335x clocks to the
PTP clock. Presumably a similar method can be used for PPS.
Here's a kernel module to expose the am335x clocks as PTP clocks:
https://bitbucket.org/rose-line/qot-stack/src/59b4c96dd55c6470b91ae2456460f52973483fa4/src/modules/qot_am335x/qot_am335x.c?at=thorn16_refactor&fileviewer=file-view-default
Andrew
On Sat, Dec 3, 2016 at 11:22 AM, David Cemin <david.ce...@coveloz.com>
wrote:
> Thank you Kim an Delio,
>
> I think that this is quite easy to implement and i will give it a try.
>
> This will for find for 1Hz pulses, but what if i wanted to generate higher
> frequencies (i.e. 10kHz+) ?
>
> on the CPTS section where it explains about the TS_PUSH events coming from
> the timers, its written this:
> " Hardware time stamps are intended to be an extremely low frequency
> signals, such that the event FIFO does not overrun. Software must keep up
> with the event FIFO and ensure that there is no overrun, or events will be
> lost."
>
> So this approach might not be adequate for this purpose (higher
> frequencies). I was thinking in maybe using one of this timers (or a pwm)
> and sync and synchronize it to ptp using phc2sys. Do you see any problem on
> this approach for higher frequencies or do you have any other ideas that
> you wouldnt mind sharing ?
>
> Thanks
>
> On Fri, Dec 2, 2016 at 4:10 AM, Delio Brignoli <dbrign...@audioscience.com
> > wrote:
>
>> Hello David,
>>
>> We use a different SoC equipped with CPTS and we do not generate a PPS
>> signal but we do something which I believe can be adapted to obtain a PPS
>> signal. We leave the CPTS clock free-running and use it as gPTP local clock
>> timebase using linuxptp. We also use DMTimer to trigger CPTS hardware
>> timestamp events and adjust the clock source for the relevant DMTimer using
>> said hardware timestamp events and localclock <—-> gPTP mapping calculated
>> by linuxptp.
>>
>> HTH
>> --
>> Delio Brignoli
>> AudioScience Inc
>>
>> > On 30 Nov 2016, at 21:59, David Cemin <david.ce...@coveloz.com> wrote:
>> >
>> > Hi Kim,
>> >
>> > On this thread (https://www.mail-archive.com/
>> linuxptp-devel@lists.sourceforge.net/msg01033.html) you wrote this
>> >
>> > >We implemented PPS output signal through AM335x Dual-Mode Timer
>> >running in
>> > >the PWM mode with SCLK frequency.
>> >
>> > >This is more accurate than software GPIO output because the CPTS >on
>> the
>> > >AM335x
>> > >can generate hardware timestamp event on the rising edge of the
>> >DMTimer,
>> > >making it possible to synchronize PPS with the CPTS internal clock
>> <counter.
>> >
>> >
>> > Can you (or someone else on this list) give more details on how did you
>> achieve this? Im not sure sure you actually got the pps output sync to PTP
>> on this approach. How did you connect the CPTS to the PWM ?
>> >
>> > Thanks
>> >
>> > --
>> > David
>> >
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > _______________________________________________
>> > Linuxptp-devel mailing list
>> > Linuxptp-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
>>
>>
>>
>>
>
>
> --
>
> *+1 (343) 777-1735 <(343)%20777-1735>* David Cemin http://coveloz.com
>
>
> <http://coveloz.com/>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel