Hi Richard, On 09/03/20 7:52 PM, Richard Cochran wrote: > On Mon, Mar 09, 2020 at 06:30:24PM +0530, Lokesh Vutla wrote: >> So the solution proposed to generate PPS is: >> - Configure DMTIMER in PWM mode with 1 second period. >> - Enable HW_TS_PUSH support in CPTS driver. >> - Synchronize the PWM period to PTP using the timestamps such that the rising >> edge of the PWM is always at the second boundary of PTP clock. > > The problem is the extremely low resolution of the DMTIMER. IIRC, it > is 30 usec or something like that. That makes the resulting 1-PPS > useless for most (all?) applications.
Timer resolution is entirely dependent on the input clock frequency. 30us resolution is true only if the input clock frequency of DMTIMER is 32KHz. AM335x[0] and later TI SoCs provide the following 3 options as the input clocks to DMTIMERs that we are concerned with: - Oscillator clock (24MHz in BBB). Resolution is 42ns - 32KHz clock. Resolution is 30us - External timer clock source (Can be 100MHz clock). Resolution is 10ns. My experiments with BBB is with OSC clock and was able to generate PPS signal synchronized to PTP clock with an error of ~ 50ns. Is this information sufficient to consider for a generic user-space solution :) Or you have other opinions? [0] http://www.ti.com/lit/ug/spruh73q/spruh73q.pdf "Figure 20-3. Timer2-7 Integration" Thanks and regards, Lokesh _______________________________________________ Linuxptp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
