This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Synchronization using PTP with CPSW and ICSS

Part Number: AM2434

Our customer wants to know how to synchronize using PTP with CPSW and ICS in order to synchronize control timing between multiple devices (one PTP master and multiple slaves).

They are using the gPTP examples listed in the following link included in MCU+ SDK.

https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/11_01_00_17/exports/docs/api_guide_am243x/EXAMPLES_ENET_CPSW_TSN_GPTP.html

1) I want to clarify how to synchronize the local clock for CPSW and ICSS on each of slave devices.

For CPSW, the CPTS timestamp inside CPSW is used as the local clock.
For ICSS, the IEP timer inside ICSS is used as the local clock.
The counter value of the local clock is adjusted and updated to value calculated by software based on the time obtained from the received time synchronization packet, taking into account path delay.

Is my understanding correct?

For ICSS, a detailed description of the time synchronization is described at the link below.

https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/11_01_00_17/exports/docs/api_guide_am243x/ICSS_TIMESYNC.html

For CPSW, is there a detailed description of the time synchronization?

2) To synchronize control timing, it is necessary to perform various processes at multiple different timings based on the local clock. I want to clarify how to synchronize with other internal modules and external modules.

For CPSW, three types of synchronization signals are available.

 - Time Stamp Compare (CPTS_COMP) output
 - Timestamp Sync (CPTS_SYNC) Output
 - Timestamp GENFn (CPTS_GENFn) Output

CPTS_COMP can be used as an output signal to internal modules via the compare event router (CMPEVT_INTRTR0), and CPTS_SYNC and CPTS_GENFn can be used as output signals to internal modules via the timesync event router (TIMESYNC_INTRTR0). Furthermore, CPTS_COMP and CPTS_SYNC can be used as output signals to external modules from an external pin.

CPTS_COMP can be used for interrupt generation to CPU cores and as trigger events for other internal modules via the compare event router (CMPEVT_INTRTR0). CPTS_SYNC and CPTS_GENFn can be used as trigger events for other internal modules via the timesync event router (TIMESYNC_INTRTR0).

Is my understanding correct?

Can CPTS_GENFn be used as an output signal to external modules from an external pin?

For ICSS, what are the synchronization signals based on the local clock (IEP timer)? Is there a detailed description?

3) To synchronize with more internal and external modules at different timings, the number of synchronization signals available in CPSW and ICSS is insufficient. I want to clarify that how to generate more varied timings based on the local clock.

Timer modules in MCU and MAIN domains can use CPSW0_CPTS_GENFn for functional clock. Therefore, it is possible to generate different timings using 16 timer modules.

The CPTS module in MAIN domain can use the same clock (CP_GEMAC_CPTS_RFT_CLK) as CPSW CPTS for the reference clock. The timestamp counter value can be adjusted and updated in the same way as in the CPSW CPTS. Therefore, it is possible to generate more varied timings, including the 1024 timers in the Timer Manager.

Is my understanding correct?

For ICSS, how can more varied timings be generated based on the local clock?

Best regards,

Daisuke

  • For CPSW, the CPTS timestamp inside CPSW is used as the local clock.
    For ICSS, the IEP timer inside ICSS is used as the local clock.
    The counter value of the local clock is adjusted and updated to value calculated by software based on the time obtained from the received time synchronization packet, taking into account path delay.

    Is my understanding correct?

    Correct. 

    For ICSS, a detailed description of the time synchronization is described at the link below.

    Refer this API guide https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/latest/exports/docs/api_guide_am243x/group__ENET__MOD__TIMESYNC.html

    This reference code will give an overview to program IEP counter, adjust and reading IEP.

    For ICSS, what are the synchronization signals based on the local clock (IEP timer)? Is there a detailed description?

    If you looking for 1PPS (PTP time scale), the you can probe the PRU_ICSSG0_PR1_EDC0_SYNC0_OUT_0 or you can route it to different pins using TIMESYNC_EVENT_ROUTER to probe the synchronization signals. For ex: 

    TIMESYNC_INTRTR0_IN_25 (PRU_ICSSG0_PR1_EDC0_SYNC0_OUT_0) -> TIMESYNC_EVENT_INTROUTER0_outl_24 ->
    PINFUNCTION_SYNC0_OUTout_SYNC0_OUT_IN_0

    For more details check: 10.3.2.2.1 TIMESYNC_INTRTR0 Integration in AM64/24x TRM.

    For ICSS, how can more varied timings be generated based on the local clock?

    Do you want to generate external pulse in different timings aligned to PTP clock?

    BR,
    JC

  • Hi JC-san,

    Thank you for your reply.

    Do you want to generate external pulse in different timings aligned to PTP clock?

    Yes. Our customer has not clearly specified what exactly they want to synchronize, but they need control based on multiple different timings aligned to PTP clock.

    For ICSS, the signals connected to other modules such as Time Sync Routers were described in "6.4.3 PRU_ICSSG Integration".

    As I stated in my original post, is it possible for CPTS in MAIN domain and various timer modules to synchronize with PTP clock?

    Best regard,

    Daisuke

  • Hi JC-san,

    I have an additional question.

    For ICSS, the signals connected to other modules such as Time Sync Routers were described in "6.4.3 PRU_ICSSG Integration".

    Besides PRU_ICSSG0_PR1_EDC0_SYNC0_OUT_0, what other signals are available for PTP?

    Best regard,

    Daisuke

  • Hi Daisuke-san,

    CPTS can time stamp the events like rising and falling edges of clocks, and we can use that data to sync the CPTS clock with the reference clock, and further also get the correction data required to adjust other clock sources available in the system. 

    Besides PRU_ICSSG0_PR1_EDC0_SYNC0_OUT_0, what other signals are available for PTP

    Regarding the available signals, are you referring to the signals available for PTP application to use? We have compare event also available from IEP module. Can you provide some more details on how you would like to use the signal? This will help us in identifying better registers to work with for your application.

    Regards,
    Teja.