From e1c5fd34e4f2f776f7746335e045f7ac739805fa Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 9 May 2022 14:52:38 -0500 Subject: [PATCH] PLL setup check bug (#796) (#806) --- src/rp2_common/hardware_pll/pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rp2_common/hardware_pll/pll.c b/src/rp2_common/hardware_pll/pll.c index 6cc6184..f1a09d5 100644 --- a/src/rp2_common/hardware_pll/pll.c +++ b/src/rp2_common/hardware_pll/pll.c @@ -41,7 +41,7 @@ void pll_init(PLL pll, uint refdiv, uint vco_freq, uint post_div1, uint post_div if ((pll->cs & PLL_CS_LOCK_BITS) && (refdiv == (pll->cs & PLL_CS_REFDIV_BITS)) && (fbdiv == (pll->fbdiv_int & PLL_FBDIV_INT_BITS)) && - (pdiv == (pll->prim & (PLL_PRIM_POSTDIV1_BITS & PLL_PRIM_POSTDIV2_BITS)))) { + (pdiv == (pll->prim & (PLL_PRIM_POSTDIV1_BITS | PLL_PRIM_POSTDIV2_BITS)))) { // do not disrupt PLL that is already correctly configured and operating return; }