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.

[参考译文] MSP430F149:计时器A0 ISR

Guru**** 2530320 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/635601/msp430f149-timer-a0-isr

部件号:MSP430F149

大家好,

我在计时器A0 ISR例行程序中遇到问题。

ISR例程中不能出现调试器。 使用以下指令无法清除中断标志。

ISR例程如下所示。

#pragma vector=TIMERA0_vector
__interrupt void TIMARA0_ISR (void)

TACTL0 = 0x0000;//CCIE |
TACTL0 &=~CCIFG;
TACTL0 |= CCIE;

返回;

}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    问题已解决。

    我没有清除计时器A0的中断标志,因此它不能从ISR例程中发出。

    最新例程

    #pragma vector=TIMERA0_vector
    __interrupt void TIMARA0_ISR (void)

    Tactl &=~TAIFG;
    TACTL0 = 0x0000; //CCIE |
    TACTL0 &=~CCIFG;
    TACTL0 |= CCIE;
    返回;
    }
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    感谢您的回答!

    此致,
    Ryan