I am trying to develop a program to read DHT-11 sensor from the bottom up. For this reason, I need to use Timer in capture mode.
1. P1.3 is selected for capture input. I want to capture on the falling edges. But I could not create interrupt when I was trying by simply connecting 3.3 V to P1.3 then deconnecting. What might be wrong here? Maybe I misunderstand some aspect of the timers.
int main(void)
{
WDTCTL = WDTPW | WDTHOLD;
P1SEL1 |= BIT3; // 10 for secondary role
P1SEL0 &= ~BIT3;
P1DIR &= ~BIT3;
PM5CTL0 &= ~LOCKLPM5;
TA1CTL |= MC__STOP;
TA1CCTL2 = CM_2 | CCIS_0 | CAP | CCIE | SCS;
TA1CTL = TASSEL__SMCLK | MC__CONTINUOUS;
__enable_interrupt();
while(1);
}
#pragma vector = TIMER1_A1_VECTOR
__interrupt void Timer_A1(void){
__no_operation();
}
Thanks in advance.