Skip to content

[stm32wba, crypto] Implement support for the STM32WBA. Provide helper functions for crypto algos#32

Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:stm32wba
Apr 21, 2026
Merged

[stm32wba, crypto] Implement support for the STM32WBA. Provide helper functions for crypto algos#32
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:stm32wba

Conversation

@AlexLanzano
Copy link
Copy Markdown
Member

No description provided.

@AlexLanzano AlexLanzano self-assigned this Apr 21, 2026
Copilot AI review requested due to automatic review settings April 21, 2026 19:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.h with 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.h from 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.h instead of stm32wb_uart.h.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/crypto/stm32wb_aes.c Outdated
Comment thread src/crypto/stm32wb_aes.c
Comment thread wolfHAL/crypto/crypto.h Outdated
Comment thread wolfHAL/crypto/crypto.h
Comment thread wolfHAL/crypto/crypto.h
Comment thread src/dma/stm32wba_gpdma.c Outdated
Comment thread boards/stm32wba55cg_nucleo/ivt.c
Comment thread src/rng/stm32wba_rng.c Outdated
Comment thread tests/main.c Outdated
Comment thread src/uart/stm32wba_uart_dma.c
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread tests/main.c Outdated
@AlexLanzano AlexLanzano merged commit fabe894 into wolfSSL:main Apr 21, 2026
18 checks passed
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