CCP capture problem void Init_Ta0(void){ P11DIR |= BIT0 + BIT1 + BIT2; // ACLK, MCLK, sMCLK output direction P11SEL |= BIT0 + BIT1 + BIT2; P1DIR |= BIT0; P2DIR &= ~BIT1; P2SEL |= BIT1; //Configure the second function of the input pin ccr0 capture TA0CCTL0 &=~(CCIS0+CCIS1); //CCIXA capture TA0CCTL0 |= CM_3 + SCS + CAP; //Capture on both the rising and falling edges, synchronize signal capture, capture mode TA0CTL = TASSEL_2; //SMCLK, //TA0CTL |= ID_3; //Input signal division TA0CTL |= MC_2; //Timer starts counting (continuous counting mode 0~0xFFFF) TA0CTL |= TACLR; //Counter clear TA0CCTL0 |= CCIE; _EINT(); } #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A0(void){ if(TA0CCTL0 & CM1) //Capture falling edge{ TA0CTL |= TACLR; //Clear timerTA0CCTL0=(TA0CCTL0&(~CM1))| CM0; //Change to rising edge capture: CM1 is set to zero, CM0 is set to one} else if(TA0CCTL0 & CM_0) //Capture rising edge{ width = TA0CCR0; //Record the end timeTA0CCTL0=(TA0CCTL0&(~CM0))| CM1; //Change to falling edge capture: CM0 is set to zero, CM1 is set to one} } void main(void){ WDTCTL = WDTPW + WDTHOLD; //Turn off watchdogP7SEL |= 0x03; // XT1 starts to oscillateUCSCTL1 |= DCORSEL_2; // Select DCO frequency range UCSCTL3 |= SELREF__REFOCLK; // Select Fll reference frequency REFO UCSCTL4 = SELM__DCOCLK + SELA__XT1CLK + SELS__DCOCLKDIV; // Configure MCLK = DCOC,SMCLK =DCODIV,ACLK=XT1 while (SFRIFG1 & OFIFG) // Clear OFIFG,and XT1OFFG ,DCOFFG { UCSCTL7 &= ~(XT1LFOFFG + DCOFFG); SFRIFG1 &= ~OFIFG; } while(1){ P1OUT ^= BIT0; // LED flashes, indicating that there is no crystal failure for(unsigned int i=60000;i>0;i--); // Delay } } I use the P2.1 port of MSP5438 to do a capture test. I think the program is OK. I input an 8HZ square wave, but the program does not enter the interrupt. It is very strange. Can you help me find the above problem? Answer: The setting is wrong.