mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
machine/stm32: add STM32U585 target definition and runtime
Add processor target (cortex-m33), linker script (2048K flash, 768K RAM), and arduino-uno-q board target. Runtime initializes 160MHz clock via PLL1 from HSI16, with PWR Range 1 and EPOD booster. Also add psctype abstraction for timer PSC register width, needed because the U5 SVD defines PSC as a 16-bit register.
This commit is contained in:
@@ -150,7 +150,7 @@ func (t *TIM) setPeriod(period uint64, updatePrescaler bool) error {
|
||||
psc = ceil(top, ARR_MAX)
|
||||
top = top / psc
|
||||
|
||||
t.Device.PSC.Set(uint32(psc - 1))
|
||||
t.Device.PSC.Set(psctype(psc - 1))
|
||||
} else {
|
||||
psc = uint64(t.Device.PSC.Get()) + 1
|
||||
top = top / psc
|
||||
|
||||
@@ -731,6 +731,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -607,6 +607,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -712,6 +712,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -554,6 +554,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -189,6 +189,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -246,6 +246,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -532,6 +532,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -542,6 +542,7 @@ func (t *TIM) enableMainOutput() {
|
||||
}
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
@@ -433,6 +433,7 @@ func initRNG() {
|
||||
//----------
|
||||
|
||||
type arrtype = uint32
|
||||
type psctype = uint32
|
||||
type arrRegType = volatile.Register32
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user