AnsweredAssumed Answered

Detecting interrupt routine execution time greater than interrupt period at runtime

Question asked by new guy on Sep 26, 2015
Latest reply on Sep 26, 2015 by new guy
I was just wondering if the following is a reliable/reasonable method for FW to detect at runtime whether another timer interrupt has been fired, before servicing of the prior timer interrupt (i.e. execution of the code called by the interrupt) has been completed.

 if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET)
  {
     TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
   
       // Do my things here 

      // when finished, following test whether execution period was longer than TIM3 interrupt(?)
      if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET)
      {
            TimingProblem=true;
       }
}
In other words, to detect if code execution is taking longer than the interrupt period?

Thanks

Outcomes