arch/arm/src/stm32h7/stm32h7x3xx_rcc.c: Set the stm32h7 default HSI predivider to 4. The I2C driver currently assumes HSI clock to be 16MHz.

This commit is contained in:
Jukka Laitinen 2019-04-30 07:15:37 -06:00 committed by Gregory Nutt
parent 7a1522294c
commit d3ff5476e0

View File

@ -104,7 +104,13 @@ static inline void rcc_reset(void)
regval = getreg32(STM32_RCC_CR);
regval &= ~(RCC_CR_HSEON | RCC_CR_HSI48ON |
RCC_CR_CSION | RCC_CR_PLL1ON |
RCC_CR_PLL2ON | RCC_CR_PLL3ON);
RCC_CR_PLL2ON | RCC_CR_PLL3ON |
RCC_CR_HSIDIV_MASK);
/* Set HSI predivider to default (4, 16MHz) */
regval |= RCC_CR_HSIDIV_4;
putreg32(regval, STM32_RCC_CR);
/* Reset PLLCFGR register to reset default */