Skip to main content
Associate II
August 12, 2025
Solved

Interrupt (with highest priority) sometimes takes longer

  • August 12, 2025
  • 1 reply
  • 364 views

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

Best answer by TDK

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

1 reply

TDK
TDKBest answer
Super User
August 12, 2025

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""."
Associate II
August 13, 2025

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