2025-10-30 2:24 PM
Hello Expert,
I am working on an STM32F303VET6 project using the MCSDK. I want to configure TIM16 to generate a 10 ms periodic interrupt . However, I noticed that on this MCU, TIM16 shares its NVIC vector with TIM1 (TIM1_UP_TIM16_IRQHandler), which is already used by MCSDK for motor control.
Could you please advise:
Can I safely use TIM16 for my 10 ms task while TIM1 is used by MCSDK?
If yes, what is the recommended way to handle the shared interrupt?
Are there any potential conflicts or timing issues I should be aware of?
In MCSDK- 6.41 , #define TIMx_UP_M1_IRQHandler TIM1_UP_TIM16_IRQHandler
void TIMx_UP_M1_IRQHandler(void)
{
/* USER CODE BEGIN TIMx_UP_M1_IRQn 0 */
/* USER CODE END TIMx_UP_M1_IRQn 0 */
LL_TIM_ClearFlag_UPDATE(TIM1);
R3_2_TIMx_UP_IRQHandler(&PWM_Handle_M1);
TSK_DualDriveFIFOUpdate(M1);
/* USER CODE BEGIN TIMx_UP_M1_IRQn 1 */
/* USER CODE END TIMx_UP_M1_IRQn 1 */
}
