From 4adddddd8344587cc08f762dfe08bc68206f4eb3 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sat, 28 Dec 2024 15:02:35 +0100 Subject: [PATCH] Fix check of PLL readiness --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 7bcd424..41d2b1b 100644 --- a/src/main.c +++ b/src/main.c @@ -52,7 +52,7 @@ static void system_clock_init(void) { // Wait indefinitely for PLL to be ready // TODO indicate error/timeout somehow? - while (!(RCC->CR & RCC_CR_HSERDY_READY)); + while (!(RCC->CR & RCC_CR_PLLRDY_LOCKED)); // Enable caching of instructions and data FLASH->ACR |= FLASH_ACR_DCEN_ENABLE;