Part Number: TDA4VM
Hello,
We want to use MCU_TIMER2 in Timer Capture Mode. We are receiving pulse on pin G27, which will be used for time stamping, on rising edge. This pin can be muxed as a MCU_TIMER_IO6.
We have configured the timer as follows:
/* Disable timer module */ timer_module->TCLR = 0x0; /* Set counter reload value after overflow */ timer_module->TLDR = 0x0; /* Wrapper overflow interrupt mask. This enables interrupt on every overflow */ timer_module->TOWR = 0; /* Enable autoreload and capture mode on rising edge */ timer_module->TCLR = 0x4102; /* Enable overflow and capture interrupts */ timer_module->IRQSTATUS_SET = 0x6; /* Start the timer */ timer_module->TCLR |= 0x1;
Also, CTRLMMR_MCU_TIMER2_CTRL register is set to 0x06 in order to select MCU_TIMER_IO6 input pin.
After application starts, overflow interrupt happens periodically but capture interrupt doesn't. GPIO pin is toggling successfully - this is verified with another application by reading GPIO status.
Do you have any idea what could be the problem here?
NOTE: We are running our code on ARM72 (QNX).
Best Regards,
Stefan.