Using Timer 2 to Capture Timer 3 via internal Interrupts
Hey,
I'm using the Timer 2 in Encoder Mode TI1 and TI2. The Trigger Output of the Timer is set to Master/Slave Mode Enabled and the Trigger Event is set to Compare Pulse (OC1).
As far as I know: This Timer will fire an internal interrupt via TRGO everytime the value changes.
The timer 3 is configured as following: He is used as a normal Timer with an internal clock and the auto-reload preloader turned off. The timer is configured as slave in reset Mode. The Trigger is set to ITR1 and the Ch1 is configured as Input Capture triggered by TRC.
So again. As far as i know. This timer 3 is just counting until the timer 2 interrupts him via TRGO. This will capture the current timer 3 CNT (because of the Ch1 Input Capture) and reset the Timer 3 (because of the Reset Mode).
The internal connection between the timer 2 and timer 3 works. The timer 3 will get reset as soon as timer 2 got a changing edge from its channels. But unfortunatly the timer 3 will not write the CNT value into the CC1 Register.
Is there anything i haven't understood so far? Is something missing? Is it even possible to capture the current timestamp and reset the timer in slave mode?
Markus
