Skip to main content
Visitor II
February 19, 2020
Question

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).

  • February 19, 2020
  • 0 replies
  • 523 views
  • 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++);

  }

}

    This topic has been closed for replies.