S12 PIN state

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,375件の閲覧回数
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,227件の閲覧回数
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,228件の閲覧回数
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,227件の閲覧回数
fanziyu
Contributor IV

Thanks so much!

0 件の賞賛
返信