fix: set stm32u5x clock rate to default

The complex 160MHz PLL initialization was hanging the MCU.

The fix: Replaced the entire PLL-based clock init with the MSI 4MHz default

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2026-03-17 18:59:21 +01:00
parent 40fb3466c1
commit 323b62b405
2 changed files with 8 additions and 78 deletions
+3 -3
View File
@@ -7,14 +7,14 @@ import (
)
func CPUFrequency() uint32 {
return 160000000
return 4_000_000
}
// Internal use: configured speed of the APB1 and APB2 timers, this should be kept
// in sync with any changes to runtime package which configures the oscillators
// and clock frequencies
const APB1_TIM_FREQ = 160e6 // 160MHz
const APB2_TIM_FREQ = 160e6 // 160MHz
const APB1_TIM_FREQ = 4e6 // 4MHz (MSI default)
const APB2_TIM_FREQ = 4e6 // 4MHz (MSI default)
//---------- UART related code