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.

TM4C1294NCPDT: PTP PPS question

Part Number: TM4C1294NCPDT

Here's a note from the data sheet, about the EMAC clock (used in 1588 PTP).  It explains that the PPS interrupt from the EMAC isn't uniform, when the EMAC is in digital rollover mode.  Is there an explanation, or it just the way it is?

/****************** Begin note ***************************/

"In the digital rollover mode, the EN0PPS signal frequency is an average number. The actual clock is of different frequency that gets synchronized every second. For example:

When PPSCTRL =0x1, EN0PPS (1 Hz) has a low period of 537 ms and a high period of 463 ms.

When PPSCTRL = 0x2, EN0PPS (2 Hz) is a sequence of:

■ One clock of 50 percent duty cycle and 537 ms period

■ Second clock of 463 ms period (268 ms low and 195 ms high)

When PPSCTRL = 0x3, EN0PPS (4 Hz) is a sequence of:

■ Three clocks of 50 percent duty cycle and 268 ms period

■ Fourth clock of 195 ms period (134 ms low and 61 ms high)

This signaling behavior is because of the non-linear toggling of bits in the digital rollover mode in the Ethernet MAC System Time - Nanoseconds (EMACTIMNANO) register.

/****************** Begin note ***************************/

First - can anyone explain this?  I mean, not just repeat the caution, but actually explain how the register behavior leads to this effect.  It seems odd.

I'll use binary or command mode, but it would still be nice to understand.

  • Hi Robert,
    I have to say I don't have the expertise to the intricacy of the digital rollover that can lead to some kind of inaccuracy. Each increment in the EMACTIMNANO has the granularity of 1ns. However, the source clock to the PHY is the 25MHz OSC which is 40ns. Therefore, perhaps some averaging algorithm is needed in order to provide the timestamp in the ns range. One thing I can say is that the Ethernet module is compliant to IEEE 1588 protocol and it passes the UNH Ethernet compliance testing.

    I will welcome the forum community members who have the knowledge in this regard to shed some lights here. Thanks.
  • Charles:

    I appreciate your reply. Sure, I realize that it's integer math, and there will always be rounding/mod results, but I'm surprised that a 4Hz pulse would be 268ms,268ms,268ms,195ms. That's of no value for any use I have for a 4Hz pulse, which would be to sample a sensor on a regular basis. I can work around this, but I'm still curious.

    regards,

    Bob Cram
  • Hi Robert,
    Are you wanting to use the EN0PPS signal as in PPS output frequency control mode or PPS command mode? Reading the datasheet it looks like only when it is in PPS command mode will you see varied duty cycles on the EN0PPS? Are you trying to send out the EN0PPS to another sensor? What type of sensor is it? Looks like the sensor will take sample on every tick of the EN0PPS, is this correct? While I don't have an answer for you question, I myself is asking quite some questions to you.
  • Charles:

    Thanks, yes, I'm going to go back into the datasheet and read up more on the differences between the modes.  Yes, our goal is to trigger sensors - let's say an ADC - on every tick.  I'll need to get a scope out and experiment.  I'm going to mark this thread as answered.

    - Bob