cancel
Showing results for 
Search instead for 
Did you mean: 

TIM12_IRQ dose not work in the HAL_TIM_PeriodElapsedCallback(htim). But it work in the TIM8_BRK_TIM12_IRQHandler(void). Let me know why it dose not work in the HAL_TIM_PeriodElapsedCallback(htim).

pabian
Associate III
  • MCU: STM32F767
  • FreeRTOS
  • TIM14 (TimeBase, priority 0) -> tick count using in the HAL_TIM_PeriodElapsedCallback()
  • TIM12 (Update Timer Interrupt call, priority 5)

I configured to generate the TIM12 update interrupt and call in the ​TIM8_BRK_TIM12_IRQHandler() -> HAL_TIM_PeriodElapsedCallback().

I confirmed TIM12 IRQ in the TIM8_BRK_TIM12_IRQHandler().

however it dose not enter in the HAL_TIM_PeriodElapsedCallback().

void TIM8_BRK_TIM12_IRQHandler(void)

{

// TIM12 Update Interrupt is occurred and call the below IRQHandler.

HAL_TIM_IRQHandler(&htim12); // --> HAL_TIM_PeriodElapsedCallback(htim);

}

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{// timebase tick interrupt (1us)

if (htim->Instance == TIM14) {

   HAL_IncTick();

  }

else if(htim->Instance == TIM12)

{ // dose not enter

   if(TIM12->SR & TIM_SR_UIF) {

     TIM12->SR = ~TIM_SR_UIF;

     printf("TIM12 Interrupt....%d\n",i++);

  }

}

0 REPLIES 0