cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx bug: TIM17_IRQHandler function not generated when TIM17 is selected as timebase source

Michael98006
Associate III

I'm using STM32H745I-DISCO board. When I generate a FreeRTOS-based project in CubeMx with TIM17 selected as timebase source, TIM17_IRQHandler() function is not generated in the stm32h7xx_it.c file. If I change my timer selection to TIM15, the TIM15_IRQHandler() function is generated just fine. I'm using CubeMx 5.3.0 and generating code for IAR.

Previously, I was able to generate the correct code for TIM17 timer for my STM32H743-based board with the same version of CubeMx, so I'm not sure why that worked differently - the only change was a different board/MCU choice.

2 REPLIES 2
Michael98006
Associate III

Interestingly, when I changed TIM17 timer to TIM15 as the timebase source, then selected TIM17 again, the correct code was generated.

I had the same issue and can confirm that this method solved the problem.

After regenerating the code through CubeMX, my code consistently got locked up when trying to enable TIM17 as a codebase (as part of HAL_Init()). When I switched the timebase to TIM15 and regenerated code, then back to TIM17 (and regenerated code), there was no issue. The code executed as expected through HAL_Init().