For what it's worth -
I just learned that if the Timer is in UP mode, the following output modes have a surprising little characteristic:
toggle/reset (2)
set/reset (3)
toggle/set (6)
reset/set (7)
Instead of the secondary action (after the "/") occurring when the counter reaches the CCR0 value, the action occurs when the counter wraps back to zero. It's one clock tick later than I would have expected. Also many PWM threads on this forum have it wrong, too.
In other words, the following configuration generates ACLK / 2, even though it may appear to set and reset the output at the same time:
TA0CCTL1 = OUTMOD_3; // set/reset mode
TA0CCR1 = 1; // set OUT when TA0 counts to 1 (0->1)
TA0CCR0 = 1; // reset OUT when TA0 wraps back to 0 (1->0)
TA0CTL = TASSEL__ACLK | MC__UP | TACLR;
In the User's Guides, the summary description in "Table X-Y, Output Modes" does not describe this nuance. However, text in the "Output Example" for Up Mode describes the true behavior.
In most cases, any "error" is tiny because 1 little count hardly affects the PWM duty cycle at all. But in other applications, this potential error matters. For what it's worth.
Jeff