I want to capture time interval between two events, time interval may change from msec to 30sec, This events will occur inside controller.
Hi,
with so few information provided, I can suggest you to use eTPU.
However with some sw + hw solution (counting counter overflows) you can use PIT, RTI, or eMIOS.
Its up to you which implementation suits best for you.
Peter