Hi,
I'm trying implement counter using Timer_A in msp430fg4618 by giving external clock source TACLK. But somehow it is not working.
Please refer below code snippet.
/******************************************************
void TimerA_Init(int delay)
{
TACTL = (TASSEL_0 | ID_0 | TACLR); //Use External clock TACLK, divide by 8 and reset TAR
P1SEL |= 0x20; //Enabling Portpin P1.5(TACLK) for clock i/p
TACCTL0 = CCIE; //Enable the Capture/Compare Interrupt
TACCR0 = 100; //
TACTL |= MC_1; //Set it to run in 'up mode' and thus start the counter
}
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{
//Some Logic and Timer Reset
}
/*****************************************************/
I have applied 10kHz 3Vpp Square wave signal to the TACLK(P1.5) using function generator.
With above setup I am not getting Timer_A interrupt. I am not able to understand whether above set up is working or not.
Please suggest what is going wrong.