aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rp2040/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rp2040/main.c b/src/rp2040/main.c
index 97fa5eb8..40869618 100644
--- a/src/rp2040/main.c
+++ b/src/rp2040/main.c
@@ -113,8 +113,8 @@ static void
pll_setup(pll_hw_t *pll, uint32_t mul, uint32_t postdiv)
{
// Setup pll
- uint32_t refdiv = 1, fbdiv = mul, postdiv2 = 2, postdiv1 = postdiv/postdiv2;
- if (postdiv1 > 0x07) {
+ uint32_t refdiv = 1, fbdiv = mul, postdiv2 = 1, postdiv1 = postdiv;
+ while (postdiv1 > 0x07) {
postdiv1 >>= 1;
postdiv2 <<= 1;
}