Jetson/FAQ/BSP/PTP Synchronization

From eLinux.org
< Jetson‎ | FAQ/BSP
Revision as of 18:12, 13 November 2019 by Peter Pan (talk | contribs) (Created page with "==Steps== 1. Prepare two Xavier, 1 master DUT 1 slave DUT 2. Install ptp package on both DUTs sudo apt update sudo apt install linuxptp 3. Run below commands to disable def...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Steps

1. Prepare two Xavier, 1 master DUT 1 slave DUT

2. Install ptp package on both DUTs

sudo apt update
sudo apt install linuxptp

3. Run below commands to disable default ptp service on both DUTs

systemctl stop ptp4l
systemctl disable ptp4l
systemctl reboot

4. Assign static IP to both DUTs

5. Connect two DUTs directly with cable. Make sure two DUTs can ping each other

6. Disable time/date sync using below command on both DUTs

sudo timedatectl set-ntp 0

7. Run below command on slave DUT to set a different timestamp

sudo date 040403312012

8. Run below command on both DUTs

sudo ifconfig eth0 allmulti promisc

9. Run below command on master DUT with gPTP.cfg

sudo ptp4l -i eth0 -m -f gPTP.cfg

10. Run below commands on slave DUT gPTP.cfg (run in different terminal)

sudo ptp4l -i eth0 -m -s -f gPTP.cfg  # start ptp daemon
sudo phc2sys -w -s eth0 -O 0  # sync system time with ptp

Then you can see slave's system time is synced with master.