LPIT counter reset

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,648件の閲覧回数
AjRj14
Contributor III

Hi, 

I am generating a 10ms ISR using LPIT. 

Also I am capturing a PWM signal in FTM0 channel. I want to reset the LPIT counter whenever an edge is detected in FTM0 channel.

Could you please tell me how can I reset the LPIT counter.

Thanks in Advance.

0 件の賞賛
返信
1 解決策
2,629件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

When set TROT, the LPIT timer will reload when a rising edge is detected on the selected trigger input.

Timer Control Register.png

Figure 48-7. Case 3 TSOT 0 TROT 1 TSOI 0 CHAIN 0.png

But the trigger source from FlexTimer are FTMx_INIT_TRIG and FTMx_EXT_TRIG
FTMx_INIT_TRIG: counter initialization trigger
FTMx_EXT_TRIG: channel match trigger
These two trigger source from FlexTimer don’t seem to be suitable for your application.

Writing to MISCTRL1[SW_TRG] generates software trigger to peripherals through TRGMUX.

MISCTRL1[SW_TRG].png

But seems using another FTM may more easier: configure another FTM works as simple timer.

Or using LPTMR, software reset the counter in ISR.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,630件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

When set TROT, the LPIT timer will reload when a rising edge is detected on the selected trigger input.

Timer Control Register.png

Figure 48-7. Case 3 TSOT 0 TROT 1 TSOI 0 CHAIN 0.png

But the trigger source from FlexTimer are FTMx_INIT_TRIG and FTMx_EXT_TRIG
FTMx_INIT_TRIG: counter initialization trigger
FTMx_EXT_TRIG: channel match trigger
These two trigger source from FlexTimer don’t seem to be suitable for your application.

Writing to MISCTRL1[SW_TRG] generates software trigger to peripherals through TRGMUX.

MISCTRL1[SW_TRG].png

But seems using another FTM may more easier: configure another FTM works as simple timer.

Or using LPTMR, software reset the counter in ISR.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
2,618件の閲覧回数
AjRj14
Contributor III

Thanks very much Robin. 

0 件の賞賛
返信