2020-12-01 06: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.
2020-12-02 07: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.
2020-12-02 07: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;
2020-12-03 01: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
2020-12-03 01:20 AM
2020-12-03 01:32 AM
Sorry. I have misunderstood your answer
2020-12-03 01: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
2020-12-03 06: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.
2020-12-07 02:51 AM
Hi Ihoan.1,
Please mark this question as answered if your problem is well solved.
Best Regards,
Ons.