Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 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 on lines
+252
to
+253
| if (now < h7_cyc_last) | ||
| h7_cyc_hi += 0x100000000ULL; |
…z clock and wolfCrypt test app hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.binforstm32h7.configis byte-identical before and after.What it adds
hal/stm32h7.c,hal/stm32h7.h-PWR_SUPPLY_CONFIGselects thePWR_CR3supply, written only while the register holds its reset value.STM32H7_SMPS_ONLYkeeps VOS1 and programs PLL1 for 400MHz from the 8MHz HSE bypass clock.config/examples/stm32h755.config- thestm32h7.configlayout with both defines.test-app/-WOLFCRYPT_TEST=1andWOLFCRYPT_BENCHMARK=1for 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