[Linuxptp-devel] PPS generation on BeagleBoneBlack
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Lokesh V. <lok...@ti...> - 2020-03-09 13:17:14
|
Hi All,
I am working on generating a PPS signal that is synchronized to PTP clock on
BeagleBoneBlack having AM335x SoC.
Here is a brief on the hardware support available on AM335x SoC:
- A CPTS module (supporting PTP protocol) generates PTP clock.
- CPTS module does not have the capability to output PPS signal synchronized to
PTP clock.
- CPTS module is connected to output of DMTIMER pin.
- Whenever DMTIMER pin goes from low to high, CPTS pushes the timestamp to
Hardware fifo(HW_TSPUSH), which can be forwarded to userspace by the CPTS driver.
- DMTIMER is an upward counter and can be configured in PWM mode.
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.
This synchronization has been achieved by a small user space utility using PTP
file read operations and PWM /sys/class exported file operations. Since the
implementation is platform agnostic, I was wondering:
- If it makes sense to host this utility under linuxptp or linuxpps something
like *phc2pwm*.
- If anyone is aware of already existing similar solutions that can be used
generically.
- If this should be hosted separately.
Any suggestion is much appreciated.
Thanks and regards,
Lokesh
|