Hello,
I am using a MPC5604P and have implemented some real time sequencer managing 2 tasks using Periodic Interrupt Timer (PIT) interrupts.
How could each PIT timer deviate over time?
I am initializing PIT0 interrupt as a 200ms task and PIT1 as 1sec task without further reconfiguration once tasks are scheduled.
I'm checking against each task interrupt re-entrance.
I see the initial start delay between PIT interrupts as minor but wonder how this delay can vary over time.
Thank you.
Regards.
Message was edited by: xplosiv Readability edit.
Hi,
the PIT is as precise as the source clock is. Interrupt flag will be set exactly at the same period each time.
The variation you can see is caused by software – that’s because current instruction must be finished (so it depends when the interrupt occurred), maybe interrupt with higher priority is being executed…
Regards,
Lukas
Hello Lukas,
Thank you for your answer.
I am not experiencing such shift, but wonder if PIT interrupts, being served through dedicated timers, could come to some loss of synchronisation, by the PIT timers themselves.
Interrupt servicing by software may introduce processing delay (context switch + actual application processing), and since PIT timers are all using the same clock source, I expect the PIT timers to be always "synchronized" once configured and scheduled.
I just wanted to ensure myself with this assumption: once started, PIT0 and PIT1 interrupts will always trigger with the same timing over time (triggering), whatever the actual processing associated with.
Thank you.
Regards,
Stéphane
Hi,
if we do not talk about processing delay and about execution of interrupt handlers then the answer is yes, the timing over time will be still the same. The interrupts will be triggered at the same time. Or we should rather say that the interrupt flags will be set at the same time - everything else is matter of software.
Regards,
Lukas