Hello,
I'm using MSP430F22xx controller.
I need to detect both edges on timer capture external signal and I found it problematic.
I've got CCR0 in capture mode on both edges of the signal.
I search for the method of detecting which edge has been captured: rising or falling. I found only method with sampling pin state in interrupt:
#pragma vector=TIMER0_A0_VECTOR
__interrupt void sensorTimer0Impulse(void)
{
if ((TA0CCTL0 & CCI)== CCI) //we have rising edge interrupt
{
But unfortunately this method is not 100% faultless.
Do you know any other approach to this task?
Best regards
Krzysztof Grabinski