Hello,
I am working on MIMXRT1176 controller.
1.I need to find the execution time of my code Instruction.
i am using systick timer in the following sequence
SysTick->VAL = 0UL; //clear current timer value
SysTick->LOAD = 0x00FFFFFF;
cal_systick_read_overhead();
cnt_start_value = SysTick->VAL;
/****code-function*/
cnt_end_value = SysTick->VAL;
execution_cycle = cnt_start_value - cnt_end_value - overhead;
SysTick->VAL = 0UL;
but the problem is if the counter value is overflowed i am getting the wrong value in calculation.
how to find the number of reload times of the systick timer.
2.Which is the best way to find the execution time of an function or an instruction?
Regards,
Sanath