Fix example board clock config. Zeroize on error returns.#52
Merged
Conversation
AlexLanzano
commented
Jul 9, 2026
Member
- Fix the PLL configuration on the stm32wba example board config to properly output at 100MHz
- Make sure to zeroize any key/iv data on any failure in the crypto drivers
There was a problem hiding this comment.
Pull request overview
This PR corrects the STM32WBA55 Nucleo example board’s PLL1 settings to reliably produce a 100 MHz SYSCLK, and improves crypto-driver error handling by zeroizing key/IV material in more failure paths.
Changes:
- Fix PLL1 “N” configuration and document the RM0493 “value-1 encoded” divider/multiplier fields to achieve 100 MHz SYSCLK.
- Zeroize AES/CRYP peripheral key+IV registers on additional error exits (timeouts and invalid finalize parameters) in STM32WB and STM32N6 crypto drivers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/crypto/stm32wb_aes.c | Adds ZeroKeyIv() calls on more AES error paths and cleanup/invalid-finalize returns. |
| src/crypto/stm32n6_cryp.c | Adds ZeroKeyIv() calls when finalize() rejects invalid tag parameters. |
| boards/stm32wba55cg_nucleo/board.c | Adjusts PLL1 N field and improves clocking comment to match encoded register semantics for 100 MHz SYSCLK. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.