Skip to content

Commit 58fb3d3

Browse files
committed
drivers: clock_control: disable the HSI PLL prescaler
Ensure our clock isn't divided when using HSI. Signed-off-by: Peter Johanson <peter@peterjohanson.com>
1 parent 44dba78 commit 58fb3d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/clock_control/clock_control_wch_rcc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ static int clock_control_wch_rcc_init(const struct device *dev)
154154
RCC->CFGR0 |= RCC_PLLSRC;
155155
} else if (IS_ENABLED(WCH_RCC_PLL_SRC_IS_HSI)) {
156156
RCC->CFGR0 &= ~RCC_PLLSRC;
157+
#if defined(EXTEN_PLL_HSI_PRE)
158+
EXTEN->EXTEN_CTR |= EXTEN_PLL_HSI_PRE;
159+
#endif
157160
}
158161
RCC->CFGR0 |= (config->mul == 18 ? 0xF : (config->mul - 2)) << 0x12;
159162
RCC->CTLR |= RCC_PLLON;

0 commit comments

Comments
 (0)