English
Language : 

CP3BT23 Datasheet, PDF (186/260 Pages) Texas Instruments – CP3BT23 Reprogrammable Connectivity Processor with Bluetooth and Dual CAN Interfaces
25.3 TIMER INTERRUPTS
25.4 TIMER I/O FUNCTIONS
The Multi-Function Timer unit has four interrupt sources, The Multi-Function Timer unit uses two I/O pins, called TA
designated A, B, C, and D. Interrupt sources A, B, and C are and TB. The function of each pin depends on the timer op-
mapped into a single system interrupt called Timer Interrupt erating mode and the TAEN and TBEN enable bits. Table 71
1, while interrupt source D is mapped into a system interrupt shows the functions of the pins in each operating mode, and
called Timer Interrupt 2. Each of the four interrupt sources for each combination of enable bit settings.
has its own enable bit and pending bit. The enable bits are When the TA pin is configured to operate as a PWM output
named TAIEN, TBIEN, TCIEN, and TDIEN. The pending (TAEN = 1), the state of the pin is toggled on each underflow
bits are named TAPND, TBPND, TCPND, and TDPND.
of the TCNT1 counter. In this case, the initial value on the
Timer Interrupts 1 and 2 are system interrupts TA and TB pin is determined by the TAOUT bit. For example, to start
(IRQ14 and IRQ13), respectively.
with TA high, software must set the TAOUT bit before en-
Table 70 shows the events that trigger interrupts A, B, C, abling the timer clock. This option is available only when the
and D in each of the four operating modes. Note that some timer is configured to operate in Mode 1, 3, or 4 (in other
interrupt sources are not used in some operating modes. words, when TCRA is not used in Capture mode).
Table 70 Timer Interrupts Overview
Sys. Int.
Interrupt
Pending
Bit
Timer
te Int. 1
(TA Int.)
TAPND
TBPND
TCPND
Timer TDPND
le Int. 2
(TB Int.)
Mode 1
PWM + Counter
TCNT1 reload from
TCRA
TCNT1 reload from
TCRB
N/A
TCNT2 underflow
Mode 2
Mode 3
Dual Input Capture +
Counter
Dual Counter
Input capture on TA
transition
Input Capture on TB
transition
TCNT1 underflow
TCNT2 underflow
TCNT1 reload from
TCRA
N/A
N/A
TCNT2 reload from
TCRB
Mode 4
Single Capture +
Counter
TCNT1 reload from
TCRA
Input Capture on TB
transition
N/A
TCNT2 underflow
o I/O
TAEN
TBEN
s TA TAEN = 0
TBEN = X
TAEN = 1
b TBEN = X
TB TAEN = X
TBEN = 0
OTAEN = X
Table 71 Timer I/O Functions
Mode 1
Mode 2
Mode 3
PWM + Counter
Dual Input Capture +
counter
Dual Counter
No Output
Capture TCNT1 into
TCRA
Toggle Output on Capture TCNT1 into
Underflow of TCNT1 TCRA and Preset
TCNT1
Ext. Event or Pulse Capture TCNT1 into
Accumulate Input TCRB
Ext. Event or Pulse Capture TCNT1 into
No Output Toggle
Toggle Output on
Underflow of TCNT1
Ext. Event or Pulse
Accumulate Input
Ext. Event or Pulse
Mode 4
Single Capture +
counter
No Output Toggle
Toggle Output on
Underflow of TCNT1
Capture TCNT2 into
TCRB
Capture TCNT2 into
TBEN = 1
Accumulate Input TCRB and Preset
Accumulate Input
TCRB and Preset
TCNT1
TCNT2
185
www.national.com