Skip to main content
Ofer
Associate III
August 25, 2026
Question

no timers are generated for a cube file

  • August 25, 2026
  • 5 replies
  • 29 views

hi

Im using the STM32G474RETx for my project.

I connected some timers for it but most of them warent generated on my main.c file (TIMER1, TIMER8 and TIMER16 were generated there), but TIM2,TIM5, TIM20 warent generated although i initiated them on the cube file.

In addition, the compile button is disabled.

Can someone help me with it please.

Attached is my cube file.

5 replies

ST Technical Moderator
August 26, 2026

Hello ​@Ofer 

Let me thank you for posting.

I was unable to reproduce the behavior described; TIM2, TIM5 and TIM20 initialization are well generated correctly with STM32CubeMX 6.18.1.

Thanks.

Mahmoud

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.
Ofer
OferAuthor
Associate III
August 26, 2026

thank,

i also use version16/8.1 but still not getting any initialization of them 

TDK
August 26, 2026

It sounds like you haven’t regenerated the code after making the changes.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Ofer
OferAuthor
Associate III
August 26, 2026

thanks, but what changes do you mean ?

 

TDK
August 26, 2026

After you make changes in the IOC file, you need to regenerate the code by pressing the Generate Code button in order for the source code to be updated.

"If you feel a post has answered your question, please click ""Accept as Solution""."