LPIT counter reset

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

LPIT counter reset

跳至解决方案
3,234 次查看
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 解答
3,215 次查看
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 回复数
3,216 次查看
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 项奖励
回复
3,204 次查看
AjRj14
Contributor III

Thanks very much Robin. 

0 项奖励
回复