SPI Slave (CPOL=0, CPHA=0)

Beginner
Sign in →
00:00
01General Operation

The module implements an SPI slave in mode 0 (CPOL=0, CPHA=0). Data is sampled on the rising edge of SCLK. When Slave Select is active (low), the slave receives 32 bits serially on MOSI and presents them in parallel on the output. A signal indicates reception completion.

Reset is asynchronous and active-low.

  • SCLK signal must be resynchronized into the system clock domain
  • Bit counter and register are reset when SS_N is inactive
02Interface
SignalDirectionWidthDescription
i_clkInput1 bitSystem clock
i_reset_nInput1 bitActive-low async reset
i_sclkInput1 bitSPI clock (external domain)
i_ss_nInput1 bitActive-low Slave Select
i_MOSIInput1 bitMaster Out Slave In
o_r_dataOutput32 bitsReceived data
o_topOutput1 bitData valid pulse (1 sys cycle)