AnsweredAssumed Answered

1588: FIPER calculation

Question asked by Claudy Cavallari on Sep 28, 2018
Latest reply on Oct 8, 2018 by Serguei Podiatchev

 I would like to calculate the FIPER counter initial value for 1588 purpose to get the proper pulse period at the output. Equation in DPAA Resource Manual  specification DPAA is

FIPER_VALUE = (prescale_value × tclk_per × N) – 1, or

TMR_FIPERn = (TMR_PRSC × TMR_CTRL[TCLK_PERIOD] × N)- 1

in the AN3423 the equation is :

Value of FIPER = (prescale_value × tclk_per × N) – tclk_per

Which is the good one?

   ex: TCLK_PERIOD is 10 ns, the nominal frequency at the counter input is 100 MHz

I saw that in a NXP presentation that the pulse duration is equal to a period of GCLK (nominal clock / prescale). So increasing the prescale value allows to enlarge the pulse width...

Timing diagrams are missing in the NXP 1588 related documents.

 

So when the prescale value is 1 (GCLK = 100 MHz), If N = 6, I would get 10 ns pulse every 60 ns and FIPER = 59.

59 = (1 x 10 x 6) - 1

   Can someone confirm?

 

If the prescale value = 2 , then GCLK = 50 MHz, my pulse will be 20 ns wide but the TCLK_PERIOD is still 10, so the FIPER counter decrements by 10 at nominal clock tick. How to set the FIPER value is I want a 20 ns pulse every 60ns?

It is said in the DPAA RM that:

It reloads the down counter in the cycle following a pulse.

So if N = 3, FIPER will be (2 x 10 x 3) - 1 = 59 but the counter will receive 6 pulse from 59 to 9 (decrements by TCLK_PPERIOD), the a 20 ns pulse will appears and same pattern will happen. But in this case the pulse period is no more 60 ns but 80 ns. If N= 2 then pulse period is 50ns.

   Can someone confirm? my goal was 60ns!  Am I wrong or is there a missing information?

   The example is with small number, my final goal is 1s but it is easier to draw timing with small number of period.

 

Is it sure that when the PRESC is different from 1, the steps of FIPER counter are only function of TCLK_PERIOD? Isn't PRESC involved in the FIPER step? What is the real equation involving the expected pulse period?

 

Thank you for your help

Outcomes