HI,
I use input capture function of S12ZVL32 to detect a falling edge,then I read the Port data register in the interrupt routine.
I find that it is low level;
I use input capture function of S12ZVL32 to detect a rising edge,then I read the Port data register in the interrupt routine.
I find that it is high level;
Problem:when I use the input capture function of S12ZVL32 to detect a edge,then can I judge the edge type by reading the pin level in the ISR? (Of course,hardware fileter is done.)
In the RMV: a digital fileter on each pin prevents short pulses from generating an interrupt. A valid edge on an input is detected if 4 consecutive samples of a passive level are followed by 4 consecutive samples of an active level.
Thanks!
Solved! Go to Solution.
Hi,
Reading the Port Input Register (PTIT) is the only option.
The digital filter you mentioned is implemented on the ports with the Key-Wake up function (Port P, S, AD).
The timers are routed to Port T which doesn’t have the function.
The Timers have their own Edge Detector.
And as per the Input Capture description (Section 15.4.2, S12ZVL RM rev 2.41), the minimum pulse width for the input capture input is greater than two Bus clocks.
Regards,
Daniel
Hi,
Reading the Port Input Register (PTIT) is the only option.
The digital filter you mentioned is implemented on the ports with the Key-Wake up function (Port P, S, AD).
The timers are routed to Port T which doesn’t have the function.
The Timers have their own Edge Detector.
And as per the Input Capture description (Section 15.4.2, S12ZVL RM rev 2.41), the minimum pulse width for the input capture input is greater than two Bus clocks.
Regards,
Daniel
Thanks so much!