HI,
I want instruction cycles required to execute these function in S32K146
Can you pls support ,
Thanks
Shruthi
Hi @Shruthi_C
Generally, the execution time depends on following: if the code is running from flash or RAM, it depends on flash settings (prefetching, wait states etc), it depends if the cache is enabled or not and if the code is already cached or not, it depends on activity of other bus masters (DMA, other cores if present…).
That’s the reason why I recommend such code loops only for rough delays. To measure such delay, the best option is to simply toggle a GPIO before/after execution of such code or loop and measure the time by an oscilloscope.
If precise delay is needed, it’s better to use a timer.
Regards,
Lukas
Hi Lukas,
Thanks for your input, I can use GPIO pin to measure the timings
Regards
Shruthi