Zen Peripherals · Serial I/O · brief · 2026-11-04

A drop-in SPI master for talking to flash, sensors, and off-chip devices

The Zen SPI master controller is a Motorola 4-wire SPI master a client instantiates in their SoC to drive serial flash, EEPROM, ADC/DAC converters, sensors, and display or radio modules. It supports all four SPI modes, programmable frame width and clock rate, buffered TX/RX FIFOs, and multi-device chip-select — and attaches to the common peripheral bus with APB4 or AXI4-Lite frontends for drop-in integration. Product / integrator view; every number is sourced from the product datasheet or marked TBC with an owner.

1. SPI in one paragraph

The Zen SPI master is a classic 4-wire SPI controller — SCLK / MOSI / MISO / CSn — that a client attaches to the common Zen peripheral bus and drives from software. It supports all four CPOL/CPHA modes, programmable 4–16-bit frames, MSB- or LSB-first bit order, and a programmable clock divider that sets the serial rate from the system clock. A single shift engine serializes each frame while sampling the return line, so transmit and receive proceed together on the same clock. Independent TX and RX FIFOs decouple software from the bit-serial rate, and up to four active-low chip-selects let one bus serve several devices, selected per transfer. It follows the same struct-typed, synthesizable convention as the rest of the Zen peripheral family, so it drops into an SoC through an APB4 or AXI4-Lite frontend.

4 modesall CPOL/CPHA combinations 0–3
4–16 bitprogrammable frame width
8-deepindependent TX + RX FIFOs
APB4 / AXI4-Litehost attach frontends
hostAPB4 / AXI4-Lite Zen SPI mastershift engine + SCLK TX / RX FIFOs SPI devicesflash / sensors CSR + DATA frame buffer SCLK/MOSI/MISO/CSn
Figure 1. The Zen SPI master sits between the host bus and the off-chip SPI bus: software queues frames through TX/RX FIFOs; the shift engine serializes them onto SCLK/MOSI and samples MISO, selecting devices with CSn.
One bus, several devices. Up to four chip-selects share a single SCLK/MOSI/MISO bus, each device selected per transfer. Chip-select can deassert automatically when the TX FIFO drains (auto-CS) or be held across a multi-frame transaction under software control (manual-CS).
Serial rate is set by *your* clock divider. SCLK is the system clock divided by 2 × (divider + 1), so the fastest SCLK is half the system clock. Throughput scales directly with SCLK; the FIFOs buffer up to eight frames each to relax software deadlines on back-to-back transfers.

2. What it is, at a glance

ElementDetailDefaultStatus
RoleSPI master only (slave mode out of scope for v1)—exists
SPI modesall four CPOL/CPHA combinations (0–3)—exists
Frame widthprogrammable 4–16 bits—exists
Bit orderMSB-first or LSB-first—exists
SCLK ratesystem clock ÷ (2 × (divider + 1))—exists
TX / RX FIFOsindependent, buffered both directions8 eachexists
Chip-selectsactive-low, multi-device, auto- or manual-CS4exists
Interruptsone line, three enable-gated sources—exists
Host frontendsnative peripheral bus · APB4 · AXI4-Lite—exists
Sustained max throughput @ nodeSCLK-bound; timing sign-off downstreamTBCTBC

Sources: Zen SPI product datasheet; as-built RTL.

3. How a client uses it

  1. Instantiate the core with one host frontend (APB4 or AXI4-Lite); wire the four SPI signals (SCLK / MOSI / MISO / CSn) to pads or on-chip devices.
  2. Configure mode, frame width, bit order, and clock divider through the control register; set the chip-select mask for the target device.
  3. Transfer — write frames to queue them into the TX FIFO, read to drain received frames from the RX FIFO. Poll status flags or service the interrupt.
  4. Scale the bus — add devices on shared SCLK/MOSI/MISO, selecting each per transfer, and choose auto- or manual-CS to match the transaction shape.

4. Verification & provenance

Sources read

Sources: Zen SPI product datasheet; as-built RTL.