2023-08-28 07:06 AM
Hi
I have found that I have to "mess with" the Sys -> Timebase setting to get Generate Code to create the file stmf4xx_hal_timebase_tim.c. I have no other timers enabled, just the Sys -> Timebase setting which is set to TIM3.
When I say "mess with" I mean this:
Once it has worked I find that regenerating code works every time. It is just that getting it to generate code correctly the first time is a problem.
It should work first time. It does not. I am generating code for MDK V5.
Regards
2023-08-28 07:18 AM
Hello @MRobe.1,
Could you please specify the exact steps that led you to this issue?
I generated a project from scratch using STM32CubeMX and only enabled system wakeup and chose TIM3 as the timebase source, and I didn't need to change anything as stm32f4xx_hal_timebase_tim.c is generated.
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.
2023-08-28 08:17 AM
Hi Sarra
I did not enable System Wakeup (I am, only, using TIM3 for RTX2). Let me clean out the project and attach the IOC once confirming it repeats with me.
Regards
2023-08-28 09:09 AM
Hi Sarra
I have tried to repeat and have failed! Given it was a simple project (none of my code) and it was the generated code that was complaining about htim3 being missing I cannot see that I dreamt it! I suspect there was a clash with another setting which I have since, unknowingly, resolved. Anyway, thanks for quick response.
Regards