Time Sync is a library developed to provide uniform IP abstracted PTP support to CPSW & ICSS IPs. Time Sync library utilizes hardware timestamping provided by CPTS(CPSW) or IEP(ICSS) to enable time synchronization with better accuracy.
On AM64X, we can do ethernet based communication using two different underlying HW mechanisms
==========================
Timesync Test
==========================
Init Enet's OSAL and utils to use defaults
Init memory utils
Create clock and task for periodic tick
Create periodic tick task
Create periodic tick clock
Open Main UDMA driver
Init all peripheral clocks
----------------------------------------------
Enabling clocks!
Init all configs
----------------------------------------------
cpsw-3g: init config
Create RX tasks
----------------------------------------------
cpsw-3g: Create RX task
Open all peripherals
----------------------------------------------
cpsw-3g: Open enet
Attach core id 1 on all peripherals
----------------------------------------------
cpsw-3g: Attach core
cpsw-3g: Open port 1
cpsw-3g: Open port 1 link
cpsw-3g: Open DMA
initQs() txFreePktInfoQ initialized with 16 pkts
cpsw-3g: Waiting for link up...
MAC Port 1: link up
cpsw-3g: Port 1 link is up
cpsw-3g: MAC port addr: f4:84:4c:f9:88:c4
Enet Timesync Menu:
'c' - GetCurrentTime
't' - Toggle Printing timestamps
's' - Print statistics
'r' - Reset statistics
'm' - Show allocated MAC addresses
'x' - Stop the test
t
Enable Timestamp Printing
RX PTP time is : 13219154567
TX PTP time is : 13219204642
RX PTP time is : 14222561337
TX PTP time is : 14222608577
RX PTP time is : 15237477912
TX PTP time is : 15237519097
RX PTP time is : 16238653702
TX PTP time is : 16238698897