mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 12:29:03 +00:00
feat(machine/stm32): make HSE crystal frequency selectable.
Define the board's external crystal (HSE) frequency `xtalHz` in the respective `board_*.go` files. Per-topology PLL tables (F1, F4, F7) will compute the register dividers from it. Moving this parameter to the board definition level cleanly isolates board hardware characteristics from general MCU chip configurations, eliminating the need for custom target build tags. Targets using HSE-clocked STM32 chips must define `xtalHz` or fail to build.
This commit is contained in:
committed by
Ron Evans
parent
b8adb803c4
commit
5f02d6b659
@@ -7,6 +7,8 @@ import (
|
||||
"runtime/interrupt"
|
||||
)
|
||||
|
||||
const xtalHz = 12_000_000
|
||||
|
||||
const (
|
||||
NUM_DIGITAL_IO_PINS = 39
|
||||
NUM_ANALOG_IO_PINS = 7
|
||||
|
||||
Reference in New Issue
Block a user