feat(machine/stm32): add STM32H7 and NUCLEO-H753ZI support

This commit is contained in:
Konstantin Sharlaimov
2026-07-23 11:06:52 +02:00
committed by Ron Evans
parent 40ed956d6c
commit 3797e89600
27 changed files with 2576 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
//go:build stm32h7
package main
import "machine"
var (
pwm = &machine.TIM1
pinA = machine.PA8
pinB = machine.PA9
)
+31
View File
@@ -0,0 +1,31 @@
package main
import (
"machine"
"time"
)
func main() {
time.Sleep(2 * time.Second)
println("configuring window watchdog")
config := machine.WindowWatchdogConfig{
TimeoutMicros: 100000, // 100ms
WindowPercent: 50, // 50ms to 100ms refresh window
}
machine.WindowWatchdog.Configure(config)
machine.WindowWatchdog.Start()
println("updating wwdg for 1 second")
for i := 0; i < 10; i++ {
time.Sleep(75 * time.Millisecond) // middle of the window
machine.WindowWatchdog.Update()
println("alive")
}
println("entering tight loop (will reset)")
for {
time.Sleep(10 * time.Millisecond)
}
}