At motor BRK interrupt handler, TSK_SafetyTask() should be called instead of MC_Scheduler() to immediately execute fault processing?
(Environment)
MC_SDK 5.Y.3 + STM32CubeMX 6.3.0 with HAL + IAR EWARM 8.5
(Hardware)
custom board based on F446RE + custom power board + Low Voltage BLDC motor with Encoder
(Control Mode)
Speed Control
(What I found)
In "stm32f4xx_mc_it.c", there is TIMx_BRK_M1_IRQHandler() as follows.
Notice, here MC_Scheduler() is called as commented.
========================================================
void TIMx_BRK_M1_IRQHandler(void)
{
if (LL_TIM_IsActiveFlag_BRK(PWM_Handle_M1.pParams_str->TIMx)) {
LL_TIM_ClearFlag_BRK(PWM_Handle_M1.pParams_str->TIMx);
R3_2_BRK_IRQHandler(&PWM_Handle_M1);
}
/* Systick is not executed due low priority so is necessary to call MC_Scheduler here.*/
MC_Scheduler();
}
========================================================
(Question)
Once BRK interrupt(over current) happened, we need to handle this fault immediately.
While MC_Scheduler() is for normal medium task(speed controller), TSK_SafetyTask() that is for fault processing should be called rather than MC_Scheduler()?
