Hi,
I'm testing code using an MSP430F26x timer to capture the tick count of an input signal using timer B. Timer B clock is a 10 kHz clock and Timer B tick count max is 10000 which rolls over every 1 second. The input signal is a 1 Hz external signal and its capture count is read every second by the code running on TBCCR2.
The following timer register setting is being used: MOV #CAP+CM_1+SCS+CCIE, &TBCCTL2
Sometimes an issue is seen where that the capture tick count register content oscillates between two adjacent ticks over several reads. So TBCCR2=10 is read at time N seconds and then TBCCR2=11 is read at time N+1 seconds followed by TBCCR2=10 being read at time N+2 seconds and so on for some seconds.
I'd like to find out if this TBCCR2 oscillation could be happening because the 1Hz input signal occurs exactly at or slightly after 10 timer B ticks after timer B starts counting every second. I'd also like to find out if there's any way to mitigate this behavior of the MSP. Please let me know.
Thanks.
