All timers are fed with systemCoreClock on F411xE

This commit is contained in:
jflyper 2017-07-08 22:31:32 +09:00
parent 6fc3c0c48f
commit 045f4bda35
1 changed files with 5 additions and 0 deletions

View File

@ -94,6 +94,10 @@ uint8_t timerClockDivisor(TIM_TypeDef *tim)
uint32_t timerClock(TIM_TypeDef *tim)
{
#if defined (STM32F411xE)
UNUSED(tim);
return SystemCoreClock;
#else
#if defined (STM32F40_41xxx)
if (tim == TIM8) return SystemCoreClock;
#endif
@ -102,4 +106,5 @@ uint32_t timerClock(TIM_TypeDef *tim)
} else {
return SystemCoreClock / 2;
}
#endif
}