[Taranis X9E] PLL fix

This commit is contained in:
bsongis
2015-03-04 18:24:46 +01:00
parent 67e6490136
commit b0cc60ccb2
2 changed files with 4 additions and 4 deletions
@@ -313,7 +313,11 @@
/************************* PLL Parameters *************************************/
#if defined (STM32F40_41xxx) || defined (STM32F427_437xx) || defined (STM32F429_439xx) || defined (STM32F401xx)
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
#if defined(REV9E)
#define PLL_M 12
#else
#define PLL_M 25
#endif
#else /* STM32F411xE */
#if defined (USE_HSE_BYPASS)
#define PLL_M 8
@@ -47,10 +47,6 @@ bool dacIdle = true;
void setSampleRate(uint32_t frequency)
{
#if defined(REV9E)
frequency *= 2;
#endif
register uint32_t timer = (PERI1_FREQUENCY * TIMER_MULT_APB1) / frequency - 1 ; // MCK/8 and 100 000 Hz
TIM6->CR1 &= ~TIM_CR1_CEN ;