[stm32wba, crypto] Implement support for the STM32WBA. Provide helper functions for crypto algos#32
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Apr 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds STM32WBA platform/board support and expands the crypto API with hash/HMAC algorithms plus convenience wrappers, including a DMA-backed UART implementation and a new GPDMA driver.
Changes:
- Introduce STM32WBA device/platform headers and alias drivers (GPIO/I2C/UART/IWDG/WWDG/AES) plus new RCC/Flash/RNG/HASH/GPDMA implementations.
- Extend
crypto.hwith SHA-1/224/256 and HMAC variants, update arg types, and add inline convenience wrappers; update crypto tests accordingly. - Add NUCLEO-WBA55CG board bring-up (linker script, IVT/startup, board init) and tweak UART/test output behavior.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfHAL/watchdog/stm32wba_wwdg.h | WBA WWDG alias header to WB driver + re-exported constants |
| wolfHAL/watchdog/stm32wba_iwdg.h | WBA IWDG alias header to WB driver + re-exported constants |
| wolfHAL/uart/stm32wba_uart_dma.h | Public config/API for WBA UART driver using GPDMA |
| wolfHAL/uart/stm32wba_uart.h | WBA UART alias header to WB driver + BRR helpers |
| wolfHAL/spi/stm32wba_spi.h | WBA SPI alias header to H5 SPI driver |
| wolfHAL/rng/stm32wba_rng.h | WBA RNG driver configuration and API |
| wolfHAL/platform/st/stm32wba55cg.h | Device-instance convenience macros and base addresses for STM32WBA55CG |
| wolfHAL/platform/arm/cortex_m33.h | Add NVIC regmap/driver macros for Cortex-M33 platform |
| wolfHAL/i2c/stm32wba_i2c.h | WBA I2C alias header to WB driver |
| wolfHAL/gpio/stm32wba_gpio.h | WBA GPIO alias header to WB driver + re-exported pin/mode macros |
| wolfHAL/flash/stm32wba_flash.h | WBA flash driver configuration and API |
| wolfHAL/endian.h | Add partial 32-bit endian load helpers |
| wolfHAL/dma/stm32wba_gpdma.h | Public types/APIs for WBA GPDMA driver |
| wolfHAL/crypto/stm32wba_hash.h | Public API for WBA HASH accelerator driver |
| wolfHAL/crypto/stm32wba_aes.h | WBA AES alias header to WB AES driver |
| wolfHAL/crypto/crypto.h | Add SHA/HMAC opIds, new args structs, widen pointer types, add per-algo wrappers |
| wolfHAL/clock/stm32wba_rcc.h | RCC types/APIs for WBA (PLL1 + clock gates + extensions) |
| tests/main.c | Change UART output routine and SysTick handling during transmit |
| tests/crypto/test_crypto.c | Add known-answer vectors for AES + SHA/HMAC; use new wrappers; gating by config defines |
| src/watchdog/stm32wba_wwdg.c | Stub include to compile WB WWDG under WBA name |
| src/watchdog/stm32wba_iwdg.c | Stub include to compile WB IWDG under WBA name |
| src/uart/stm32wba_uart_dma.c | Implement UART send/recv (blocking + async) using GPDMA |
| src/uart/stm32wba_uart.c | Stub include to compile WB UART under WBA name |
| src/uart/stm32wb_uart.c | Enable FIFO mode in UART init |
| src/spi/stm32wba_spi.c | Stub include to compile H5 SPI under WBA name |
| src/rng/stm32wba_rng.c | Implement WBA RNG init/deinit/generate |
| src/i2c/stm32wba_i2c.c | Stub include to compile WB I2C under WBA name |
| src/gpio/stm32wba_gpio.c | Stub include to compile WB GPIO under WBA name |
| src/flash/stm32wba_flash.c | Implement WBA flash read/write/erase/latency routines |
| src/dma/stm32wba_gpdma.c | Implement WBA GPDMA init/config/start/IRQ handler |
| src/crypto/stm32wba_hash.c | Implement SHA/HMAC dispatch via HASH peripheral |
| src/crypto/stm32wba_aes.c | Stub include to compile WB AES under WBA name |
| src/crypto/stm32wb_aes.c | Add build-time algo gating; adjust pointer types; refactor for void* args |
| src/clock/stm32wba_rcc.c | Implement WBA RCC init/deinit + clock gate enable/disable + extensions |
| docs/writing_a_driver.md | Update crypto driver documentation to StartOp/Process/EndOp model + wrappers |
| boards/stm32wba55cg_nucleo/linker.ld | New linker script for WBA55CG Nucleo |
| boards/stm32wba55cg_nucleo/ivt.c | New vector table + reset handler + minimal libc stubs |
| boards/stm32wba55cg_nucleo/board.h | Board globals and pin/flash constants |
| boards/stm32wba55cg_nucleo/board.c | Full board bring-up (clock/pwr/flash latency/peripherals/DMA IRQs) |
| boards/stm32wba55cg_nucleo/Makefile.inc | Board build flags, sources, and enabled crypto algos |
| boards/stm32wb55xx_nucleo/Makefile.inc | Enable specific AES algorithm flags for WB55 board build |
| boards/peripheral/peripheral.c | Simplify sensor init/deinit loop preprocessor guards |
| .claude/skills/port-stm32-platform/SKILL.md | Add a porting “skill” doc/checklist for STM32 platform bring-up |
Comments suppressed due to low confidence (2)
wolfHAL/platform/arm/cortex_m33.h:1
- Including
cortex_m4_nvic.hfrom a Cortex-M33 platform header is confusing and makes it harder to reason about core-specific support. If the NVIC implementation is truly core-agnostic, consider renaming/moving it to a generic NVIC header; otherwise include a Cortex-M33-specific NVIC header to match the platform.
wolfHAL/uart/stm32wba_uart_dma.h:1 - This WBA-specific UART-DMA public header includes the WB UART header directly. To keep platform layering consistent (and to ensure any WBA-specific aliasing/mapping is applied uniformly), include
wolfHAL/uart/stm32wba_uart.hinstead ofstm32wb_uart.h.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ece6f97 to
fcb5026
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… functions for crypto algos
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.
No description provided.