Скачиваний:
33
Добавлен:
27.04.2015
Размер:
4.9 Mб
Скачать

Interrupts

12.9.8 Timer Channel Counter Register (CNTR)

These read/write registers are counters. There are four Timer Channel Counter Registers in this occurrence. Their addresses are:

TMRA0_CNTR (Timer A, Channel 0 Counter)—Address: TMRA_BASE + $5

TMRA1_CNTR (Timer A, Channel 1 Counter)—Address: TMRA_BASE + $D

TMRA2_CNTR (Timer A, Channel 2 Counter)—Address: TMRA_BASE + $15

TMRA3_CNTR (Timer A, Channel 3 Counter)—Address: TMRA_BASE + $1D

Base + $5. $D,

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

$15, $1D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read

 

 

 

 

 

 

 

COUNTER

 

 

 

 

 

 

 

Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reset

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 12-11. TMR Counter Register (CNTR)

See Programmer’s Sheet on Appendix page B-75

12.10 Resets

The TMR module can only be reset by the RST signal. This forces all registers to their reset state and clears the OFLAG signal if it is asserted. The counter will be turned off until the settings in the Control register are changed.

12.11 Interrupts

The TMR module can generate 12 interrupts, three for each of the four counters/channels.

12.11.1 Timer Compare Interrupts

These interrupts are generated when a successful compare occurs between a counter and it’s compare registers while the Timer Compare Flag Interrupt Enable (TCFIE) is set in the TMR_SCR. These interrupts are cleared by writing 0 to the TCF bit in the appropriate TMR_SCR.

12.11.2 Timer Overflow Interrupts

These interrupts are generated when a counter rolls over its maximum value while the TCFIE bit is set in the TMR_SCR. These interrupts are cleared by writing 0 to the Timer Overflow Flag (TOF) bit of the appropriate TMR_SCR.

 

Quad Timer (TMR), Rev. 4

Freescale Semiconductor

12-19

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Interrupts

12.11.3 Timer Input Edge Interrupts

These interrupts are generated by a transition of the input signal (either positive or negative depending on IPS setting) while the Input Edge Flag Interrupt Enable (IEFIE) bit is set in the TMR_SCR. These interrupts are cleared by writing 0 to the IEF bit of the appropriate TMR_SCR.

 

56852 Digital Signal Controller User Manual, Rev. 4

12-20

Freescale Semiconductor

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

Chapter 13

General Purpose Input/Output (GPIO)

 

General Purpose Input/Output (GPIO), Rev. 4

Freescale Semiconductor

13-1

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

Commission, BGA

prior to September

order from the United States International Trade Freescale for import or sale in the United States

of an from

Because

available

 

-packaged product lines and part numbers indicated here currently are not

2010: MC13892

 

 

Commission, BGA

prior to September

 

order from the United States International Trade Freescale for import or sale in the United States

 

of an from

 

Because

available

 

56852 Digital Signal Controller User Manual, Rev. 4

13-2

Freescale Semiconductor

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