mbed
Fork of mbed-dev by
Diff: targets/TARGET_STM/hal_tick_16b.c
- Revision:
- 156:95d6b41a828b
- Parent:
- 153:fa9ff456f731
- Child:
- 165:e614a9f1c9e2
diff -r 88546b34ff1c -r 95d6b41a828b targets/TARGET_STM/hal_tick_16b.c --- a/targets/TARGET_STM/hal_tick_16b.c Thu Jan 05 10:51:54 2017 +0000 +++ b/targets/TARGET_STM/hal_tick_16b.c Mon Jan 16 15:03:32 2017 +0000 @@ -118,6 +118,9 @@ TimMasterHandle.Init.Prescaler = (uint32_t)(SystemCoreClock / 1000000) - 1; // 1 us tick TimMasterHandle.Init.ClockDivision = 0; TimMasterHandle.Init.CounterMode = TIM_COUNTERMODE_UP; +#ifdef TARGET_STM32F0 + TimMasterHandle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; +#endif HAL_TIM_Base_Init(&TimMasterHandle); // Configure output compare channel 1 for mbed timeout (enabled later when used)