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.

F29H850TU: EtherCAT - Share Clock with PHYs, recommendations and tradeoffs

Part Number: F29H850TU
Other Parts Discussed in Thread: DP83826I, F29H85X-SOM-EVM

Tool/software:

Hello dear experts,

I am starting a space constraint EtherCAT enabled design based on the F29H850TU (formidable beast, by the way).

I am planning on using a single 25MHz crystal and distributing the clocks to the 2 Ethernet PHYs (DP83826I in MII mode), mostly to avoid the space and cost of an additional clock buffer.
There seems to be multiple ways to achieve this.

From the F29H85X controlSOM Evaluation Board user's guide:


The same Clock source choice is highlighted in the F29H85x and F29P58x Real-Time Microcontrollers Technical Reference Manual

From the same section, the only warning about clocks is given:

[Quick note, I'm assuming:
 ESC_PHY_CLK
 ESCSS_PHY_CLK
 ECAT_PHY_CLK
are all designating the same signal with conflicting names]

Also, there could be another way: XCLKOUT.

Configuring XCLKOUT with 1:1 with a 25MHz crystal would give a buffered 25MHz out.

=====

Now the questions:

There is ONE ESC_PHY_CLK signal, is it possible to output it on two GPIOs at the same time to feed both PHYs? (GPIO48 & GPIO54)
Or is it better to output on only one pin and route to the input of both PHYs? (Like on the EVM, where GPIO54 is used for both)

Does using ESC_PHY_CLK offer any difference from using XCLKOUT for the same function?

How can we evaluate the drawbacks from using those instead of an external clock buffer?
Is the Jitter and Delay added by using ESC_PHY_CLK or XCLKOUT specified for the F29H850TU?

On one hand I am told "this pin is for that", on the other "but you better not use it"... just a bit confused.

