diff --git a/build/final.elf b/build/final.elf index 5f46cac..cdc8fff 100755 Binary files a/build/final.elf and b/build/final.elf differ diff --git a/build/main.S b/build/main.S index 2f2ba27..de60756 100644 --- a/build/main.S +++ b/build/main.S @@ -231,7 +231,7 @@ system_clock_init: .L5: .word 1073887232 .word 1073770496 - .word 67252505 + .word 67252249 .word 1073888256 .cfi_endproc .LFE0: diff --git a/build/main.i b/build/main.i index 5757b32..1cc263b 100644 --- a/build/main.i +++ b/build/main.i @@ -2269,7 +2269,7 @@ static void system_clock_init(void) { ((struct rcc *) (0x40023800U))->PLLCFGR |= (1 << 22); - ((struct rcc *) (0x40023800U))->PLLCFGR |= ((25 & (0b111111)) << 0) | ((196 & (0b111111111)) << 6) | ((2 & (0b11)) << 16) | ((4 & (0b1111)) << 24); + ((struct rcc *) (0x40023800U))->PLLCFGR |= ((25 & (0b111111)) << 0) | ((192 & (0b111111111)) << 6) | ((2 & (0b11)) << 16) | ((4 & (0b1111)) << 24); ((struct rcc *) (0x40023800U))->CFGR &= ~((0b1111) << 4); diff --git a/build/main.o b/build/main.o index 7b6ef17..35ff02f 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/src/main.c b/src/main.c index 230a8e5..26025cc 100644 --- a/src/main.c +++ b/src/main.c @@ -32,7 +32,7 @@ static void system_clock_init(void) { RCC->PLLCFGR |= RCC_PLLCFGR_PLLSRC_HSE; // Settings to achieve system clock of 96Mhz - RCC->PLLCFGR |= RCC_PLLCFGR_PLLM(25) | RCC_PLLCFGR_PLLN(196) | RCC_PLLCFGR_PLLP(2) | RCC_PLLCFGR_PLLQ(4); + RCC->PLLCFGR |= RCC_PLLCFGR_PLLM(25) | RCC_PLLCFGR_PLLN(192) | RCC_PLLCFGR_PLLP(2) | RCC_PLLCFGR_PLLQ(4); // Set AHB prescalar to /1 RCC->CFGR &= ~(RCC_CFGR_HPRE_MASK << RCC_CFGR_HPRE_BIT);