Hi PetrS,
As rightly mentioned, this happens due to multiple interrrupts. In this case as I am using a OS timing event driven by a PIT interrupt, the processing of this interrupt causes the delay.
If I set the PIT interrupt as nested ISR, this behavior is improved with lesser delay but not solved.
I am using MCAL S32K3_RTD_3_0_0 and find that the built in irq handlers take a long time to execute (approx 24-30us) when comparted to a 65kHz PWM signal (say ADC group Conversion completion every 15us).
From the measurements I find that the existing MCAL handlers cannot be used for such a task involving fast interrupts. Is the observation on NXP's side the same ?
Also, I would like to understand the interrupt latency time and time to execute to 2 successive interrupts whose interrupt status flag is already set. Once the PIT interrupt is serviced, it takes around 10us to service the next available interrupt. What is the status/ action of the controller during these 10us ?
Thank you,
Aditya