Files
rtems/spec
Moksh Panicker 73ac0c9674 bsps/arm/stm32f4: Add SPI bus driver
Adds an interrupt-driven SPI bus driver for the STM32F4 SPI
peripheral implementing the RTEMS spi_bus API (dev/spi/spi.h).

The STM32F4 SPI has no hardware FIFO - the data register holds
a single byte - so the driver handles one byte per TXE/RXNE
interrupt pair. This is a hardware constraint, not an
implementation choice. DMA support can be added in a future
version.

Supports 8-bit full-duplex master mode, SPI modes 0-3 (all
CPOL/CPHA combinations), MSB/LSB-first, and automatic baud-rate
prescaler selection. Chip select is left to the application
via GPIO.

New files:
- stm32f4xxxx_spi.h: register definitions (RM0090 section 28.5)
- stm32f4-spi.h: public driver interface
- spi.c: driver implementation

stm32f4.h updated with STM32F4_SPI1/2/3 peripheral accessors.
SPI base addresses per RM0090 table 1: SPI1 on APB2 at
0x40013000, SPI2 and SPI3 on APB1 at 0x40003800 and 0x40003C00.

Verified to compile cleanly for arm/stm32f4 and
arm/realview_pbx_a9_qemu with GCC 15.2.0.
2026-06-17 00:45:02 +00:00
..