Timer_A Operation
15-11
Timer_A
15.2.4 Capture/Compare Blocks
Three or five identical capture/compare blocks, TACCRx, are present in
Timer_A. Any of the blocks may be used to capture the timer data, or to
generate time intervals.
Capture Mode
The capture mode is selected when CAP = 1. Capture mode is used to record
time events. It can be used for speed computations or time measurements.
The capture inputs CCIxA and CCIxB are connected to external pins or internal
signals and are selected with the CCISx bits. The CMx bits select the capture
edge of the input signal as rising, falling, or both. A capture occurs on the
selected edge of the input signal. If a capture occurs:
-
The timer value is copied into the TACCRx register
-
The interrupt flag CCIFG is set
The input signal level can be read at any time via the CCI bit. MSP430x4xx
family devices may have different signals connected to CCIxA and CCIxB. See
the device-specific data sheet for the connections of these signals.
The capture signal can be asynchronous to the timer clock and cause a race
condition. Setting the SCS bit will synchronize the capture with the next timer
clock. Setting the SCS bit to synchronize the capture signal with the timer clock
is recommended. This is illustrated in Figure 15−10.
Figure 15−10. Capture Signal (SCS=1)
n−2
n−1
Timer Clock
Timer
Set TACCRx CCIFG
n+1
n+3
n+4
CCI
Capture
n+2
n
Overflow logic is provided in each capture/compare register to indicate if a
second capture was performed before the value from the first capture was
read. Bit COV is set when this occurs as shown in Figure 15−11. COV must
be reset with software.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...