Added functions for DSI clock source selection
This commit is contained in:
parent
4f0238339e
commit
a4e97d5daf
@ -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)
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user