MAX32666 fixes for old SDK#10733
Open
mattia-moffa wants to merge 2 commits into
Open
Conversation
- Allows streaming SHA implementation to work on the old SDK - Implements TRNG health test as bare-metal since old SDK doesn't implement it
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MAX32666/MAX3266x hardware port to support an older Maxim SDK by (1) providing a bare-metal TRNG health test implementation and (2) adapting the SHA accelerator register access differences needed for streaming SHA on the old SDK.
Changes:
- Map
MXC_TRNG_HealthTestto a new wolfSSL-provided implementation for old SDK builds. - Add an on-demand TRNG health test implementation for old SDK builds.
- Add a compatibility macro to write to the correct TPU SHA input register field (
dinvsdata_in) depending on SDK version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
wolfssl/wolfcrypt/port/maxim/max3266x.h |
Adjusts old-SDK macro mappings for TRNG health test and TPU init. |
wolfcrypt/src/port/maxim/max3266x.c |
Implements old-SDK TRNG health test and updates SHA accelerator register writes for old SDK naming. |
Comments suppressed due to low confidence (1)
wolfssl/wolfcrypt/port/maxim/max3266x.h:159
- In the old-SDK section,
MXC_SYS_PERIPH_CLOCK_TPUis defined twice, which can trigger macro-redefinition warnings (e.g., on Clang with-Wmacro-redefined) and makes the configuration harder to reason about. Keep a single definition.
#define MXC_TPU_Init(clock) SYS_TPU_Init(NULL)
#define MXC_TPU_Shutdown SYS_TPU_Shutdown
#define MXC_SYS_PERIPH_CLOCK_TPU SYS_PERIPH_CLOCK_TPU
#define MXC_SYS_PERIPH_CLOCK_TPU SYS_PERIPH_CLOCK_TPU
#define MXC_SYS_PERIPH_CLOCK_TRNG SYS_PERIPH_CLOCK_TRNG
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Jenkins retest this please |
1 similar comment
Member
Author
|
Jenkins retest this please |
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.
Description
Testing
Temporary test firmware: https://moffa.xyz/tmp/test_max32666.tar.gz