From 6b79aea0cfe5f0ce73dbc6c3c68056b284d8841e Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Thu, 4 Jul 2024 14:33:03 +0200 Subject: [PATCH] imxrt: Correctly update PLL, bit has to toggled instead of being set --- arch/arm/src/imxrt/imxrt_clockconfig_ver2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/imxrt/imxrt_clockconfig_ver2.c b/arch/arm/src/imxrt/imxrt_clockconfig_ver2.c index bc16b0cb99..9757f22695 100644 --- a/arch/arm/src/imxrt/imxrt_clockconfig_ver2.c +++ b/arch/arm/src/imxrt/imxrt_clockconfig_ver2.c @@ -412,22 +412,22 @@ static void imxrt_pll2_pfd(void) if (g_initial_clkconfig.sys_pll2.pfd0 > 0) { - reg |= ANADIG_PLL_SYS_PLL2_UPDATE_PFD0_UPDATE; + reg ^= ANADIG_PLL_SYS_PLL2_UPDATE_PFD0_UPDATE; } if (g_initial_clkconfig.sys_pll2.pfd1 > 0) { - reg |= ANADIG_PLL_SYS_PLL2_UPDATE_PFD1_UPDATE; + reg ^= ANADIG_PLL_SYS_PLL2_UPDATE_PFD1_UPDATE; } if (g_initial_clkconfig.sys_pll2.pfd2 > 0) { - reg |= ANADIG_PLL_SYS_PLL2_UPDATE_PFD2_UPDATE; + reg ^= ANADIG_PLL_SYS_PLL2_UPDATE_PFD2_UPDATE; } if (g_initial_clkconfig.sys_pll2.pfd3 > 0) { - reg |= ANADIG_PLL_SYS_PLL2_UPDATE_PFD3_UPDATE; + reg ^= ANADIG_PLL_SYS_PLL2_UPDATE_PFD3_UPDATE; } putreg32(reg, IMXRT_ANADIG_PLL_SYS_PLL2_UPDATE);