2025-08-12 1:47 PM - last edited on 2025-08-12 2:47 PM by Tesla DeLorean
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)
- 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.
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
Solved! Go to Solution.
2025-08-12 1:50 PM
The highest priority is preemption priority 0. 7 is the lowest priority interrupt out of the ones you show.
2025-08-12 1:50 PM
The highest priority is preemption priority 0. 7 is the lowest priority interrupt out of the ones you show.
2025-08-12 9:45 PM
Oh man, sorry, I miss understood priorities .... Thanks a lot, I will try!