Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
34
Добавлен:
27.04.2015
Размер:
1.98 Mб
Скачать

Timers

the count register when the timer is enabled, the overflow interrupt occurs after n + 1 input events. After reaching zero, the count register is reloaded with the contents of the preload register. The count register is loaded with a direct value when a direct write to the count register is executed.

The TCT register may also be read or written by a user program. When writing to the TCT register with the corresponding timer disabled, the value is immediately written to the count register and is not overwritten by the value stored in the preload register when the timer is enabled (its TE bit is set). The value stored or written in the preload register is loaded into the count register on the next event after it reaches zero, unless another write to the count register is performed in the meantime. Refer to Section 9.6, “Timer Module Timing Diagrams,” for more details.

NOTE:

The count register can only be written when the corresponding timer is disabled (the TE bit is cleared) in the timer’s control register.

The count register may be read only if one of the following conditions is true:

The phase lock loop (PLL) is enabled (the PLL enable [PLLE] bit in the PLL Control Register 1 [PCR1] is set) and the prescaler clock is no more than half of the frequency of the Phi clock (that is, the frequency of the prescaler clock is not the same as the frequency of the Phi clock).

The PLL is bypassed (the PLLE bit in the PCR1 is cleared) and the prescaler within the PLL is set to divide by 1 (the PS[2:0] bits in the PCR1 equal 000).

The timer with the desired count register is disabled (the TE bit in the appropriate timer’s control register is cleared).

See Section 10.2.1, “PLL Control Register 1 (PCR1),” on page 10-5 for information on the PCR1.

9.2 Timer Resolution

Table 9-6 shows the range of timer interrupt rates (overflow interrupt using the Phi clock) that are provided by the timer count register (TCR2–TCT0) and the timer preload register (TPR2–TCT0).

Table 9-6. Timer Range and Resolution

Input Clock Period

Timer Resolution

Timer Range

Two Cascaded

(Preload = 0)

(Preload = 216 – 1)

Timer Range

 

 

 

 

 

 

 

 

 

Phi clock = 14.29 ns

57.14 ns

3.74 ms

245 s

(70 MHz)

 

 

(approx. 4 minutes)

 

 

 

 

Phi clock = 25 ns

100 ns

6.55 ms

429 s

(40 MHz)

 

 

(approx. 7 minutes)

 

 

 

 

Phi clock = 50 ns

200 ns

13.1 ms

859 s

(20 MHz)

 

 

(approx. 14 minutes)

 

 

 

 

Phi clock = 100 ns

400 ns

26.2 ms

1718 s

(10 MHz)

 

 

(approx. 28 minutes)

 

 

 

 

Prescaler clock = 31 s

31.25 s

2.0 s

134,218 s

(32.00 kHz)

 

 

(approx. 37 hours)

 

 

 

 

The value stored in the TPR is the preload count. The overflow interrupt occurs every time the input clock provides a quantity of cycles equal to the preload count + 1.

9-8

DSP56824 User’s Manual

 

Соседние файлы в папке DSP568xx