Hi,
I'm trying to count pulses that are connected to my C6416's TINP input. Pulses are not so slow and coming approximately at a period of 1 second. I have configured the registers like following and in an interrupt I'm recording at which tick I receive the low-to-high transition.
TIMER_CTL_RMK( /* Timer control register (CTL)*/
TIMER_CTL_INVINP_NO,
TIMER_CTL_CLKSRC_EXTERNAL,
TIMER_CTL_CP_CLOCK,
TIMER_CTL_HLD_YES,
TIMER_CTL_GO_NO,
TIMER_CTL_PWID_ONE,
TIMER_CTL_DATOUT_0,
TIMER_CTL_INVOUT_NO,
TIMER_CTL_FUNC_GPIO
);
I set the count register to 0 and period to 1.
My problem is I'm entering the interrupt once in two pulse. Namely I'm missing one pulse at each time. I have read the timer reference manual and it seems to me the period which timer interrupt is generated is 2*period. Is it possible to generate an interrupt when every pulse is received? Am I making a wrong configuration?
Best regards,
Sertac