Skip to content

stm32: add support for stm32h723 (nucleo-h723zg) and stm32h757_cm7 - #5571

Draft
knieriem wants to merge 5 commits into
tinygo-org:devfrom
knieriem:h723-202607
Draft

stm32: add support for stm32h723 (nucleo-h723zg) and stm32h757_cm7#5571
knieriem wants to merge 5 commits into
tinygo-org:devfrom
knieriem:h723-202607

Conversation

@knieriem

@knieriem knieriem commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This WIP PR adds support for the NUCLEO H723ZG (stm32h723) and the stm32h757_cm7 based on previous work from last year, applying small changes to the recently added implementation for stm32h753 by @digitalentity.

Current state:

  • h723 and h757_cm7: examples/blinky1 and println (via USART3) work

Changes:

  • USB for H723 still deactivated — machine_stm32h7_usb.go would need to be adjusted to support USB1 too (perhaps gen-device-stm32: fix USB_OTG_FS groupName inconsistency #5562 makes adjusting the structure easier as it provides improved USB_OTG_* types)

  • moved the _ "machine/usb/cbc" import from runtime_stm32h7.go to runtime_stm32h7_usbcbc.go to allow usb-less compilation.
    [Would a usb.cbc build tag help to select such functionality in the target/*.json file, with alternatives like usb.msc or usb.none?]

  • STM32H723 does not know Port I (but J and K). Therefore gpio pin setup got extended, adding a version with port I (_port_i.go), and a version without (_no_port_i.go). Perhaps better suffixes need to be found.

  • Naming differences (like WWDG vs WWDG1) or (IRQ_TIM_CC vs. IRQ_TIM1_CC) have been resolved by extending the alias mechanism in gen-device-svd, which allows to add an unnumbered name for devices that provide the name with a 1 suffix only -- with the result that the existing implementation, w.r.t. to these names, can be used without modification.

  • adds a PinMode PinModeETH which can be used in Ethernet experiments.


This PR also enables building executables for stm32h757_cm7 based boards by factoring out interrupt mask and pending registers (which differ on single- and dual-core MCUs) to ..h7_gpio.go variants suffixed with _sp.go or _mp.go.
[Still, to get it running on my custom H757 board, where the oscillator is not populated, I have to convert the runtime HSE setup to one using HSI. I wonder if we could use build tags to select clock configurations at build time: clock.hse or .ext, clock.hsi or .int, clock.cust for a entirely project defined clock configuration; similar tags could be used to extend MPU configuration.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant