This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Timer Capture Interrupt (MCU TIMER)

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.