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.

为什么捕获模式下读到的TA0CCR0老是0

Other Parts Discussed in Thread: MSP430F5310

 TA0CTL = MC__STOP;
 TA0CCTL0 &= ~(CCIE | COV | CCIFG);
 TA0CCTL0 = CM_2/*下降沿捕获*/ | SCS | CAP | CCIE;

TA0CTL = TASSEL__SMCLK | ID__4 | MC__UP | TACLR;

 

然后,进入中段

#pragma vector = TIMER0_A0_VECTOR
__interrupt void INT_TA0_CCIFG0(void)
{

//得到TA0CCR0的值,但老是0,不管什么时候来下降沿,都是0

P1OUT ^= BIT6;

P1.6上能量到电平变化

芯片是:MSP430F5310