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

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

COP and RTI Timer Programming Model

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

11.2.1.5 RTI Enable (RTIE)—Bit 10

The RTI enable (RTIE) control bit is used to enable interrupts from the real-time timer. When the RTIE bit is cleared, the interrupt is disabled and any pending RTI is cleared. The RTIE bit is cleared on hardware reset.

The interrupt vector for the RTI is $0016. As with all on-chip peripheral interrupts for the DSP56824, the status register (SR) must first be set to enable maskable interrupts (interrupts of level IPL 0). Next, the CH1 bit (bit 14) in the IPR must also be set to enable this interrupt. (See Section 3.3.1, “DSP56824 Interrupt Priority Register (IPR),” on page 3-14 for more information.) Finally, set the RTIE bit to enable the RTI.

11.2.1.6 RTI Flag (RTIF)—Bit 9

The RTI flag (RTIF), bit 9, is automatically set to one at the end of every RTI period—that is, when the RTI timer reaches zero. This read-only bit is cleared by writing a one to bit 9, RTIF, in the COPCTL register. The RTIF bit is cleared on hardware reset.

11.2.1.7 RTI Prescaler (RP)—Bit 8

The RTI prescaler (RP) control bit is used to program the prescaler for the RTI timer. Table 11-2 shows the different available selections. The RP bit is cleared on hardware reset.

Table 11-2. Real-Time Prescaler Definition

RP

Division

 

 

 

 

0

/1

 

 

1

/4

 

 

11.2.1.8 RTI/COP Divider (DV[7:0])—Bits 7–0

The RTI/COP divider (DV[7:0]) control bits are used to program the last divider in the RTI clock chain. When the COPCNT register decrements to zero, the 8 bits of this register are reloaded with the value in the DV[7:0] bits. To set the COPCNT register for division by n counts, load the DV bits with the value (n – 1). The DV bits are cleared on hardware reset.

NOTE:

Dividing by 1 (DV[7:0] = $0) is not allowed for this divider. All other divider values from 2 to 256 are allowed. Since the value of the DV[7:0] bits is $0 upon reset (an illegal value), this register must be written to before the real-time or COP timer is first used.

COP and RTI Module

11-5

For More Information On This Product,

Go to: www.freescale.com

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