mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
All timers are fed with systemCoreClock on F411xE
This commit is contained in:
parent
6fc3c0c48f
commit
045f4bda35
1 changed files with 5 additions and 0 deletions
|
@ -94,6 +94,10 @@ uint8_t timerClockDivisor(TIM_TypeDef *tim)
|
||||||
|
|
||||||
uint32_t timerClock(TIM_TypeDef *tim)
|
uint32_t timerClock(TIM_TypeDef *tim)
|
||||||
{
|
{
|
||||||
|
#if defined (STM32F411xE)
|
||||||
|
UNUSED(tim);
|
||||||
|
return SystemCoreClock;
|
||||||
|
#else
|
||||||
#if defined (STM32F40_41xxx)
|
#if defined (STM32F40_41xxx)
|
||||||
if (tim == TIM8) return SystemCoreClock;
|
if (tim == TIM8) return SystemCoreClock;
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,4 +106,5 @@ uint32_t timerClock(TIM_TypeDef *tim)
|
||||||
} else {
|
} else {
|
||||||
return SystemCoreClock / 2;
|
return SystemCoreClock / 2;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue