hal_tick.h changed for the L432KC target in TARGET/../device/ in order to reassign the system ticker from TIM2 to TIM7, since TIM2 was needed as a 32bit encoder counter.
Dependents: Nucleo_L432KC_Quadrature_Decoder_with_ADC_and_DAC
Fork of mbed-dev by
Diff: targets/TARGET_STM/hal_tick_32b.c
- Revision:
- 156:95d6b41a828b
- Parent:
- 153:fa9ff456f731
diff -r 88546b34ff1c -r 95d6b41a828b targets/TARGET_STM/hal_tick_32b.c --- a/targets/TARGET_STM/hal_tick_32b.c Thu Jan 05 10:51:54 2017 +0000 +++ b/targets/TARGET_STM/hal_tick_32b.c Mon Jan 16 15:03:32 2017 +0000 @@ -100,6 +100,9 @@ #if !TARGET_STM32L1 TimMasterHandle.Init.RepetitionCounter = 0; #endif +#ifdef TARGET_STM32F0 + TimMasterHandle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; +#endif HAL_TIM_OC_Init(&TimMasterHandle); NVIC_SetVector(TIM_MST_IRQ, (uint32_t)timer_irq_handler);