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.
Solved! Go to Solution.
When set TROT, the LPIT timer will reload when a rising edge is detected on the selected trigger input.
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.
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.
-------------------------------------------------------------------------------
When set TROT, the LPIT timer will reload when a rising edge is detected on the selected trigger input.
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.
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.
-------------------------------------------------------------------------------
Thanks very much Robin.