Thanks!

  • Hello Jeorme,


    I have been looking at this, but I couldn't find the document which has the section
    2.4.5 EtherCAT PHY Clock Selection. 
    Can you please tell me which document are you referring.

    Regards,

    Keshav

  • Hello Keshav, 
    It's from:
    EVM User's Guide: F29H85X-SOM-EVM
    F29H85X controlSOM Evaluation Board
    SPRUJE4B – AUGUST 2024 – REVISED DECEMBER 2024
    www.ti.com/.../spruje4

  • I've found this forum post from 4 years ago:
    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1027021/tms320f28388d-ethercat-slave-controller-esc_phy_clk-output-switching-characteristics

    This question is relevant to:
    TMS320F28388
    TMS320F28P650
    TMS320F29H850
    And I have only found the "you should use an external buffer" answers, without justifications.

    If TI designed in the ESC_PHY_CLK signal, why is TI so reluctant to suggest its use?

  • Hi Jerome,

    The ECAT_PHY_CLK signal / feature is not fully characterized or specified in the datasheet. This is why we recommend external oscillator + clock buffer and use the circuit in our eval board designs to meet Beckhoff’s requirements (shared +/- 25 PPM clock source to 2x PHYs and ESC). You can still use and evaluate the feature, but we encourage designers to perform further validation that it works in all operating conditions of their systems.

    There is ONE ESC_PHY_CLK signal, is it possible to output it on two GPIOs at the same time to feed both PHYs? (GPIO48 & GPIO54)
    Or is it better to output on only one pin and route to the input of both PHYs? (Like on the EVM, where GPIO54 is used for both)

    It is possible, but this could introduce additional skew between the signals. Trace matching the clock signals to the 2 PHYs will also be important.


    Does using ESC_PHY_CLK offer any difference from using XCLKOUT for the same function?

    ESC_PHY_CLK is the clock entering the C2000 ESC module, so it would be the better one to use.

    How can we evaluate the drawbacks from using those instead of an external clock buffer?
    Is the Jitter and Delay added by using ESC_PHY_CLK or XCLKOUT specified for the F29H850TU?

    It's not currently specified as I mentioned. You could perform further testing / measurements of the clocks at the PHY input pins.

    Best,

    Kevin

  • Thanks Kevin,

    This answers my questions.

    If you agree, I would like to leave this question "open" for now, as we will perform measurements on the F29H85X-SOM-EVM and report back the results here.

    Thanks!

  • Hi Jerome,

    Yes, that's not problem and I'd be interested to hear your results.  I'll mention that the post may close on it's own after 30 days of non-activity, so it'd be good to bump it before then. If I see it becomes closed I'll re-open it.

    I know of other customers having success using ESC_PHY_CLK on other C2000 devices. If I have more data to share with you later I will let you know too.

    By the way, the shared +/-25 ppm clock requirements come from Beckhoff (designers of EtherCAT) reference doc below.

    https://download.beckhoff.com/download/Document/io/ethercat-development-products/an_phy_selection_guidev3.0.pdf

    Best,

    Kevin

  • Hello Kevin,

    I have concluded my testings.

    My experiment is to compare the jitter on the ESC_PHY_CLK signal to the Buffered Clock signal on the F29H85X-SOM-EVM.

    As a first step, I had to establish the clock source (the external oscillator) is stable, else it could propagate and induce false conclusions later.

    I used a small GPS module with a 1 pulse-per-second to provide a precise clock source, connect it to GPIO77 and used an ECAP to continually measure the period of the pulse. Basically, it counts for 200M clock pulse, self reset and continue.

    Having a min/max average, I was able to have this:

    minimum: 199998564
    maximum: 199998607
    average: 199998578
    Number of pulses: 6065

    So, over 101 minutes, I had a static offset of 200e6-199998578= 1422 pulses per second.
    1422/200e6 = 7.2ppm.

    The frequency spread is 199998607-199998564= 43
    43/200e6=0.2ppm

    I concluded that the clock is precise and with very minimal spead.

    ==

    Second part of the experiment is to compare clocks:


    ESC_CLK_PHY (Again, why is it names ETHERCATPHYCLK here?) is activated on GPIO54, probed on R31
    Buffered Out is probed on R32
    XCLKOUT is activated on GPIO219, probed on R44.
    Note my test made XCLKOUT go to 200MHz, above the 50MHz maximum from the datasheet. It did work, well enough for this test. Of course signal was clipped and sinusoidal instead of a perfect square wave.

    I probed the three signals with a scope, with infinite persistence, triggered on the Clock Buffered output.
    Let it run for a while.

    Blue = ESC_PHY_CLK
    Yellow = Clock Buffered Output
    Green = XCLKOUT on PLLSYSCLK

    The real goal is ton compare the Bufferd Out to the ESC_PHY_CLK. As the former is the source and the later is going trough some transformations. Any anomalies on ESC_PHY_CLK would have been introduced by those transformations.

    This screenshot is after 30 minutes. I also ran it to 4 hours with the same result, but lost the screenshot. Note my green probe is a bit wacky and banging the table made the measure jumps in amplitude, and note that at those frequency, probing techniques are super important and I neglected most of them, resulting in less-than-perfect square waves. I also suspect some crosstalk between my probes. Please don't judge ;).

    What does this screenshot tells me?

    - The PLLSYSCLK is very jitter-stable. I am not expecting it to "skip beats" of any sort. Blue rise/fall is not moving around.
    - ESC_PHY_CLK is almost perfectly in phase with the Clock Buffer. PLL and other dividers introduces little delay.
    - There is no observable jitter on ESC_PHY_CLK. The blue line "persistence smear" during the rise and fall is minimal.

    Beckhoff calls for three criterion to make a clock suitable for EtherCAT PHYs in "Application note – PHY selection guide" V3.0:
     - ESC and PHY shall share the same clock source
     - ESC and PHY may have a phase shift difference in the clock, but that phase shift shall stay constant
     - ESC and PHY clock shall have no greater than 25ppm error at room temperature. 




    ==

    This experiment allow me to conclude that the ESC_PHY_CLK outputs are stable and precise. The diagram clearly shows the clock is a branch from PLLCLK shared directly between the ESC module and the ESC_PHY_CLK outputs.

    There seems to be no weird jitter injected from passing trough a PLL-ized clock.

    We also did run the EtherCAT loopback exemple with the ESC_PHY_CLK as a shared source with success.

    Kevins' previous comment "I know of other customers having success using ESC_PHY_CLK on other C2000 devices" confirms that I'm not a lunatic.

    With all this, I will press on and use the ESC_PHY_CLK as a PHY clock source in our upcoming design, and I urge TI to soften the wording on the documentation, and maybe even ditch the clock buffer on future SOMs.... or provide more guidance if any concerns remains.

    Thanks!