Part Number: MSP430FR2476
Tool/software: Code Composer Studio
When I try to set TimerA to UP mode, it sets it to UP/DOWN. MC_UP is defined as the constant 0x0010 but it ORs in 0x0030. This can be seen by single stepping this code:
//****************************************************************************
// Initialize TimerA
//****************************************************************************
void initTimer_A(void)
{
// Timer0_A is configured for continuous mode, count up.
// Overflows and interrupts when reaches CCR0.
// CCR0 = 8000 for 8 MHz SMCLK to give 1 ms interrupts.
TA0CCTL0 |= CCIE; // TACCR0 interrupt enabled
TA0CCR0 = INTERRUPT_COUNT_MAX; // Divide 8 MHz by 8000
TA0CTL = 0;
TA0CTL |= TASSEL__SMCLK | MC__CONTINUOUS; // SMCLK, continuous mode
TA0CTL |= MC__UP; // Compiler bug really sets it to up/down
TA0CTL = 0x211; // Correct it from 0x231 to 0x211
__bis_SR_register(LPM0_bits | GIE); // Enter LPM0 w/ interrupts
}