Skip to content

Commit de6f1d9

Browse files
committed
drivers: clock control of the stm32h7 skips pll1 re-init
Skip the PLL1 init if it is already running, this will avoid disabling the PLL when running after a jump from mcuboot. In case of XiP, the pll must not be reinit because it clocks the octo-quad SPI instance which accesses the external NOR flash. Signed-off-by: Francois Ramu <[email protected]>
1 parent de2f839 commit de6f1d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,16 @@ __unused
672672
static int set_up_plls(void)
673673
{
674674
#if defined(STM32_PLL_ENABLED) || defined(STM32_PLL2_ENABLED) || defined(STM32_PLL3_ENABLED)
675+
676+
/*
677+
* Skip if PLL1 is already configured by the McuBoot
678+
* with ext NOR in MemMapped : application running in external NOR in XiP
679+
* has not necessarily the CONFIG_STM32_MEMMAP
680+
*/
681+
if (LL_RCC_PLL1_IsReady()) {
682+
return 0;
683+
}
684+
675685
int r;
676686
uint32_t vco_input_range;
677687
uint32_t vco_output_range;

0 commit comments

Comments
 (0)