2025-11-20 11:56 PM
Hi all,
I am using a nucleo board F412ZG with the Middelware FreeRTOS. I use only one task for now, but I will use others in future.
By the way, I set TIM2 as the timer system for FreeTOS:
Now I am trying to enable pin PC8 as an external interrupt in order to detect a falling edge:
When I generate the code I notice that the TIM2 interrupts is deleted, but I do not understand why. Anyone can help me?
Below I leave the screens of the generated code modifies from git:
Solved! Go to Solution.
2025-11-21 12:29 AM
Hello @Fin95
You are using STM32CubeMX 6.14.1 , I recommend you to migrate to the latest version of CubeMX 6.16.0 .
When you configure FreeRTOS to use TIM2 as the tick timer (instead of the default SysTick), CubeMX takes control of the TIM2 interrupt for the RTOS kernel. This means: CubeMX will generate the TIM2 interrupt handler (TIM2_IRQHandler) in stm32f4xx_it.c as shown below
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-21 12:04 AM - edited 2025-11-21 12:04 AM
Hello @Fin95
I'm currently checking this behavior . I will get back to you asap.
Could you please provide your IOC?
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-21 12:08 AM
2025-11-21 12:29 AM
Hello @Fin95
You are using STM32CubeMX 6.14.1 , I recommend you to migrate to the latest version of CubeMX 6.16.0 .
When you configure FreeRTOS to use TIM2 as the tick timer (instead of the default SysTick), CubeMX takes control of the TIM2 interrupt for the RTOS kernel. This means: CubeMX will generate the TIM2 interrupt handler (TIM2_IRQHandler) in stm32f4xx_it.c as shown below
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-24 2:00 AM
Hi @Ghofrane GSOURI,
I have installed the new version of CubeMX and from the autogenerated files seems the TIM2 interrupt callback is not even more deleted! ASAP I test the fw, I will check if it works properly and I will reply again to confirm the bugfix.
Thanks for the help.
Best regards.
Alberto