Other Parts Discussed in Thread: AM3358
I'm planning to create synchronized system using PTP and IEP clock.
So, I want to know the exact frequency ratio between PTP hardware timestamp and IEP clock.
According to Figure 8-10. Core PLL of AM335x Technical Reference Manual (spruh73m.pdf):
PTP hardware timestamp is created from CORE_CLKOUTM5,
IEP clock is created from CORE_CLKOUTM4.
I observed the accumulation of difference between:
- IEP clock x 5 and clock_gettime(CLOCK_REALTIME)
- more than 300 msec difference after 9000 secs observation, 34 usec / sec.
- This difference is caused by the MPU Subsystem PLL. ARM-A8 core frequency is created from CORE_CLKOUTM6 via PLL.
- IEP clock x 5 and PTP hardware timestamp
- less than 10 usec difference during 9000 secs observation.
- Nano sec value of PTP hardware timestamp is always multiple of 4. (increased by 4 at each 250MHz clock)
- frequency ratio between CORE_CLKOUTM4(200MHz) and CORE_CLKOUTM5(250MHz) seems exactly 4:5.
If the ratio between IEP clock and PTP hardware timestamp is exactly the simple integer,
it is easy to mapping the 2 clock domains.
Please let me know the actual implementation.