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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-02-18 11:33 PM
- 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++);
}
}
- Labels:
-
STM32Cube MCU Packages
-
STM32F7 Series
-
TIM
