Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-19 Thread Richard Cochran
On Mon, May 18, 2020 at 04:26:33PM -0700, Jacob Keller wrote: > Yep, the current code doing that is incorrect if the platform can't do > unaligned access. But only if the pointer is actually not aligned. The way the buffers are allocated and the message definitions ensure proper alignment. In a

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-18 Thread Jacob Keller
On 5/16/2020 11:22 AM, Lokesh Vutla via Linuxptp-devel wrote: > Hi Richard, > > On 16/05/20 10:44 PM, Richard Cochran wrote: >> On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote: >>> Hi Richard, >>> >>> On 16/05/20 10:24 PM, Richard Cochran wrote: On Fri, Apr 17, 2020 at 10:00:09

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-16 Thread Lokesh Vutla via Linuxptp-devel
Hi Richard, On 16/05/20 10:44 PM, Richard Cochran wrote: > On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote: >> Hi Richard, >> >> On 16/05/20 10:24 PM, Richard Cochran wrote: >>> On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: phc2pwm.c | 233 +++

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-16 Thread Richard Cochran
On Sat, May 16, 2020 at 10:35:33PM +0530, Lokesh Vutla wrote: > Hi Richard, > > On 16/05/20 10:24 PM, Richard Cochran wrote: > > On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: > >> phc2pwm.c | 233 ++ > >> 2 files changed, 237 ins

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-16 Thread Lokesh Vutla via Linuxptp-devel
Hi Richard, On 16/05/20 10:24 PM, Richard Cochran wrote: > On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: >> phc2pwm.c | 233 ++ >> 2 files changed, 237 insertions(+), 2 deletions(-) >> create mode 100644 phc2pwm.c > > I wanted

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-16 Thread Richard Cochran
On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: > phc2pwm.c | 233 ++ > 2 files changed, 237 insertions(+), 2 deletions(-) > create mode 100644 phc2pwm.c I wanted to try this today. There are some issues: /home/richard/git/linux

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-05-10 Thread Lokesh Vutla via Linuxptp-devel
Hi Richard, On 30/04/20 7:24 PM, Richard Cochran wrote: > On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: >> - I could not fit pwm servo within existing servo implementations. Let >> me know if you have any idea to do it. > > Why not just use the exising PI servo? The main reason

Re: [Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-04-30 Thread Richard Cochran
On Fri, Apr 17, 2020 at 10:00:09AM +0530, Lokesh Vutla wrote: > - I could not fit pwm servo within existing servo implementations. Let > me know if you have any idea to do it. Why not just use the exising PI servo? > +static void usage(char *progname) > +{ > + fprintf(stderr, > +

[Linuxptp-devel] [RFC PATCH 3/3] phc2pwm: Introduce an utility to sync pwm with PTP clock

2020-04-16 Thread Lokesh Vutla via Linuxptp-devel
Phc2pwm is an utility program to synchronize a pwm with ptp clock to generate PPS. This is mainly intended for the below hardware configuration: - A PTP supporting IP that is not capable of generating PPS signal - A PWM signal that is connected to the above PTP hardware - On every rising edge of PW