PIT Timer Interrupt < 2.5us
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 10:44 AM
Hi
I trying to use the PIT to generate an interrupt every 1.7uS to toggle a GPIO and it does not seem to be working well.
I have a sysclk of 64MHz. Im using PIT1 and setting the LDVAL register with a count. Now the timer seems to be working well for a count of 200000 which corresponds to an intrerupt time of 5uS.
But any value less than that and the timer is unstable (high value of jitter)
Going further a value of 1000000 which corresponds to an interrupt time of 1us just does not work. The PIT does not seem to be able to generate an interrupt less than 2.5us.
I tried chaining the priority of the PIT interrupt to 15 in the file pit_lld.h
Below is my setting
#define SPC5_PIT_CH1_IRQ_PRIORITY INTC_PSR_ENABLE(INTC_PSR_CORE0_15)
This also did not seem to work. Is there any other setting that I can change to get this to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 2:33 PM
Is it unable to generate interrupts at that rate, or is the processor not able to stack context, and enter/exit an interrupt at such rates.
Figure out where the processors saturation point is. Consider if there are more effective ways for hardware to generate a toggling output signal.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 5:39 PM
I believe it can generate interrupts at that rate but it is the entering/exiting ISR thats the saturation point. But thats just a guess. The clock is at 64Mz. So thats around 132 cycles for a 2us timer. It should be able to do it.
Just curios if anyone else in this community has ever had to implement such an exercise?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 5:58 PM
Relatively low trafficked forum. When you're up at 500 KHz the exercise is to make the timer to be autonomous, and to recognize that's how to eliminate jitter.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 6:26 PM
I'm not sure I understand what you mean by autonomous?
And I can worry about jitter once I can actually get the timer interpret to within a micro second
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-20 7:30 PM
>>I'm not sure I understand what you mean by autonomous?
Let HW do HW work.
>>And I can worry about jitter once I can actually get the timer interpret to within a micro second
Ok, but I think you miss the point.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-26 1:43 AM
Hello Raghu ,
Could you confirm the device used ?
it is well SPC56P60 ..
Did you try to update SPC560Pxx_RLA PIT Test Application for Discovery ?
Best Regards
Erwan
