Code generated and built by STM32CubeIDE can not start the timer and systick ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-01 6:42 AM
Hi,
I have generated and built code by STM32CubeIDE but the SysTick and Timer not work. I set breakpoint but the interrupt function just not run. GPIO feature work normal. But when I create the project by STM32CubeMX with the same configuration and built code by KeilC then everything work good. So is that a bug of SMT32CubeIDE? I'm using STM32F103C8T6 on board Bluepill. I don't want to use KeilC anymore because it not free. What should i do now?
Thank for your advice.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32CubeMX
-
STM32F1 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-02 7:28 PM
Thanks all.
Finally, The timer work when I replace HAL Driver with LL Driver. So I think there is a bug on STM32CubeIDE Compiler when built HAL code. Because everything works well with Keil C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-02 7:39 PM
> So I think there is a bug on STM32CubeIDE Compiler when built HAL code.
Probably more likely there was a bug in your code. Having the timer set up in slave trigger mode will require you to actually trigger it, which your code doesn't do.
> sSlaveConfig.SlaveMode = TIM_SLAVEMODE_TRIGGER;
> sSlaveConfig.InputTrigger = TIM_TS_ITR0;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 1:19 AM
Hi, STM32CubeIDE already write these two above command in my code. And I already called the HAL_TIM_Base_Start_IT(&htim1) function after TIM1 was initialized
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 1:20 AM
please see the main.c file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 1:32 AM
Sorry. I have misunderstood your answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 1:39 AM
Thank @TDK​ very much!
After disabled Slave Trigger mode. The Timer work well. Now I'm wondering why with the same configuration, Code compiled by KeilC work but not with SMT32CubeIDE. Is that a bug on KeilC? :D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 6:41 AM
Again, more likely to be a bug in your code rather than a bug in the compiler. The hardware is obviously the same between the two and the compilers are mature and don't have glaring errors like this. It probably isn't the same configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-07 2:51 AM
Hi Ihoan.1,
Please mark this question as answered if your problem is well solved.
Best Regards,
Ons.

- « Previous
-
- 1
- 2
- Next »