SLAU144K December 2004 – August 2022 MSP430AFE221 , MSP430AFE222 , MSP430AFE223 , MSP430AFE231 , MSP430AFE232 , MSP430AFE233 , MSP430AFE251 , MSP430AFE252 , MSP430AFE253 , MSP430F2001 , MSP430F2002 , MSP430F2003 , MSP430F2011 , MSP430F2012 , MSP430F2013 , MSP430F2101 , MSP430F2111 , MSP430F2112 , MSP430F2121 , MSP430F2122 , MSP430F2131 , MSP430F2132 , MSP430F2132-EP , MSP430F2232 , MSP430F2234 , MSP430F2252 , MSP430F2252-Q1 , MSP430F2254 , MSP430F2272 , MSP430F2272-Q1 , MSP430F2274 , MSP430F2274-EP , MSP430F233 , MSP430F2330 , MSP430F235 , MSP430F2350 , MSP430F2370 , MSP430F2410 , MSP430F2416 , MSP430F2417 , MSP430F2418 , MSP430F2419 , MSP430F247 , MSP430F2471 , MSP430F248 , MSP430F2481 , MSP430F249 , MSP430F2491 , MSP430F2616 , MSP430F2617 , MSP430F2618 , MSP430F2619 , MSP430G2001 , MSP430G2101 , MSP430G2102 , MSP430G2111 , MSP430G2112 , MSP430G2121 , MSP430G2131 , MSP430G2132 , MSP430G2152 , MSP430G2153 , MSP430G2201 , MSP430G2201-Q1 , MSP430G2202 , MSP430G2203 , MSP430G2210 , MSP430G2211 , MSP430G2212 , MSP430G2213 , MSP430G2221 , MSP430G2230 , MSP430G2231 , MSP430G2231-Q1 , MSP430G2232 , MSP430G2233 , MSP430G2252 , MSP430G2253 , MSP430G2302 , MSP430G2303 , MSP430G2312 , MSP430G2313 , MSP430G2332 , MSP430G2333 , MSP430G2352 , MSP430G2353 , MSP430G2402 , MSP430G2403 , MSP430G2412 , MSP430G2413 , MSP430G2432 , MSP430G2433 , MSP430G2444 , MSP430G2452 , MSP430G2453 , MSP430G2513 , MSP430G2533 , MSP430G2544 , MSP430G2553 , MSP430G2744 , MSP430G2755 , MSP430G2855 , MSP430G2955 , MSP430TCH5E
Table 12-3 lists the memory-mapped registers for the Timer_A.
Address | Acronym | Register Name | Type | Reset | Section |
---|---|---|---|---|---|
160h | TACTL | Timer_A control | Read/write | 00h with POR | Section 12.4.1 |
170h | TAR | Timer_A counter | Read/write | 00h with POR | Section 12.4.2 |
162h | TACCTL0 | Timer_A capture/compare control 0 | Read/write | 00h with POR | Section 12.4.3 |
172h | TACCR0 | Timer_A capture/compare 0 | Read/write | 00h with POR | Section 12.4.4 |
164h | TACCTL1 | Timer_A capture/compare control 1 | Read/write | 00h with POR | Section 12.4.3 |
174h | TACCR1 | Timer_A capture/compare 1 | Read/write | 00h with POR | Section 12.4.4 |
166h | TACCTL2#SLAU144TA1573 | Timer_A capture/compare control 2 | Read/write | 00h with POR | Section 12.4.3 |
176h | TACCR2#SLAU144TA1573 | Timer_A capture/compare 2 | Read/write | 00h with POR | Section 12.4.4 |
12Eh | TAIV | Timer_A interrupt vector | Read | 00h with POR | Section 12.4.5 |
Timer_A Control Register
TACTL is shown in Figure 12-16 and described in Table 12-4.
Return to Table 12-3.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
Unused | TASSELx | ||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
IDx | MCx | Unused | TACLR | TAIE | TAIFG | ||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-10 | Unused | R/W | 0h | Unused |
9-8 | TASSELx | R/W | 0h | Timer_A clock source select 00b = TACLK 01b = ACLK 10b = SMCLK 11b = INCLK (INCLK is device-specific and is often assigned to the inverted TBCLK) (see the device-specific data sheet) |
7-6 | IDx | R/W | 0h | Input divider. These bits select the divider for the input clock. 00b = /1 01b = /2 10b = /4 11b = /8 |
5-4 | MCx | R/W | 0h | Mode control. Set MCx = 00b when Timer_A is not in use to conserve power. 00b = Stop mode: the timer is halted. 01b = Up mode: the timer counts up to TACCR0. 10b = Continuous mode: the timer counts up to 0FFFFh. 11b = Up/down mode: the timer counts up to TACCR0 then down to 0000h. |
3 | Unused | R/W | 0h | Unused |
2 | TACLR | R/W | 0h | Timer_A clear. Setting this bit resets TAR, the clock divider, and the count direction. The TACLR bit is automatically reset and always reads as zero. |
1 | TAIE | R/W | 0h | Timer_A interrupt enable. This bit enables the TAIFG interrupt request. 0b = Interrupt disabled 1b = Interrupt enabled |
0 | TAIFG | R/W | 0h | Timer_A interrupt flag 0b = No interrupt pending 1b = Interrupt pending |
Timer_A Counter Register
TAR is shown in Figure 12-17 and described in Table 12-5.
Return to Table 12-3.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
TARx | |||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
TARx | |||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | TARx | R/W | 0h | Timer_A register. The TAR register is the count of Timer_A. |
Timer_A Capture/Compare Control x Register
TACCTLx is shown in Figure 12-18 and described in Table 12-6.
Return to Table 12-3.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
CMx | CCISx | SCS | SCCI | Unused | CAP | ||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | r | r-0 | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
OUTMODx | CCIE | CCI | OUT | COV | CCIFG | ||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | r | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-14 | CMx | R/W | 0h | Capture mode 00b = No capture 01b = Capture on rising edge 10b = Capture on falling edge 11b = Capture on both rising and falling edges |
13-12 | CCISx | R/W | 0h | Capture/compare input select. These bits select the TACCRx input signal. See the device-specific data sheet for specific signal connections. 00b = CCIxA 01b = CCIxB 10b = GND 11b = VCC |
11 | SCS | R/W | 0h | Synchronize capture source. This bit is used to synchronize the capture input signal with the timer clock. 0b = Asynchronous capture 1b = Synchronous capture |
10 | SCCI | R | 0h | Synchronized capture/compare input. The selected CCI input signal is latched with the EQUx signal and can be read via this bit |
9 | Unused | R | 0h | Read only. Always reads as 0. |
8 | CAP | R/W | 0h | Capture mode 0b = Compare mode 1b = Capture mode |
7-5 | OUTMODx | R/W | 0h | Output mode. Modes 2, 3, 6, and 7 are not useful for TACCR0, because EQUx = EQU0. 000b = OUT bit value 001b = Set 010b = Toggle/reset 011b = Set/reset 100b = Toggle 101b = Reset 110b = Toggle/set 111b = Reset/set |
4 | CCIE | R/W | 0h | Capture/compare interrupt enable. This bit enables the interrupt request of the corresponding CCIFG flag. 0b = Interrupt disabled 1b = Interrupt enabled |
3 | CCI | R | 0h | Capture/compare input. The selected input signal can be read by this bit. |
2 | OUT | R/W | 0h | Output. For output mode 0, this bit directly controls the state of the output. 0b = Output low 1b = Output high |
1 | COV | R/W | 0h | Capture overflow. This bit indicates a capture overflow occurred. COV must be reset with software. 0b = No capture overflow occurred 1b = Capture overflow occurred |
0 | CCIFG | R/W | 0h | Capture/compare interrupt flag 0b = No interrupt pending 1b = Interrupt pending |
Timer_A Capture/Compare x Register
TACCRx is shown in Figure 12-19 and described in Table 12-7.
Return to Table 12-3.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
TACCRx | |||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
TACCRx | |||||||
rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) | rw-(0) |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | TACCRx | R/W | 0h | Timer_A capture/compare register. Compare mode: TACCRx holds the data for the comparison to the timer value in the Timer_A Register, TAR. Capture mode: The Timer_A Register, TAR, is copied into the TACCRx register when a capture is performed. |
Timer_A interrupt vector
TAIV is shown in Figure 12-20 and described in Table 12-8.
Return to Table 12-3.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
TAIVx | |||||||
r-0 | r-0 | r-0 | r-0 | r-0 | r-0 | r-0 | r-0 |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
TAIVx | |||||||
r-0 | r-0 | r-0 | r-0 | r-(0) | r-(0) | r-(0) | r-0 |
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
15-0 | TAIVx | R | 0h | Timer_A interrupt vector value. See Table 12-9 for values. |
TAIV Contents | Interrupt Source | Interrupt Flag | Interrupt Priority |
---|---|---|---|
00h | No interrupt pending | – | |
02h | Capture/compare 1 | TACCR1 CCIFG | Highest |
04h | Capture/compare 2#SLAU144TA5255 | TACCR2 CCIFG | |
06h | Reserved | – | |
08h | Reserved | – | |
0Ah | Timer overflow | TAIFG | |
0Ch | Reserved | – | |
0Eh | Reserved | – | Lowest |