undoing fix earlier because I failed to merge, and I want a clean branch from which to do a pull request
This commit is contained in:
parent
d21c88d974
commit
a969d86771
@ -77,7 +77,7 @@ void stm32l4_rcc_enablelse(void)
|
||||
*/
|
||||
|
||||
regval = getreg32(STM32L4_RCC_BDCR);
|
||||
regval |= RCC_BDCR_LSEON;
|
||||
regval |= RCC_BDCR_LSEON | RCC_BDCR_LSEDRV_MIDHI;
|
||||
putreg32(regval,STM32L4_RCC_BDCR);
|
||||
|
||||
/* Wait for the LSE clock to be ready */
|
||||
|
@ -105,16 +105,14 @@ bool stm32l4_pwr_enableclk(bool enable)
|
||||
/* Disable power interface clock */
|
||||
|
||||
regval &= ~RCC_APB1ENR1_PWREN;
|
||||
putreg32(regval, STM32L4_RCC_APB1ENR1);
|
||||
regval = getreg32(STM32L4_RCC_APB1ENR1);
|
||||
putreg32(STM32L4_RCC_APB1ENR1, regval);
|
||||
}
|
||||
else if (!wasenabled && enable)
|
||||
{
|
||||
/* Enable power interface clock */
|
||||
|
||||
regval |= RCC_APB1ENR1_PWREN;
|
||||
putreg32(regval, STM32L4_RCC_APB1ENR1);
|
||||
regval = getreg32(STM32L4_RCC_APB1ENR1);
|
||||
putreg32(STM32L4_RCC_APB1ENR1, regval);
|
||||
}
|
||||
|
||||
return wasenabled;
|
||||
|
Loading…
Reference in New Issue
Block a user