Skip to content

Commit

Permalink
Merge pull request #3741 from jeromecoutant/PR_TICK32
Browse files Browse the repository at this point in the history
STM32 remove warning in hal_tick_32b.c file
  • Loading branch information
0xc0170 authored Mar 6, 2017
2 parents f168f62 + 0259c1a commit 750ac51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions targets/TARGET_STM/hal_tick_32b.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

extern TIM_HandleTypeDef TimMasterHandle;

extern void HAL_IncTick(void);

volatile uint32_t PreviousVal = 0;

void us_ticker_irq_handler(void);
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 750ac51

Please sign in to comment.