AnsweredAssumed Answered

whether roll-over time need to consider in the Global timer base count value?

Question asked by Karunakaran Radhakrishnan on Aug 6, 2015
Latest reply on Aug 14, 2015 by Karunakaran Radhakrishnan

We are using T2080 based processor board. processor are operating by the below mention frequency.

 

System Clock is 100Mhz

Platform Clock is 500Mhz

MPIC Clock is 250Mhz

Global Timer is 31.25Mhz (MPIC is the clock source for timer, Prescaler is 1/8).

 

  Time Count for 1sec = 31250000 (decimal)

  Time Count for 1msec = 31250 (decimal)

 

I am setting  the 31250 (decimal) value in Global timer base count register (MPIC_GTBCRAn) to configure 1 mili sec timeout and roll-over condition is configured as "GTCCRxn is reloaded with the GTBCRxn value" in the MPIC_TCRn.

 

Global Timer is running for 3min by the external timer and check the interrupt count. the expected counts is 180000 tolerance may be +/- 1. but only 179994 interrupt counts occurred. Six interrupt counts is missing  i.e 6 msec drift is there with that 1msec count value running fro 3 min.

 

After i changed the base count value from 31250 to 31249 (consider the roll-over time), with this one count less we got the expected 180000 interrupt counts.

 

(Note: external timer already verified with scope.)

 

whether roll-over time need to consider in the Global timer base count value?

 

or

 

How to manage the clock drift?

Outcomes