What is the function of CPTS?
What is the difference between CP_GEMAC_CPTS0 and CPTS0?
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.
What is the function of CPTS?
What is the difference between CP_GEMAC_CPTS0 and CPTS0?
Hello Jianwu,
Note that you can find information about CPTS in the AM64x Technical Reference Manual (TRM) Chapter Time Sync > Time Sync Module (CPTS)
CPTS is essentially a counter with a bunch of fancy features. You can send different output signals with TS_SYNC, TS_GENF, and TS_COMP. You can receive input triggers with HWn_PUSH. There are multiple instances of CPTS in AM64x: as per the TRM chapter, there is one in PCIE0, One in CPSW0 (that is CP_GEMAC_CPTS0 in the datasheet), and one in the main domain.
So why does this fancy counter matter?
The CPSW uses CPTS to keep track of timing for Ethernet communication. You can find more information about how the Linux driver uses it here:
3.3.2.5. CPSW2g Ethernet — Processor SDK AM64X Documentation
And the other CPTS instances can be used to synchronize counters throughout your AM64x (and even to synchronize timing with devices outside of the AM64x) by using the Time Sync Router. You can find more information about all the places you can route time sync signals in AM64x TRM chapter Time Sync > Time Sync and Compare Events. CPTS was even used for time sync on devices that did not even have a Time Sync Router. You can see examples of how that was done on AM335x and AM57x here: 4.3. PTP — Processor SDK Linux Documentation
Regards,
Nick