cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt (with highest priority) sometimes takes longer

BastelBaus
Associate II

Dear all,

could need some advice how to continue debugging, IO am using an STM32F4

- TIM1 capture compare IR enabled with highest priority (even above Time Base)

BastelBaus_0-1755030863088.png

 

- c&c callback just toggles a PIN two times

inline void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) {
  HAL_GPIO_TogglePin(DEBUG_PIN_GPIO_Port,DEBUG_PIN_Pin);
  HAL_GPIO_TogglePin(DEBUG_PIN_GPIO_Port,DEBUG_PIN_Pin);
  return;
}

- IR is called every 13us. However, sometimes the pin seams stuck for ~10us and then recovers.

BastelBaus_1-1755031290706.png

checking carefully, the next double toggle is also a bit late but the overall timing for the over next is fine.

So looks to me that something interrupts my interrupt and delays it. But what should this be if it has already highest priority ?

Any suggestions ?

 

BR,

BastelBaus

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

The highest priority is preemption priority 0.  7 is the lowest priority interrupt out of the ones you show.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Super User

The highest priority is preemption priority 0.  7 is the lowest priority interrupt out of the ones you show.

If you feel a post has answered your question, please click "Accept as Solution".

Oh man, sorry, I miss understood priorities .... Thanks a lot, I will try!