when i use stm32f103c8t6(blue pill) runing a example(Timebase_callback) ,find Timer dosen't work(counter not running),then i open "xx\Arduino15\packages\STM32\hardware\stm32\1.8.0\system\Drivers\STM32F1xx_HAL_Driver\Src\HardwareTimer.cpp" in line 155 and modified as flow:
void HardwareTimer::resume(void)
{
// Clear flag and ennable IT
if (callbacks[0] != NULL) {
__HAL_TIM_CLEAR_FLAG(&(_timerObj.handle), TIM_FLAG_UPDATE);
__HAL_TIM_ENABLE_IT(&(_timerObj.handle), TIM_IT_UPDATE);
}
// Resume all channels
resumeChannel(1);
resumeChannel(2);
resumeChannel(3);
resumeChannel(4);
**__HAL_TIM_ENABLE(&(_timerObj.handle));**//add this line,to start timer
}
rebuilt and upload, then timer is start worked,and succesfull entranced HardTimer callback function.
when i use stm32f103c8t6(blue pill) runing a example(Timebase_callback) ,find Timer dosen't work(counter not running),then i open "xx\Arduino15\packages\STM32\hardware\stm32\1.8.0\system\Drivers\STM32F1xx_HAL_Driver\Src\HardwareTimer.cpp" in line 155 and modified as flow:
rebuilt and upload, then timer is start worked,and succesfull entranced HardTimer callback function.