Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32L452_Nucleo_ticker
Fork of mbed-dev by
Diff: targets/TARGET_STM/hal_tick_32b.c
- Revision:
- 160:d5399cc887bb
- Parent:
- 156:95d6b41a828b
- Child:
- 161:2cc1468da177
--- a/targets/TARGET_STM/hal_tick_32b.c Tue Feb 28 17:13:35 2017 +0000 +++ b/targets/TARGET_STM/hal_tick_32b.c Tue Mar 14 16:40:56 2017 +0000 @@ -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 @@ 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 }