Thanks to Tim et al, I've got the CCR working... but the timer itself doesn't function correctly. Is there a known issue with the timer in this part not actually working? I can't get it to count past approximately 0x7FE0 (and I've tried two chips, one DIP, one TSSOP).
Very simple init code:
int main(void) { BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ;
P1SEL=0x04; P1DIR=0x05;
TACCTL1=OUTMOD_A4; TACCR0=0xFFFF; TACCR1=0x1000; TACTL=TASSEL_2 | ID_0 | MC_2 | TAIE | TACLR;
_EINT();
while(1) { if (TAR & 0x8000u) P1OUT |=1; else P1OUT &=~1; } }
On P1.2 I see a _32ms_ period square wave, indicating that the timer is only counting about 32K counts. P1OUT never changes state.
If I change the if statement to if (TAR & 0x4000u) I see a square wave on P1OUT. So the timer is running, and the capture/compare is working as expected.
I tried changing from continuous mode (MC_2) to up mode (MC_1), and tinkering with TACCTL0. It works as expected while TACCTL0