TDA4VM: CPTS and GTC synchronization

Part Number: TDA4VM

Hi everyone,

I'm very new to PTP and time synchronization, so I apologize if this is a basic question.

My goal is to develop a PTP slave using the MCU_CPSW0 and its CPTS module of TDA4VM for PTP support.

My understanding is that the CPTS will be synchronized to the PTP master. I am thinking to synchronize the GTC to the CPTS so that the rest of the system can also use the PTP-aligned time.

Took reference from the below question, which says both RTOS and linux can access the GTC. 
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1331793/tda4vm-tda4-linux-and-rtos-time-sync 

I have the following questions:

Can GTC can be used as the single time source across the entire sytem?

Is this the correct approach? Should the CPTS first be synchronized to the PTP master, and then the GTC be synchronized to the CPTS?

Is it possible to synchronize the GTC with the CPTS from Linux? If so, are there any existing drivers or any mechanism that should be followed?

For the PTP synchronization, is using ptp4l a recommended method?

Thank you for your time.

  • Hi,

    My goal is to develop a PTP slave using the MCU_CPSW0 and its CPTS module of TDA4VM for PTP support.

    Yes, it is possible from CPTS using the CPSW driver from RTOS or Linux.

    My understanding is that the CPTS will be synchronized to the PTP master. I am thinking to synchronize the GTC to the CPTS so that the rest of the system can also use the PTP-aligned time.

    GTC is a free running counter it can't have nudge adjustment for counter correction.
    You can use software utility to calculate the offset and rate difference between GTC and CPTS.

    Can GTC can be used as the single time source across the entire sytem?

    As mentioned above GTC is free running counter can be accessed by all cores in the SoC.

    Is this the correct approach? Should the CPTS first be synchronized to the PTP master, and then the GTC be synchronized to the CPTS?

    CPTS can synchronize to PTP Master but, GTC can't synchronize to CPTS need to maintain SW utility continuously adjust to CPTS.

    Please refer to Multi core time sync mechanism from SDK b/w ETHFW Server and Client using CPSW9G, ETHFW application was not supported for CPSW2G, supported only for CPSW5G/CPSW9G.
    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j784s4/latest/exports/docs/ethfw/docs/user_guide/ethfw_c_ug_top.html#ethfw_c_ug_mts

    For the PTP synchronization, is using ptp4l a recommended method?

    You can use ptp4l from Linux for PTP Synchronization.

    Linux has phy2sys utility to sync system time with Network Hardware clock (PHC).

    Best Regards.
    Sudheer