This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F1611: Changing timer_a source does not work

Part Number: MSP430F1611

I am using Timer_A in compare mode to generate PWM output on my MSP430f1xx. During Osc failure, I am changing Timer_A source from SMCLK to ACLK (XTS=1).

ACLK now runs on the same frequency as SMCLK did, and all the Timer registers look ok. But the PWM output frequency is now random (which i assume is because Timer_A is not running on ACLK as intended).

Here is my NMI routine,

#pragma vector=NMI_VECTOR
__interrupt void nmi_ (void)
{
if (OFIFG) {
configure_lfxt1();      // Ok
IFG1 &= ~NMIIFG;
IFG1 &= ~OFIFG;
IE1 |= NMIIE;

TACTL &= ~(MC0 | MC1);
TACTL &= ~TASSEL_2;
TACTL  |= TASSEL_1;
__delay_cycles(200);
TACTL |= MC_1;
}

Any pointers would be appreciated. Thanks,

**Attention** This is a public forum