mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user