AnsweredAssumed Answered

STM32F4DISCOVERY (407VG) Timers (TIM10,TIM11) interrupt hits immediately after call to HAL_TIM_Base_Start_IT()

Question asked by samal.mrunmoy.002 on Jun 30, 2015
Latest reply on Jul 2, 2015 by samal.mrunmoy.002
Hi,

I used STM32CubeMX to configure Timers 10 and 11 in interrupt mode (Along with FreeRTOS)

void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
  if(htim_base->Instance==TIM11)
  {
  /* USER CODE BEGIN TIM11_MspInit 0 */
  /* USER CODE END TIM11_MspInit 0 */
  /* Peripheral clock enable */
    __TIM11_CLK_ENABLE();
  /* Peripheral interrupt init*/
    HAL_NVIC_SetPriority(TIM1_UP_TIM11_IRQn, 5, 0);
    HAL_NVIC_EnableIRQ(TIM1_UP_TIM11_IRQn);
  /* USER CODE BEGIN TIM11_MspInit 1 */
  /* USER CODE END TIM11_MspInit 1 */
  }
}

I have set the Timer to count UP till 1 second.

I am facing a weird issue with the timer interrupts. The timer interrupt hits immediately after the call function to

HAL_TIM_Base_Start_IT(&htim11);

this happens for both the two timers 10 and 11. I have not investigated this for other times but can anyone throw some light on this behavior?

Thanks.

Outcomes