Re: [uCsimm] For exact date

From: Vladimir A. Gurevich (vgurevic@cisco.com)
Date: Thu Mar 09 2000 - 02:38:15 EST


Hello Kwonsk,

"권석근" wrote:

> i tried to correct this and found that we could get exact time
> with some modification.
> instead of using default PLL divisor 506, i've set 500 (move 0x0922 to
> PLLFSR
> at ucsimm-head.S. sacrificed perfomance. 16.58MHz -> 16.38MHz).
> and changed timer setting (in config.c) like this
> TCTL = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_SYSCLK_16 | TCTL_TEN;
> TPRER = (256-1);
> TCMP = (40-1);
> this mightl generate exact 100 Hz timer interrupt.
> i've check this with "date" in an hour. and it showed exact time.

I believe it is better to use CLK32 signal, since it is more
accurate and is not subject to various PLL manipulations.

Currently, I program the timer like:

  /* Restart mode, Enable int, 32KHz, Enable timer */
  TCTL = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_32KHZ | TCTL_TEN;
  /* Set prescaler (Divide 32KHz by 32)*/
  TPRER = 31;
  /* Set compare register 32Khz / 32 / 10 = 100 */
  TCMP = 10;

If your research is correct, then setting TCMP to 9 instead of 10
will solve the problem and give us a stable timer.

Let me know what do you think about this,

Regards,
Vladimir

-- 
+------------------+------------------------+--------------------------+
                   |      |          |      |
                   |     :|:        :|:     | phone         408-525-9707
Vladimir Gurevich  |    :|||:      :|||:    | fax           408-527-1713
Software Engineer  | .:|||||||:..:|||||||:. |
    NUBU/DIAL      |      CiscoSystems      | e-mail  vgurevic@cisco.com
                   |                        | location SJ-7-2 Cube D1-12
                   |  http://www.cisco.com  |
+------------------+------------------------+--------------------------+
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST