S12 PIN state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12 PIN state

Jump to solution
611 Views
fanziyu
Contributor IV

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!

Tags (1)
1 Solution
463 Views
danielmartynek
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

The Timers have their own Edge Detector.

pastedImage_2.png

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

View solution in original post

2 Replies
464 Views
danielmartynek
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

The Timers have their own Edge Detector.

pastedImage_2.png

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

463 Views
fanziyu
Contributor IV

Thanks so much!

0 Kudos