Skip to content

Add NUCLEO-H755ZI-Q support to the STM32H7 target - #1016

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:stm32h755
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:stm32h755

Conversation

@dgarske

@dgarske dgarske commented Dec 1, 2026

Copy link
Copy Markdown
Member

Adds the options the STM32H7 HAL needs on a board whose core is supplied by the on-chip SMPS alone, such as the dual-core NUCLEO-H755ZI-Q. Without the new defines the generated code is unchanged: wolfboot.bin for stm32h7.config is byte-identical before and after.

What it adds

  • hal/stm32h7.c, hal/stm32h7.h - PWR_SUPPLY_CONFIG selects the PWR_CR3 supply, written only while the register holds its reset value. STM32H7_SMPS_ONLY keeps VOS1 and programs PLL1 for 400MHz from the 8MHz HSE bypass clock.
  • config/examples/stm32h755.config - the stm32h7.config layout with both defines.
  • test-app/ - WOLFCRYPT_TEST=1 and WOLFCRYPT_BENCHMARK=1 for the STM32H7 test application.
  • docs/Targets.md - the SMPS options and the Cortex-M4 boot option byte.

Hardware / test status

Validated on a NUCLEO-H755ZI-Q: cold and warm boot at 400MHz, update, rollback and confirmed update across the ECC, RSA, Ed, ML-DSA-44/65, LMS and XMSS signature options and with NVM_FLASH_JOURNAL (single, ECC, dual), plus the wolfCrypt test and benchmark. Not tested on an H753.

Scope

  • ML-DSA-87 fails on this board after the swap and is not addressed here.
  • The existing LDO path ORs the PLL1 dividers onto their reset values and runs far below 480MHz. Only the SMPS path is corrected here; the LDO path needs an H753 to validate.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The cycle-counter wrap extension loses elapsed time across long sampling gaps, causing incorrect benchmark rates because the STM32H7 app has no periodic sampler.

1 open issue
What changed in this PR

Adds NUCLEO-H755ZI-Q support to the STM32H7 target through an opt-in SMPS supply configuration and 400 MHz clock setup, while preserving the existing default HAL path.

Changes:

  • Adds SMPS supply selection, VOS1 operation, and PLL1 settings for the H755 board.
  • Provides a board configuration and documents Cortex-M4 boot precautions.
  • Enables wolfCrypt tests and benchmarks in the STM32H7 test application, with UART output, heap allocation, and cycle-counter timing.
File Description
test-app/​wolfcrypt_support.c Adds STM32H7 cycle-counter timing and clock-frequency calculation.
test-app/​ARM-stm32h7.ld Reserves heap space for stdio and crypto tests.
test-app/​app_stm32h7.c Integrates optional crypto tests, benchmarks, and UART output.
hal/​stm32h7.h Defines SMPS supply bits and PLL input-range settings.
hal/​stm32h7.c Adds optional supply selection and 400 MHz SMPS clock setup.
docs/​Targets.md Documents H755 configuration, Cortex-M4 precautions, and test options.
config/​examples/​stm32h755.config Adds an SMPS-only NUCLEO-H755ZI-Q configuration.

Review effort: Balanced

Comment thread test-app/wolfcrypt_support.c Outdated
Comment on lines +252 to +253
if (now < h7_cyc_last)
h7_cyc_hi += 0x100000000ULL;
@dgarske dgarske self-assigned this Dec 1, 2026
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.

2 participants