File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,9 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
118
118
TimMasterHandle .Init .Prescaler = (uint32_t )(SystemCoreClock / 1000000 ) - 1 ; // 1 us tick
119
119
TimMasterHandle .Init .ClockDivision = 0 ;
120
120
TimMasterHandle .Init .CounterMode = TIM_COUNTERMODE_UP ;
121
+ #ifdef TARGET_STM32F0
122
+ TimMasterHandle .Init .AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE ;
123
+ #endif
121
124
HAL_TIM_Base_Init (& TimMasterHandle );
122
125
123
126
// Configure output compare channel 1 for mbed timeout (enabled later when used)
Original file line number Diff line number Diff line change @@ -99,6 +99,9 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
99
99
TimMasterHandle .Init .CounterMode = TIM_COUNTERMODE_UP ;
100
100
#if !TARGET_STM32L1
101
101
TimMasterHandle .Init .RepetitionCounter = 0 ;
102
+ #endif
103
+ #ifdef TARGET_STM32F0
104
+ TimMasterHandle .Init .AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE ;
102
105
#endif
103
106
HAL_TIM_OC_Init (& TimMasterHandle );
104
107
You can’t perform that action at this time.
0 commit comments