From b95c642a88ce26467593a279bfd78d0e8eac2c25 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 24 Aug 2015 08:55:45 -1000 Subject: [PATCH] Added Kconfig Enable Support for SAI and I2S PLL --- arch/arm/src/stm32/Kconfig | 35 +++++++++++++++++++++++++++- arch/arm/src/stm32/stm32f44xxx_rcc.c | 4 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index 2d462bebcb..be780bc43f 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -779,6 +779,8 @@ config ARCH_CHIP_STM32F446M select STM32_STM32F40XX select STM32_STM32F446 select ARCH_HAVE_FPU + select STM32_HAVE_SAIPLL + select STM32_HAVE_I2SPLL config ARCH_CHIP_STM32F446R bool "STM32F446R" @@ -786,6 +788,8 @@ config ARCH_CHIP_STM32F446R select STM32_STM32F40XX select STM32_STM32F446 select ARCH_HAVE_FPU + select STM32_HAVE_SAIPLL + select STM32_HAVE_I2SPLL config ARCH_CHIP_STM32F446V bool "STM32F446V" @@ -793,6 +797,8 @@ config ARCH_CHIP_STM32F446V select STM32_STM32F40XX select STM32_STM32F446 select ARCH_HAVE_FPU + select STM32_HAVE_SAIPLL + select STM32_HAVE_I2SPLL config ARCH_CHIP_STM32F446Z bool "STM32F446Z" @@ -800,7 +806,8 @@ config ARCH_CHIP_STM32F446Z select STM32_STM32F40XX select STM32_STM32F446 select ARCH_HAVE_FPU - + select STM32_HAVE_SAIPLL + select STM32_HAVE_I2SPLL endchoice @@ -1382,6 +1389,14 @@ config STM32_HAVE_SPI6 bool default n +config STM32_HAVE_SAIPLL + bool + default n + +config STM32_HAVE_I2SPLL + bool + default n + # These are the peripheral selections proper config STM32_ADC1 @@ -2045,6 +2060,24 @@ config ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG ---help--- Enables special, board-specific STM32 clock configuration. +config STM32_SAIPLL + bool "SAIPLL" + default n + depends on STM32_HAVE_SAIPLL + ---help--- + The STM32F446 has a separate PLL for the SAI block. + Set this true and provide configuration parameters in + board.h to use this PLL. + +config STM32_I2SPLL + bool "I2SPLL" + default n + depends on STM32_HAVE_I2SPLL + ---help--- + The STM32F446 has a separate PLL for the I2S block. + Set this true and provide configuration parameters in + board.h to use this PLL. + config STM32_CCMEXCLUDE bool "Exclude CCM SRAM from the heap" default y if ARCH_DMA || ELF diff --git a/arch/arm/src/stm32/stm32f44xxx_rcc.c b/arch/arm/src/stm32/stm32f44xxx_rcc.c index 903d4183af..e0b396e917 100644 --- a/arch/arm/src/stm32/stm32f44xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f44xxx_rcc.c @@ -693,7 +693,7 @@ static void stm32_stdclockconfig(void) { } -#ifdef CONFIG_STM32_USE_PLLSAI +#if defined(CONFIG_STM32_SAIPLL) /* Configure PLLSAI */ @@ -739,7 +739,7 @@ static void stm32_stdclockconfig(void) } #endif -#ifdef CONFIG_STM32_USE_PLLI2S +#if defined(CONFIG_STM32_I2SPLL) /* Configure PLLI2S */