diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-10 17:07:02 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-10 17:07:02 +0000 |
commit | 35451abdd787f4ae8b2803095b2ae678b48be184 (patch) | |
tree | c47127cc0888b9730f083c09f4a87bfa7dd69914 /nuttx/arch/arm/src/stm32/stm32_rcc.h | |
parent | ddaa72597bd52d1d592ab7dca1405b7a9a6ba6b8 (diff) | |
download | px4-firmware-35451abdd787f4ae8b2803095b2ae678b48be184.tar.gz px4-firmware-35451abdd787f4ae8b2803095b2ae678b48be184.tar.bz2 px4-firmware-35451abdd787f4ae8b2803095b2ae678b48be184.zip |
Add support for Olimex STM32-P107 board (contributed by Max Holtzberg)
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5018 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_rcc.h')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_rcc.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_rcc.h b/nuttx/arch/arm/src/stm32/stm32_rcc.h index c4d43db3a..292eade73 100644 --- a/nuttx/arch/arm/src/stm32/stm32_rcc.h +++ b/nuttx/arch/arm/src/stm32/stm32_rcc.h @@ -117,6 +117,39 @@ static inline void stm32_mco1config(uint32_t source, uint32_t div) #endif /************************************************************************************ + * Name: stm32_mcoconfig + * + * Description: + * Selects the clock source to output on MC pin (PA8) for stm32f10xxx. + * PA8 should be configured in alternate function mode. + * + * Input Parameters: + * source - One of the definitions for the RCC_CFGR_MCO definitions from + * chip/stm32f10xxx_rcc.h {RCC_CFGR_SYSCLK, RCC_CFGR_INTCLK, RCC_CFGR_EXTCLK, + * RCC_CFGR_PLLCLKd2, RCC_CFGR_PLL2CLK, RCC_CFGR_PLL3CLKd2, RCC_CFGR_XT1, + * RCC_CFGR_PLL3CLK} + * + * Returned Value: + * None + * + ************************************************************************************/ + +#if defined(CONFIG_STM32_CONNECTIVITYLINE) +static inline void stm32_mcoconfig(uint32_t source) +{ + uint32_t regval; + + /* Set MCO source */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~(RCC_CFGR_MCO_MASK); + regval |= (source & RCC_CFGR_MCO_MASK); + putreg32(regval, STM32_RCC_CFGR); +} +#endif + + +/************************************************************************************ * Name: stm32_mco2config * * Description: |