S12 PIN state

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S12 PIN state

跳至解决方案
1,227 次查看
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!

标记 (1)
1 解答
1,079 次查看
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

在原帖中查看解决方案

2 回复数
1,080 次查看
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

1,079 次查看
fanziyu
Contributor IV

Thanks so much!

0 项奖励
回复