From 0259c1a2a7f002fca0dcc3de692b7b043b324464 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Tue, 21 Feb 2017 16:41:31 +0100 Subject: [PATCH] STM32 remove warning in hal_tick_32b.c file --- targets/TARGET_STM/hal_tick_32b.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_STM/hal_tick_32b.c b/targets/TARGET_STM/hal_tick_32b.c index fb5229d4e0b..e8370f3c10b 100644 --- a/targets/TARGET_STM/hal_tick_32b.c +++ b/targets/TARGET_STM/hal_tick_32b.c @@ -22,6 +22,8 @@ extern TIM_HandleTypeDef TimMasterHandle; +extern void HAL_IncTick(void); + volatile uint32_t PreviousVal = 0; void us_ticker_irq_handler(void); @@ -90,8 +92,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) if (RCC_ClkInitStruct.APB2CLKDivider == RCC_HCLK_DIV1) { #endif TimMasterHandle.Init.Prescaler = (uint16_t)((PclkFreq) / 1000000) - 1; // 1 us tick - } - else { + } else { TimMasterHandle.Init.Prescaler = (uint16_t)((PclkFreq * 2) / 1000000) - 1; // 1 us tick }