diff --git a/arch/arm/src/stm32f7/stm32_rcc.h b/arch/arm/src/stm32f7/stm32_rcc.h index 9320c34aa6..cfa3a6cdcf 100644 --- a/arch/arm/src/stm32f7/stm32_rcc.h +++ b/arch/arm/src/stm32f7/stm32_rcc.h @@ -243,6 +243,26 @@ void stm32_rcc_enablelsi(void); void stm32_rcc_disablelsi(void); +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +/**************************************************************************** + * Name: stm32f7x9_rcc_dsisrcphy + * + * Description: + * Set DSI clock source to DSI PHY + * + ****************************************************************************/ +void stm32f7x9_rcc_dsisrcphy(void); + +/**************************************************************************** + * Name: stm32f7x9_rcc_dsisrcpllr + * + * Description: + * Set DSI clock source to PLLR + * + ****************************************************************************/ +void stm32f7x9_rcc_dsisrcpllr(void); +#endif + #undef EXTERN #if defined(__cplusplus) } diff --git a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c index 66cdb10031..e86e6a80d7 100644 --- a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c +++ b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c @@ -985,3 +985,22 @@ static inline void rcc_enableperipherals(void) /**************************************************************************** * Public Functions ****************************************************************************/ +void stm32f7x9_rcc_dsisrcphy(void) +{ + uint32_t regval; + regval = getreg32(STM32_RCC_DCKCFGR2); + regval &= ~(RCC_DCKCFGR2_DSISEL_MASK); + + regval |= (RCC_DCKCFGR2_DSISEL_PHY); + putreg32(regval, STM32_RCC_DCKCFGR2); +} + +void stm32f7x9_rcc_dsisrcpllr(void) +{ + uint32_t regval; + regval = getreg32(STM32_RCC_DCKCFGR2); + regval &= ~RCC_DCKCFGR2_DSISEL_MASK; + + regval |= RCC_DCKCFGR2_DSISEL_SYSCLK; + putreg32(regval, STM32_RCC_DCKCFGR2); +}