diff options
| author | liYony <[email protected]> | 2022-12-10 12:02:31 +0800 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2022-12-09 23:19:18 -0500 |
| commit | 190eda6ab03ca294238da59c3eb1069dac276a93 (patch) | |
| tree | 744dd6f93affd2b429a9f9f2bd41f32973cf8359 /bsp/stm32 | |
| parent | 4bbfc5fcb85503cb9a115ce1f7979cdae85c439f (diff) | |
[bug] fix tim bug
Diffstat (limited to 'bsp/stm32')
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drv_tim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_tim.c b/bsp/stm32/libraries/HAL_Drivers/drv_tim.c index 6677893a95..d48f980c93 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_tim.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_tim.c @@ -212,7 +212,7 @@ static void timer_init(struct rt_hwtimer_device *timer, rt_uint32_t state) #if defined(APBPERIPH_BASE) prescaler_value = (uint32_t)(HAL_RCC_GetPCLK1Freq() * pclk1_doubler / 10000) - 1; #elif defined(APB1PERIPH_BASE) || defined(APB2PERIPH_BASE) - if ((rt_uint32_t)htim->Instance >= APB2PERIPH_BASE) + if ((rt_uint32_t)tim->Instance >= APB2PERIPH_BASE) { prescaler_value = (uint32_t)(HAL_RCC_GetPCLK2Freq() * pclk2_doubler / 10000) - 1; } |
