CubeMX not generating timebase IRQ handler for different timebase source.
Hello!
I attempted running a basic FreeRTOS example on a STM32F407VET6 board using CMSIS v2 following some tutorials, replacing systick for either TIM 6 or 7 as HAL Timebase as many tutorials suggest. The code only blinks and LED on the pre-generated task.
I could never get the program to work and by pausing execution I noticed it went straight to the default handler infinite loop. After reading a few posts it seems that the CubeIDE still does not generate the appropriate timer IRQ Handler within the stm32xxxx_it.c file and has to be added manually, as suggested by
void TIM7_IRQHandler(void)
{
/* USER CODE BEGIN TIM7_IRQn 0 */
/* USER CODE END TIM7_IRQn 0 */
HAL_TIM_IRQHandler(&htim7);
/* USER CODE BEGIN TIM7_IRQn 1 */
/* USER CODE END TIM7_IRQn 1 */
}
Adding the IRQHandler fixes the issue but it is a bit frustrating that many tutorials follow the same steps and rarely mention this, since it usually works fine with other MCUs. I actually tested the same workflow for a STM32H773IIT6 board and for that MCU it worked perfectly, the IRQ handlers for the timer are generated and updated automatically by CubeIDE.
I have come accross two other posts that had simillar issues to what I'm facing:
https://community.st.com/t5/stm32cubemx-mcus/stm32h755-haltick-timer-and-freertos-problem-with-code/td-p/247812/page/2
The original posts are from 2020, but the problem persists on some microcontrollers. I tested on both CubeIDE v.1.18 and v.1.19. Has this been reviewed in the newest versions of CubeMX?
Thanks in advance!
