4.10. SSI
Synopsys Documentation
Synopsys Proprietary. Used with permission.
RP2040 has a Synchronous Serial Interface (SSI) controller which appears on the QSPI pins and is used to communicate with external Flash devices. The SSI forms part of the XIP block.
The SSI controller is based on a configuration of the Synopsys DW_apb_ssi IP (v4.01a).
4.10.1. Overview
In order for the DW_apb_ssi to connect to a serial-master or serial-slave peripheral device, the peripheral must have a least one of the following interfaces:
Motorola Serial Peripheral Interface (SPI)
A four-wire, full-duplex serial protocol from Motorola. There are four possible combinations for the serial clock phase and polarity. The clock phase (SCPH) determines whether the serial transfer begins with the falling edge of the slave select signal or the first edge of the serial clock. The slave select line is held high when the DW_apb_ssi is idle or disabled.
Texas Instruments Serial Protocol (SSP)
A four-wire, full-duplex serial protocol. The slave select line used for SPI and Microwire protocols doubles as the frame indicator for the SSP protocol.
National Semiconductor Microwire
A half-duplex serial protocol, which uses a control word transmitted from the serial master to the target serial slave.
You can program the FRF (frame format) bit field in the Control Register 0 (CTRLR0) to select which protocol is used.
The serial protocols supported by the DW_apb_ssi allow for serial slaves to be selected or addressed using either hardware or software. When implemented in hardware, serial slaves are selected under the control of dedicated hardware select lines. The number of select lines generated from the serial master is equal to the number of serial slaves present on the bus. The serial-master device asserts the select line of the target serial slave before data transfer begins. This architecture is illustrated in Figure 118 .
When implemented in software, the input select line for all serial slave devices should originate from a single slave select output on the serial master. In this mode it is assumed that the serial master has only a single slave select output. If there are multiple serial masters in the system, the slave select output from all masters can be logically ANDed to generate a single slave select input for all serial slave devices. The main program in the software domain controls selection of the target slave device; this architecture is illustrated in Figure 118 . Software would use the SSIENR register in all slaves in order to control which slave is to respond to the serial transfer request from the master device.
The DW_apb_ssi does not enforce hardware or software control for serial-slave device selection. You can configure the DW_apb_ssi for either implementation, illustrated in Figure 118 .
Figure 118.
Hardware/Software
Slave Selection.

Diagram A (Hardware Selection): A Master block (green) has multiple slave select outputs labeled
ss_0 and
ss_x. Each output connects to a corresponding slave select input labeled
ss on a Slave block (blue). Multiple Slave blocks are shown, each with its own dedicated
ss line from the Master. A shared Data Bus connects the Master to all Slaves.
Diagram B (Software Selection): A Master block (green) has a single slave select output labeled
ss. This output connects to the slave select input labeled
ss on all Slave blocks (blue). Multiple Slave blocks share the same
ss line from the Master. A shared Data Bus connects the Master to all Slaves.
Legend:
ss= slave select line
4.10.2. Features
The DW_apb_ssi is a configurable and programmable component that is a full-duplex master serial interface. The host processor accesses data, control, and status information on the DW_apb_ssi through the APB interface. The DW_apb_ssi also interfaces with the DMA Controller for bulk data transfer.
The DW_apb_ssi is configured as a serial master. The DW_apb_ssi can connect to any serial-slave peripheral device using one of the following interfaces:
- • Motorola Serial Peripheral Interface (SPI)
- • Texas Instruments Serial Protocol (SSP)
- • National Semiconductor Microwire
On RP2040, the DW_apb_ssi is a component of the flash execute-in-place subsystem (see Section 2.6.3 ), and provides communication with an external SPI, dual-SPI or quad-SPI flash device.
4.10.2.1. IO connections
The SSI controller connects to the following pins:
- • QSPI_SCLK Connected to output clock sclk_out
- • QSPI_SS_N Connected to chip select ss_o_n
- • QSPI_SD[3:0] Connected to data bus txd and rx
Some pins on the IP are tied off as not used:
- • ss_in_n is tied high
Clock connections are as follows:
- • pclk and sclk are driven from clk_sys
4.10.3. IP Modifications
The following modifications were made to the Synopsys DW_apb_ssi hardware:
- 1. XIP accesses are byte-swapped, such that the least-addressed byte is in the least-significant position
- 2. When SPI_CTRLR0_INST_L is 0, the XIP instruction field is appended to the end of the address for XIP accesses, rather than prepended to the beginning
- 3. The reset value of DMARDLR is increased from 0 to 4. The SSI to DMA handshaking on RP2040 requests only single transfers or bursts of four, depending on whether the RX FIFO level has reached DMARDLR , so DMARDLR should not be changed from this value.
The first of these changes allows mixed-size accesses by a little-endian busmaster, such as the RP2040 DMA, or the Cortex-M0+ configuration used on RP2040. Note that this only applies to XIP accesses (RP2040 system addresses in the range 0x10000000 to 0x13ffffff ), not to direct access to the DW_apb_ssi FIFOs. When accessing the SSI directly, it may be necessary for software to swap bytes manually, or to use the RP2040 DMA's byte swap feature.
The second supports issuing of continuation bits following the XIP address, so that command-prefix-free XIP modes can be supported (e.g. EBh Quad I/O Fast Read on Winbond devices), for greater performance. For example, the following configuration would be used to issue a standard 03h serial read command for each access to the XIP address window:
- • SPI_CTRLR0_INST_L = 8 bits
- • SPI_CTRLR0_ADDR_L = 24 bits
- • SPI_CTRLR0_XIP_CMD = 0x03
This will first issue eight command bits ( 0x03 ), then issue 24 address bits, then clock in the data bits. The configuration used for EBh quad read, after the flash has entered the XIP state, would be:
- • SPI_CTRLR0_INST_L = 0
- • SPI_CTRLR0_ADDR_L = 32 bits
- • SPI_CTRLR0_XIP_CMD = 0xa0 (continuation code on W25Qx devices)
For each XIP access, the DW_apb_ssi will issue 32 "address" bits, consisting of the 24 LSBs of the RP2040 system bus
address, followed by the 8-bit continuation code
0xa0. No command prefix is issued.
4.10.3.1. Example of Target Slave Selection Using Software
The following example is pseudo code that illustrates how to use software to select the target slave.
1 int main() {
2 disable_all_serial_devices(); ①
3 initialize_mst(ssi_mst_1); ②
4 initialize_slv(ssi_slv_1); ③
5 start_serial_xfer(ssi_mst_1); ④
6 }① This function sets the SSLEN bit to logic '0' in the SSIENR register of each device on the serial bus.
② This function initializes the master device for the serial transfer;
- 1. Write CTRLR0 to match the required transfer
- 2. If transfer is receive only write number of frames into CTRLR1
- 3. Write BAUDR to set the transfer baud rate.
- 4. Write TXFTLR and RXFTLR to set FIFO threshold levels
- 5. Write IMR register to set interrupt masks
- 6. Write SER register bit[0] to logic '1'
- 7. Write SSIENR register bit[0] to logic '1' to enable the master.
③ This function initializes the target slave device (slave 1 in this example) for the serial transfer;
- 1. Write CTRLR0 to match the required transfer
- 2. Write TXFTLR and RXFTLR to set FIFO threshold levels
- 3. Write IMR register to set interrupt masks
- 4. Write SSIENR register bit[0] to logic '1' to enable the slave.
- 5. If the slave is to transmit data, write data into TX FIFO. Now the slave is enabled and awaiting an active level on its ss_in_n input port. Note all other serial slaves are disabled (SSLEN=0) and therefore will not respond to an active level on their ss_in_n port.
④ This function begins the serial transfer by writing transmit data into the master's TX FIFO. User can poll the busy status with a function or use an ISR to determine when the serial transfer has completed.
4.10.4. Clock Ratios
The maximum frequency of the bit-rate clock (sclk_out) is one-half the frequency of ssi_clk. This allows the shift control logic to capture data on one clock edge of sclk_out and propagate data on the opposite edge.
Figure 119 illustrates the maximum ratio between sclk_out and ssi_clk.
Figure 119. Maximum \( sclk\_out/ssi\_clk \) Ratio.

The \( sclk\_out \) line toggles only when an active transfer is in progress. At all other times it is held in an inactive state, as defined by the serial protocol under which it operates.
The frequency of \( sclk\_out \) can be derived from the following equation:
SCKDV is a bit field in the programmable register BAUDR, holding any even value in the range 0 to 65,534. If SCKDV is 0, then \( sclk\_out \) is disabled.
4.10.4.1. Frequency Ratio Summary
A summary of the frequency ratio restrictions between the bit-rate clock ( \( sclk\_out \) ) and the DW_apb_ssi peripheral clock ( \( ssi\_clk \) ) are as follows:
- • \( F_{ssi\_clk} \geq 2 \times (maximum F_{sclk\_out}) \)
4.10.5. Transmit and Receive FIFO Buffers
The FIFO buffers used by the DW_apb_ssi are internal D-type flip-flops that are 16 entries deep. The width of both transmit and receive FIFO buffers is fixed at 32 bits, due to the serial specifications, which state that a serial transfer (data frame) can be 4 to 16/32 bits in length. Data frames that are less than 32 bits must be right-justified when written into the transmit FIFO buffer. The shift control logic automatically right-justifies receive data in the receive FIFO buffer.
Each data entry in the FIFO buffers contains a single data frame. It is impossible to store multiple data frames in a single FIFO location; for example, you may not store two 8-bit data frames in a single FIFO location. If an 8-bit data frame is required, the upper bits of the FIFO entry are ignored or unused when the serial shifter transmits the data.
i NOTE
The transmit and receive FIFO buffers are cleared when the DW_apb_ssi is disabled (SSI_EN = 0) or when it is reset (presetrn).
The transmit FIFO is loaded by APB write commands to the DW_apb_ssi data register (DR). Data are popped (removed) from the transmit FIFO by the shift control logic into the transmit shift register. The transmit FIFO generates a FIFO empty interrupt request ( \( ssi\_txe\_intr \) ) when the number of entries in the FIFO is less than or equal to the FIFO threshold value. The threshold value, set through the programmable register TXFTLR, determines the level of FIFO entries at which an interrupt is generated. The threshold value allows you to provide early indication to the processor that the transmit FIFO is nearly empty. A transmit FIFO overflow interrupt ( \( ssi\_txo\_intr \) ) is generated if you attempt to write data into an already full transmit FIFO.
Data are popped from the receive FIFO by APB read commands to the DW_apb_ssi data register (DR). The receive FIFO is loaded from the receive shift register by the shift control logic. The receive FIFO generates a FIFO-full interrupt request ( \( ssi\_rxf\_intr \) ) when the number of entries in the FIFO is greater than or equal to the FIFO threshold value plus one. The threshold value, set through programmable register RXFTLR, determines the level of FIFO entries at which an interrupt is generated.
The threshold value allows you to provide early indication to the processor that the receive FIFO is nearly full. A receive FIFO overrun interrupt ( \( ssi\_rxo\_intr \) ) is generated when the receive shift logic attempts to load data into a completely full receive FIFO. However, this newly received data are lost. A receive FIFO underflow interrupt ( \( ssi\_rxu\_intr \) ) is generated if
you attempt to read from an empty receive FIFO. This alerts the processor that the read data are invalid.
Table 577 provides description for different Transmit FIFO Threshold values.
Table 577. Transmit
FIFO Threshold (TFT)
Decode Values
| TFT Value | Description |
|---|---|
| 0000_0000 | ssi_txe_intr is asserted when zero data entries are present in transmit FIFO |
| 0000_0001 | ssi_txe_intr is asserted when one or less data entry is present in transmit FIFO |
| 0000_0010 | ssi_txe_intr is asserted when two or less data entries are present in transmit FIFO |
| ... | ... |
| 0000_1101 | ssi_txe_intr is asserted when 13 or less data entries are present in transmit FIFO |
| 0000_1110 | ssi_txe_intr is asserted when 14 or less data entries are present in transmit FIFO |
| 0000_1111 | ssi_txe_intr is asserted when 15 or less data entries are present in transmit FIFO |
Table 578 provides description for different Receive FIFO Threshold values.
Table 578. Receive
FIFO Threshold (RFT)
Decode Values
| RFT Value | Description |
|---|---|
| 0000_0000 | ssi_rxf_intr is asserted when one or more data entry is present in receive FIFO |
| 0000_0001 | ssi_rxf_intr is asserted when two or more data entries are present in receive FIFO |
| 0000_0010 | ssi_rxf_intr is asserted when three or more data entries are present in receive FIFO |
| ... | ... |
| 0000_1101 | ssi_rxf_intr is asserted when 14 or more data entries are present in receive FIFO |
| 0000_1110 | ssi_rxf_intr is asserted when 15 or more data entries are present in receive FIFO |
| 0000_1111 | ssi_rxf_intr is asserted when 16 data entries are present in receive FIFO |
4.10.6. 32-Bit Frame Size Support
The IP is configured to set the maximum programmable value in of data frame size to 32 bits. As a result the following features exist:
- • dfs_32 (CTRLR0[20:16]) are valid, which contains the value of data frame size. The new register field holds the values 0 to 31. The dfs (CTRLR0[3:0]) is invalid and writing to this register has no effect.
- • The receive and transmit FIFO widths are 32 bits.
- • All 32 bits of the data register are valid.
4.10.7. SSI Interrupts
The DW_apb_ssi supports combined and individual interrupt requests, each of which can be masked. The combined interrupt request is the ORed result of all other DW_apb_ssi interrupts after masking. Only the combined interrupt request is routed to the Interrupt Controller. All DW_apb_ssi interrupts are level interrupts and are active high.
The DW_apb_ssi interrupts are described as follows:
Transmit FIFO Empty Interrupt (ssi_txe_intr)
Set when the transmit FIFO is equal to or below its threshold value and requires service to prevent an under-run. The threshold value, set through a software-programmable register, determines the level of transmit FIFO entries at which an interrupt is generated. This interrupt is cleared by hardware when data are written into the transmit FIFO buffer, bringing it over the threshold level.
Transmit FIFO Overflow Interrupt (ssi_txo_intr)Set when an APB access attempts to write into the transmit FIFO after it has been completely filled. When set, data written from the APB is discarded. This interrupt remains set until you read the transmit FIFO overflow interrupt clear register (TXOICR).
Receive FIFO Full Interrupt (ssi_rxf_intr)Set when the receive FIFO is equal to or above its threshold value plus 1 and requires service to prevent an overflow. The threshold value, set through a software-programmable register, determines the level of receive FIFO entries at which an interrupt is generated. This interrupt is cleared by hardware when data are read from the receive FIFO buffer, bringing it below the threshold level.
Receive FIFO Overflow Interrupt (ssi_rxo_intr)Set when the receive logic attempts to place data into the receive FIFO after it has been completely filled. When set, newly received data are discarded. This interrupt remains set until you read the receive FIFO overflow interrupt clear register (RXOICR).
Receive FIFO Underflow Interrupt (ssi_rxu_intr)Set when an APB access attempts to read from the receive FIFO when it is empty. When set, 0s are read back from the receive FIFO. This interrupt remains set until you read the receive FIFO underflow interrupt clear register (RXUICR).
Multi-Master Contention Interrupt (ssi_mst_intr)Present only when the DW_apb_ssi component is configured as a serial-master device. The interrupt is set when another serial master on the serial bus selects the DW_apb_ssi master as a serial-slave device and is actively transferring data. This informs the processor of possible contention on the serial bus. This interrupt remains set until you read the multi-master interrupt clear register (MSTICR).
Combined Interrupt Request (ssi_intr)OR'ed result of all the above interrupt requests after masking. To mask this interrupt signal, you must mask all other DW_apb_ssi interrupt requests.
4.10.8. Transfer Modes
When transferring data on the serial bus, the DW_apb_ssi operates in the modes discussed in this section. The transfer mode (TMOD) is set by writing to control register 0 (CTRLR0).
i NOTE
The transfer mode setting does not affect the duplex of the serial transfer. TMOD is ignored for Microwire transfers, which are controlled by the MWCR register.
4.10.8.1. Transmit and Receive
When TMOD = 00b, both transmit and receive logic are valid. The data transfer occurs as normal according to the selected frame format (serial protocol). Transmit data are popped from the transmit FIFO and sent through the txd line to the target device, which replies with data on the rxd line. The receive data from the target device is moved from the receive shift register into the receive FIFO at the end of each data frame.
4.10.8.2. Transmit Only
When TMOD = 01b, the receive data are invalid and should not be stored in the receive FIFO. The data transfer occurs as normal, according to the selected frame format (serial protocol). Transmit data are popped from the transmit FIFO and sent through the txd line to the target device, which replies with data on the rxd line. At the end of the data frame, the receive shift register does not load its newly received data into the receive FIFO. The data in the receive shift register is
overwritten by the next transfer. You should mask interrupts originating from the receive logic when this mode is entered.
4.10.8.3. Receive Only
When
TMOD = 10b, the transmit data are invalid. When configured as a slave, the transmit FIFO is never popped in Receive Only mode. The
txd output remains at a constant logic level during the transmission. The data transfer occurs as normal according to the selected frame format (serial protocol). The receive data from the target device is moved from the receive shift register into the receive FIFO at the end of each data frame. You should mask interrupts originating from the transmit logic when this mode is entered.
4.10.8.4. EEPROM Read
i NOTE
This transfer mode is only valid for master configurations.
When
TMOD = 11b, the transmit data is used to transmit an opcode and/or an address to the EEPROM device. Typically this takes three data frames (8-bit opcode followed by 8-bit upper address and 8-bit lower address). During the transmission of the opcode and address, no data is captured by the receive logic (as long as the
DW_apb_ssi master is transmitting data on its
txd line, data on the
rx line is ignored). The
DW_apb_ssi master continues to transmit data until the transmit FIFO is empty. Therefore, you should ONLY have enough data frames in the transmit FIFO to supply the opcode and address to the EEPROM. If more data frames are in the transmit FIFO than are needed, then read data is lost.
When the transmit FIFO becomes empty (all control information has been sent), data on the receive line (
rx) is valid and is stored in the receive FIFO; the
txd output is held at a constant logic level. The serial transfer continues until the number of data frames received by the
DW_apb_ssi master matches the value of the
NDF field in the
CTRLR1 register + 1.
i NOTE
EEPROM read mode is not supported when the
DW_apb_ssi is configured to be in the SSP mode.
4.10.9. Operation Modes
The
DW_apb_ssi can be configured in the fundamental modes of operation discussed in this section.
4.10.9.1. Serial Master Mode
This mode enables serial communication with serial-slave peripheral devices. When configured as a serial-master device, the
DW_apb_ssi initiates and controls all serial transfers.
Figure 120
shows an example of the
DW_apb_ssi configured as a serial master with all other devices on the serial bus configured as serial slaves.
Figure 120.
DW_apb_ssi
Configured as Master
Device
![Figure 120: DW_apb_ssi Master 1 connected to Slave Peripheral 1 and Slave Peripheral n. The diagram shows the internal signals of the master (txd, ssi_oe_n, rxd, sclk_out, ss_n[0], ss_n[1], ss_in_n) and how they are connected to the slave peripherals (DI, DO, SCLK, SS). A Glue Logic block is shown between the master and the slaves. A note states: 'Should be driven to inactive level (protocol-dependent) in single master systems; may not need glue logic'.](/RP2040/c742b650efac1e133860d9d0ee4a8d7d_img.jpg)
Should be driven to inactive level
(protocol-dependent) in single master
systems; may not need glue logic
The serial bit-rate clock, generated and controlled by the DW_apb_ssi, is driven out on the sclk_out line. When the DW_apb_ssi is disabled (SSI_EN = 0), no serial transfers can occur and sclk_out is held in “inactive” state, as defined by the serial protocol under which it operates.
Multiple master configuration is not supported.
4.10.9.1.1. RXD Sample Delay
When the DW_apb_ssi is configured as a master, additional logic can be included in the design in order to delay the default sample time of the rxd signal. This additional logic can help to increase the maximum achievable frequency on the serial bus.
Round trip routing delays on the sclk_out signal from the master and the rxd signal from the slave can mean that the timing of the rxd signal—as seen by the master—has moved away from the normal sampling time. Figure 121 illustrates this situation.
Figure 121. Effects of
Round-Trip Routing
Delays on sclk_out
Signal

baud-rate=4
The Slave uses the sclk_out signal from the master as a strobe in order to drive rxd signal data onto the serial bus. Routing and sampling delays on the sclk_out signal by the slave device can mean that the rxd bit has not stabilized to the correct value before the master samples the rxd signal. Figure 121 shows an example of how a routing delay on the rxd signal can result in an incorrect rxd value at the default time when the master samples the port.
Without the RXD Sample Delay logic, the user would have to increase the baud-rate for the transfer in order to ensure that the setup times on the rxd signal are within range; this results in reducing the frequency of the serial interface.
When the RXD Sample Delay logic is included, the user can dynamically program a delay value in order to move the sampling time of the rxd signal equal to a number of ssi_clk cycles from the default.
The sample delay logic has a resolution of one ssi_clk cycle. Software can “train” the serial bus by coding a loop that continually reads from the slave and increments the master’s RXD Sample Delay value until the correct data is received by the master.
4.10.9.1.2. Data Transfers
Data transfers are started by the serial-master device. When the DW_apb_ssi is enabled (SSI_EN=1), at least one valid data entry is present in the transmit FIFO and a serial-slave device is selected. When actively transferring data, the busy flag (BUSY) in the status register (SR) is set. You must wait until the busy flag is cleared before attempting a new serial transfer.
i NOTE
The BUSY status is not set when the data are written into the transmit FIFO. This bit gets set only when the target slave has been selected and the transfer is underway. After writing data into the transmit FIFO, the shift logic does not begin the serial transfer until a positive edge of the sclk_out signal is present. The delay in waiting for this positive edge depends on the baud rate of the serial transfer. Before polling the BUSY status, you should first poll the TFE status (waiting for 1) or wait for \( BAUDR * ssi\_clk \) clock cycles.
4.10.9.1.3. Master SPI and SSP Serial Transfers
When the transfer mode is “transmit and receive” or “transmit only” (TMOD = 00b or TMOD = 01b, respectively), transfers are terminated by the shift control logic when the transmit FIFO is empty. For continuous data transfers, you must ensure that the transmit FIFO buffer does not become empty before all the data have been transmitted. The transmit FIFO threshold level (TXFTLR) can be used to early interrupt (ssi_txe_intr) the processor indicating that the transmit FIFO buffer is nearly empty. When a DMA is used for APB accesses, the transmit data level (DMATDLR) can be used to early request (dma_tx_req) the DMA Controller, indicating that the transmit FIFO is nearly empty. The FIFO can then be refilled with data to continue the serial transfer. The user may also write a block of data (at least two FIFO entries) into the transmit FIFO before enabling a serial slave. This ensures that serial transmission does not begin until the number of data-frames that make up the continuous transfer are present in the transmit FIFO.
When the transfer mode is “receive only” (TMOD = 10b), a serial transfer is started by writing one “dummy” data word into the transmit FIFO when a serial slave is selected. The txd output from the DW_apb_ssi is held at a constant logic level for the duration of the serial transfer. The transmit FIFO is popped only once at the beginning and may remain empty for the duration of the serial transfer. The end of the serial transfer is controlled by the “number of data frames” (NDF) field in control register 1 (CTRLR1).
If, for example, you want to receive 24 data frames from a serial-slave peripheral, you should program the NDF field with the value 23; the receive logic terminates the serial transfer when the number of frames received is equal to the NDF value + 1. This transfer mode increases the bandwidth of the APB bus as the transmit FIFO never needs to be serviced during the transfer. The receive FIFO buffer should be read each time the receive FIFO generates a FIFO full interrupt request to prevent an overflow.
When the transfer mode is “eeprom_read” (TMOD = 11b), a serial transfer is started by writing the opcode and/or address into the transmit FIFO when a serial slave (EEPROM) is selected. The opcode and address are transmitted to the EEPROM device, after which read data is received from the EEPROM device and stored in the receive FIFO. The end of the serial transfer is controlled by the NDF field in the control register 1 (CTRLR1).
NOTEEEPROM read mode is not supported when the DW_apb_ssi is configured to be in the SSP mode.
The receive FIFO threshold level (RXFTLR) can be used to give early indication that the receive FIFO is nearly full. When a DMA is used for APB accesses, the receive data level (DMARDLR) can be used to early request (dma_rx_req) the DMA Controller, indicating that the receive FIFO is nearly full.
A typical software flow for completing an SPI or SSP serial transfer from the DW_apb_ssi serial master is outlined as follows:
- 1. If the DW_apb_ssi is enabled, disable it by writing 0 to the SSI Enable register (SSIENR).
- 2. Set up the DW_apb_ssi control registers for the transfer; these registers can be set in any order.
- ◦ Write Control Register 0 (CTRLR0). For SPI transfers, the serial clock polarity and serial clock phase parameters must be set identical to target slave device.
- ◦ If the transfer mode is receive only, write CTRLR1 (Control Register 1) with the number of frames in the transfer minus 1; for example, if you want to receive four data frames, if you want to receive four data frames, write '3' into CTRLR1.
- ◦ Write the Baud Rate Select Register (BAUDR) to set the baud rate for the transfer.
- ◦ Write the Transmit and Receive FIFO Threshold Level registers (TXFTLR and RXFTLR, respectively) to set FIFO threshold levels.
- ◦ Write the IMR register to set up interrupt masks.
- ◦ The Slave Enable Register (SER) register can be written here to enable the target slave for selection. If a slave is enabled here, the transfer begins as soon as one valid data entry is present in the transmit FIFO. If no slaves are enabled prior to writing to the Data Register (DR), the transfer does not begin until a slave is enabled.
- 3. Enable the DW_apb_ssi by writing 1 to the SSIENR register.
- 4. Write data for transmission to the target slave into the transmit FIFO (write DR). If no slaves were enabled in the SER register at this point, enable it now to begin the transfer.
- 5. Poll the BUSY status to wait for completion of the transfer. The BUSY status cannot be polled immediately.
- 6. If a transmit FIFO empty interrupt request is made, write the transmit FIFO (write DR). If a receive FIFO full interrupt request is made, read the receive FIFO (read DR).
- 7. The transfer is stopped by the shift control logic when the transmit FIFO is empty. If the transfer mode is receive only (TMOD = 10b), the transfer is stopped by the shift control logic when the specified number of frames have been received. When the transfer is done, the BUSY status is reset to 0.
- 8. If the transfer mode is not transmit only (TMOD != 01b), read the receive FIFO until it is empty.
- 9. Disable the DW_apb_ssi by writing 0 to SSIENR.
Figure 122 shows a typical software flow for starting a DW_apb_ssi master SPI/SSP serial transfer. The diagram also shows the hardware flow inside the serial-master component.
Figure 122.
DW_apb_ssi Master
SPI/SSP Transfer Flow

graph TD
subgraph Software_Flow [Software Flow]
IDLE1([IDLE]) --> Disable[Disable DW_apb_ssi]
Disable --> Configure[Configure Master by writing CTRLR0, CTRLR1, BAUDR, TXFTLR, RXFTLR, IMR, SER, SPL, CTRLR0 (if Dual /Quad SPI)]
Configure --> Enable[Enable DW_apb_ssi]
Enable --> Write[Write data to Tx FIFO]
Write --> Transfer[Transfer in progress]
Transfer --> Interrupt{Interrupt?}
Interrupt -- Yes --> ISR([Interrupt Service Routine])
ISR --> Transfer
Interrupt -- No --> Busy{BUSY?}
Busy -- Yes --> Read[Read Rx FIFO]
Read --> Transfer
Busy -- No --> TMOD01[TMOD=01]
TMOD01 --> Interrupt
end
subgraph DW_apb_ssi_Hardware_Flow [DW_apb_ssi]
IDLE2([IDLE]) --> Pop[Pop data from Tx FIFO into shifter]
Pop --> TransferBit[Transfer Bit]
TransferBit --> AllBits{All bits in frame transferred?}
AllBits -- No --> TransferBit
AllBits -- Yes --> TMOD{TMOD}
TMOD -- TMOD=01 --> LoadRx[Load Rx FIFO]
LoadRx --> AllFrames{All frames transferred?}
TMOD -- TMOD=00 --> TxEmpty{Transmit FIFO empty?}
TMOD -- TMOD=10 --> TxEmpty
AllFrames -- Yes --> END([END])
TxEmpty -- Yes --> END
TxEmpty -- No --> AllFrames
AllFrames -- No --> LoadRx
end
Note[You may fill FIFO here: Transfer begins when first data word is present in the transmit FIFO and slave is enabled.]
Note --- Transfer
Note --- Read
4.10.9.1.4. Master Microwire Serial Transfers
Microwire serial transfers from the DW_apb_ssi serial master are controlled by the Microwire Control Register (MWCR). The MWHS bit field enables and disables the Microwire handshaking interface. The MDD bit field controls the direction of the data frame (the control frame is always transmitted by the master and received by the slave). The MWMOD bit field defines whether the transfer is sequential or nonsequential.
All Microwire transfers are started by the DW_apb_ssi serial master when there is at least one control word in the transmit FIFO and a slave is enabled. When the DW_apb_ssi master transmits the data frame (MDD = 1), the transfer is terminated by the shift logic when the transmit FIFO is empty. When the DW_apb_ssi master receives the data frame (MDD = 0), the termination of the transfer depends on the setting of the MWMOD bit field. If the transfer is nonsequential (MWMOD = 0), it is terminated when the transmit FIFO is empty after shifting in the data frame from the slave. When the transfer is sequential (MWMOD = 1), it is terminated by the shift logic when the number of data frames received is equal to the value in the CTRLR1 register + 1.
When the handshaking interface on the DW_apb_ssi master is enabled (MWHS = 1), the status of the target slave is polled after transmission. Only when the slave reports a ready status does the DW_apb_ssi master complete the transfer and clear its BUSY status. If the transfer is continuous, the next control/data frame is not sent until the slave device returns a ready status.
A typical software flow for completing a Microwire serial transfer from the DW_apb_ssi serial master is outlined as follows:
- 1. If the DW_apb_ssi is enabled, disable it by writing 0 to SSIENR.
- 2. Set up the DW_apb_ssi control registers for the transfer. These registers can be set in any order. Write CTRLR0 to set transfer parameters.
- ◦ If the transfer is sequential and the DW_apb_ssi master receives data, write CTRLR1 with the number of frames in the transfer minus 1; for instance, if you want to receive four data frames, write '3' into CTRLR1.
- ◦ Write BAUDR to set the baud rate for the transfer.
- ◦ Write TXFTLR and RXFTLR to set FIFO threshold levels.
- ◦ Write the IMR register to set up interrupt masks.
You can write the SER register to enable the target slave for selection. If a slave is enabled here, the transfer begins as soon as one valid data entry is present in the transmit FIFO. If no slaves are enabled prior to writing to the DR register, the transfer does not begin until a slave is enabled.
- 3. Enable the DW_apb_ssi by writing 1 to the SSIENR register.
- 4. If the DW_apb_ssi master transmits data, write the control and data words into the transmit FIFO (write DR). If the DW_apb_ssi master receives data, write the control word(s) into the transmit FIFO.
If no slaves were enabled in the SER register at this point, enable now to begin the transfer.
- 5. Poll the BUSY status to wait for completion of the transfer. The BUSY status cannot be polled immediately.
- 6. The transfer is stopped by the shift control logic when the transmit FIFO is empty. If the transfer mode is sequential and the DW_apb_ssi master receives data, the transfer is stopped by the shift control logic when the specified number of data frames is received. When the transfer is done, the BUSY status is reset to 0.
- 7. If the DW_apb_ssi master receives data, read the receive FIFO until it is empty.
- 8. Disable the DW_apb_ssi by writing 0 to SSIENR.
Figure 123 shows a typical software flow for starting a DW_apb_ssi master Microwire serial transfer. The diagram also shows the hardware flow inside the serial-master component.
Figure 123.
DW_apb_ssi Master
Microwire Transfer
Flow

graph TD
subgraph Software_Flow [Software Flow]
IDLE1([IDLE]) --> Disable[Disable DW_apb_ssi]
Disable --> Configure[Configure Master by writing CTRLR0, CTRLR1, BAUDR, TXFTLR, RXFTLR, MWCR, IMR, SER]
Configure --> Enable[Enable DW_apb_ssi]
Enable --> Write[Write control & data to Tx FIFO]
Write --> Transfer[Transfer in progress]
Transfer --> Interrupt{Interrupt?}
Interrupt -- Yes --> ISR([Interrupt Service Routine])
Interrupt -- No --> Busy{BUSY?}
Busy -- Yes --> Read[Read Rx FIFO]
Read --> Transfer
Busy -- No --> MWCR1[MWCR[1]=1]
MWCR1 --> Transfer
end
subgraph Hardware_Flow [DW_apb_ssi]
IDLE2([IDLE]) --> PopCtrl[Pop control frame from Tx FIFO into shifter]
PopCtrl --> TransferBit1[Transfer Bit]
TransferBit1 --> AllBitsCtrl{All bits in control frame transmitted?}
AllBitsCtrl -- No --> TransferBit1
AllBitsCtrl -- Yes --> MWCR1_1[MWCR[1]=1]
MWCR1_1 --> PopData[Pop data frame from Tx FIFO into shifter]
PopData --> TransferBit2[Transfer Bit]
TransferBit2 --> AllBitsData{All bits in data frame transmitted?}
AllBitsData -- No --> TransferBit2
AllBitsData -- Yes --> TransmitEmpty{Transmit FIFO empty?}
TransmitEmpty -- Yes --> END([END])
TransmitEmpty -- No --> TransferBit2
MWCR1_1 --> ReceiveBit[Receive Bit]
ReceiveBit --> AllBitsRx{All bits in data frame received?}
AllBitsRx -- Yes --> LoadRx[Load Rx FIFO]
LoadRx --> MWCR0_0[MWCR[0]=0]
MWCR0_0 --> MWCR0_1[MWCR[0]=1]
MWCR0_1 --> AllFrames{All frames transferred?}
AllFrames -- Yes --> END
AllFrames -- No --> ReceiveBit
end
ISR --> IDLE1
Read --> IDLE1
END --> IDLE1
Software Flow:
- IDLE
- Disable DW_apb_ssi
- Configure Master by writing CTRLR0, CTRLR1, BAUDR, TXFTLR, RXFTLR, MWCR, IMR, SER
- Enable DW_apb_ssi
- Write control & data to Tx FIFO
- Transfer in progress
- Interrupt?
- Interrupt Service Routine (if Interrupt is Yes)
- BUSY?
- Read Rx FIFO (if BUSY is Yes)
- MWCR[1]=1
Hardware Flow (DW_apb_ssi):
- IDLE
- Pop control frame from Tx FIFO into shifter
- Transfer Bit
- All bits in control frame transmitted?
- MWCR[1]=1
- Pop data frame from Tx FIFO into shifter
- Transfer Bit
- All bits in data frame transmitted?
- Transmit FIFO empty?
- END
- Receive Bit
- All bits in data frame received?
- Load Rx FIFO
- MWCR[0]=0
- MWCR[0]=1
- All frames transferred?
- END
Annotations:
- If master receives data, user need only write control frames into the Tx FIFO. Transfer begins when first control word is present in the Transmit FIFO and a slave is enabled.
- If the transmit FIFO is requesting and all data have not been sent, then write data into transmit FIFO.
- If the receive FIFO is requesting, then read data from receive FIFO.
4.10.10. Partner Connection Interfaces
The DW_apb_ssi can connect to any serial-slave peripheral device using one of the interfaces discussed in the following sections.
4.10.10.1. Motorola Serial Peripheral Interface (SPI)
With the SPI, the clock polarity (SCPOL) configuration parameter determines whether the inactive state of the serial clock is high or low. To transmit data, both SPI peripherals must have identical serial clock phase (SCPH) and clock polarity (SCPOL) values. The data frame can be 4 to 16/32 bits (depending upon SSI_MAX_XFER_SIZE) in length.
When the configuration parameter SCPH = 0, data transmission begins on the falling edge of the slave select signal. The first data bit is captured by the master and slave peripherals on the first edge of the serial clock; therefore, valid data must be present on the txd and rxd lines prior to the first serial clock edge.
Figure 124 shows a timing diagram for a single SPI data transfer with SCPH = 0. The serial clock is shown for configuration parameters SCPOL = 0 and SCPOL = 1.
Figure 124. SPI Serial Format (SCPH = 0)

The following signals are illustrated in the timing diagrams in this section:
sclk_out
serial clock from DW_apb_ssi master
ss_0_n
slave select signal from DW_apb_ssi master
ss_in_n
slave select input to the DW_apb_ssi slave
ss_oe_n
output enable for the DW_apb_ssi master
txd
transmit data line for the DW_apb_ssi master
rxn
receive data line for the DW_apb_ssi master
Continuous data transfers are supported when SCPH = 0:
- When CTRLR0.SSTE is set to 1, the DW_apb_ssi toggles the slave select signal between frames and the serial clock is held to its default value while the slave select signal is active; this operating mode is illustrated in Figure 125.
Figure 125. Serial Format Continuous Transfers (SCPH = 0)

When the configuration parameter SCPH = 1, master peripherals begin transmitting data on the first serial clock edge
after the slave select line is activated. The first data bit is captured on the second (trailing) serial clock edge. Data are propagated by the master peripherals on the leading edge of the serial clock. During continuous data frame transfers, the slave select line may be held active-low until the last bit of the last frame has been captured.
Figure 126 shows the timing diagram for the SPI format when the configuration parameter SCPH = 1.
Figure 126. SPI Serial Format (SCPH = 1)

Continuous data frames are transferred in the same way as single frames, with the MSB of the next frame following directly after the LSB of the current frame. The slave select signal is held active for the duration of the transfer.
Figure 127 shows the timing diagram for continuous SPI transfers when the configuration parameter SCPH = 1.
Figure 127. SPI Serial Format Continuous Transfer (SCPH = 1)

There are four possible transfer modes on the DW_apb_ssi for performing SPI serial transactions. For transmit and receive transfers (transfer mode field (9:8) of the Control Register 0 = 00b), data transmitted from the DW_apb_ssi to the external serial device is written into the transmit FIFO. Data received from the external serial device into the DW_apb_ssi is pushed into the receive FIFO.
Figure 128 shows the FIFO levels prior to the beginning of a serial transfer and the FIFO levels on completion of the transfer. In this example, two data words are transmitted from the DW_apb_ssi to the external serial device in a continuous transfer. The external serial device also responds with two data words for the DW_apb_ssi.
Figure 128. FIFO Status for Transmit & Receive SPI and SSP Transfers

For transmit only transfers (transfer mode field (9:8) of the Control Register 0 = 01b), data transmitted from the DW_apb_ssi to the external serial device is written into the transmit FIFO. As the data received from the external serial device is deemed invalid, it is not stored in the DW_apb_ssi receive FIFO.
Figure 129 shows the FIFO levels prior to the beginning of a serial transfer and the FIFO levels on completion of the transfer. In this example, two data words are transmitted from the DW_apb_ssi to the external serial device in a continuous transfer.
Figure 129. FIFO Status for Transmit Only SPI and SSP Transfers

The diagram illustrates the FIFO status for transmit-only SPI and SSP transfers. It is divided into two main sections: 'FIFO Status Prior to Transfer' and 'FIFO Status on Completion of Transfer', separated by a dashed line.
FIFO Status Prior to Transfer:
- Tx FIFO Buffer: A vertical stack of four locations. Location 0 contains 'Tx Data(0)', Location 1 contains 'Tx Data(1)', and Locations 2 and n are 'NULL'. An arrow labeled 'Write DR' points to the top of this buffer.
- Rx FIFO Buffer: A single box labeled 'Rx FIFO Empty'.
- SHIFT LOGIC: A central block with 'rxd' input and 'txd' output.
FIFO Status on Completion of Transfer:
- Tx FIFO Buffer: All four locations (0, 1, 2, n) are now 'NULL'. An arrow labeled 'Tx FIFO Empty' points to the top of this buffer.
- Rx FIFO Buffer: A single box labeled 'Rx FIFO Empty'.
- SHIFT LOGIC: The same central block with 'rxd' input and 'txd' output.
Arrows indicate the flow of data from the Tx FIFO Buffer to the SHIFT LOGIC and from the SHIFT LOGIC to the Rx FIFO Buffer.
For receive only transfers (transfer mode field (9:8) of the Control Register 0 = 10b), data transmitted from the DW_apb_ssi to the external serial device is invalid, so a single dummy word is written into the transmit FIFO to begin the serial transfer. The txd output from the DW_apb_ssi is held at a constant logic level for the duration of the serial transfer. Data received from the external serial device into the DW_apb_ssi is pushed into the receive FIFO.
Figure 130 shows the FIFO levels prior to the beginning of a serial transfer and the FIFO levels on completion of the transfer. In this example, two data words are received by the DW_apb_ssi from the external serial device in a continuous transfer.
Figure 130. FIFO Status for Receive Only SPI and SSP Transfers

The diagram illustrates the FIFO status for receive-only SPI and SSP transfers. It is divided into two main sections: 'FIFO Status Prior to Transfer' and 'FIFO Status on Completion of Transfer', separated by a dashed line.
FIFO Status Prior to Transfer:
- Tx FIFO Buffer: A vertical stack of four locations. Location 0 contains 'Dummy Word', and Locations 1, 2, and n are 'NULL'. An arrow labeled 'Write DR' points to the top of this buffer.
- Rx FIFO Buffer: A single box labeled 'Rx FIFO Empty'.
- SHIFT LOGIC: A central block with 'rxd' input and 'txd' output.
FIFO Status on Completion of Transfer:
- Tx FIFO Buffer: All four locations (0, 1, 2, n) are now 'NULL'. An arrow labeled 'Tx FIFO Empty' points to the top of this buffer.
- Rx FIFO Buffer: A vertical stack of four locations. Location 0 contains 'Rx_Data(0)', Location 1 contains 'Rx_Data(1)', and Locations 2 and n are 'NULL'. An arrow labeled 'Read DR' points to the bottom of this buffer.
- SHIFT LOGIC: The same central block with 'rxd' input and 'txd' output.
Arrows indicate the flow of data from the Tx FIFO Buffer to the SHIFT LOGIC and from the SHIFT LOGIC to the Rx FIFO Buffer.
For eeprom_read transfers (transfer mode field [9:8] of the Control Register 0 = 11b), opcode and/or EEPROM address are written into the transmit FIFO. During transmission of these control frames, received data is not captured by the DW_apb_ssi master. After the control frames have been transmitted, receive data from the EEPROM is stored in the receive FIFO.
Figure 131 shows the FIFO levels prior to the beginning of a serial transfer and the FIFO levels on completion of the transfer. In this example, one opcode and an upper and lower address are transmitted to the EEPROM, and eight data frames are read from the EEPROM and stored in the receive FIFO of the DW_apb_ssi master.
Figure 131. FIFO Status for EEPROM Read Transfer Mode
![Diagram of FIFO status for EEPROM Read Transfer Mode. It shows two states: 'FIFO Status Prior to Transfer' and 'FIFO Status on Completion of Transfer'. In the first state, the Tx FIFO Buffer contains NULL at Location n, NULL at Location 3, Address[7:0] at Location 2, Address[15:8] at Location 1, and Opcode at Location 0. The Rx FIFO is empty. In the second state, the Tx FIFO is empty, and the Rx FIFO Buffer contains NULL at Location n, Rx_Data(7) at Location 7, Rx_Data(6) at Location 6, Rx_Data(1) at Location 1, and Rx_Data(0) at Location 0. A central SHIFT LOGIC block connects the two states, with rxd and txd lines.](/RP2040/6dcd40e2cead69fe534831cead2ff818_img.jpg)
The diagram illustrates the FIFO status for EEPROM Read Transfer Mode. It is divided into two main sections: 'FIFO Status Prior to Transfer' and 'FIFO Status on Completion of Transfer', connected by a central 'SHIFT LOGIC' block.
FIFO Status Prior to Transfer:
- Tx FIFO Buffer:
Contains data at various locations:
- Location n: NULL
- Location 3: NULL
- Location 2: Address[7:0]
- Location 1: Address[15:8]
- Location 0: Opcode
- Rx FIFO: Empty.
- Write DR: An arrow points to the Tx FIFO Buffer.
FIFO Status on Completion of Transfer:
- Tx FIFO: Empty.
- Rx FIFO Buffer:
Contains data at various locations:
- Location n: NULL
- Location 7: Rx_Data(7)
- Location 6: Rx_Data(6)
- Location 1: Rx_Data(1)
- Location 0: Rx_Data(0)
- Read DR: An arrow points to the Rx FIFO Buffer.
The central SHIFT LOGIC block has rx and tx lines connecting the two states.
4.10.10.2. Texas Instruments Synchronous Serial Protocol (SSP)
Data transfers begin by asserting the frame indicator line (ss_0_n/ss_in_n) for one serial clock period. Data to be transmitted are driven onto the txd line one serial clock cycle later; similarly data from the slave are driven onto the rxd line. Data are propagated on the rising edge of the serial clock (sclk_out/sclk_in) and captured on the falling edge. The length of the data frame ranges from four to 32 bits.
Figure 132 shows the timing diagram for a single SSP serial transfer.
Figure 132. SSP Serial Format

The timing diagram for a single SSP serial transfer shows four signals over time:
- sclk_out/in: A periodic serial clock signal.
- txd/rxd: The data bus. It shows a data frame with MSB (Most Significant Bit) and LSB (Least Significant Bit) labels.
- ss_0_n/ss_in_n: The frame indicator signal. It is asserted (goes high) for one clock period.
- ssi_oe_n: The output enable signal. It is asserted (goes low) for the duration of the transfer.
Continuous data frames are transferred in the same way as single data frames. The frame indicator is asserted for one clock period during the same cycle as the LSB from the current transfer, indicating that another data frame follows.
Figure 133 shows the timing for a continuous SSP transfer.
Figure 133. SSP Serial Format Continuous Transfer

The timing diagram for a continuous SSP transfer shows four signals over time:
- sclk_out/in: A periodic serial clock signal.
- txd/rxd: The data bus. It shows a continuous stream of data frames with MSB (Most Significant Bit) and LSB (Least Significant Bit) labels.
- ss_0_n/ss_in_n: The frame indicator signal. It is asserted (goes high) for one clock period.
- ssi_oe_n: The output enable signal. It is asserted (goes low) for the duration of the transfer.
4.10.10.3. National Semiconductor Microwire
Data transmission begins with the falling edge of the slave-select signal (ss_0_n). One-half serial clock (sclk_out) period later, the first bit of the control is sent out on the txd line. The length of the control word can be in the range 1 to 16 bits and is set by writing bit field CFS (bits 15:12) in CTRLR0. The remainder of the control word is transmitted (propagated on the falling edge of sclk_out) by the DW_apb_ssi serial master. During this transmission, no data are present (high impedance) on the serial master's rxd line.
The direction of the data word is controlled by the MDD bit field (bit 1) in the Microwire Control Register (MWCR). When MDD=0, this indicates that the DW_apb_ssi serial master receives data from the external serial slave. One clock cycle after the LSB of the control word is transmitted, the slave peripheral responds with a dummy 0 bit, followed by the data frame, which can be four to 32 bits in length. Data are propagated on the falling edge of the serial clock and captured on the rising edge.
The slave-select signal is held active-low during the transfer and is de-asserted one-half clock cycle later, after the data are transferred. Figure 134 shows the timing diagram for a single DW_apb_ssi serial master read from an external serial slave.
Figure 134. Single DW_apb_ssi Master Microwire Serial Transfer (MDD=0)

The diagram illustrates the timing for a single Microwire serial transfer where MDD=0. It shows five signals over time: sclk_out (serial clock), txd (transmit data), rxd (receive data), ss_0_n (slave select), and ssi_oe_n (serial output enable). The txd signal first transmits a control word (MSB to LSB), followed by a dummy 0 bit, and then a data frame (4-32 bits, MSB to LSB). The rxd signal shows the data frame (MSB to LSB) starting after the dummy 0 bit. The ss_0_n signal is active-low and stays low during the transfer. The ssi_oe_n signal is active-low and goes low during the transfer.
Figure 135 shows how the data and control frames are structured in the transmit FIFO prior to the transfer; the value programmed into the MWCR register is also shown.
Figure 135. FIFO Status for Single Microwire Transfer (receiving data frame)

The diagram shows the FIFO status for a single Microwire transfer where MDD=0. It includes the MWCR register with fields MWHS, MDD, and MWMOD. The Tx FIFO Buffer contains NULL values for locations n, 3, 2, 1, and Ctrl Word(0). The Rx FIFO Buffer contains NULL values for locations n, 3, 2, 1, and Rx_Data(0). The SHIFT LOGIC block is shown between the Tx and Rx FIFOs. The Rx FIFO Empty signal is shown. The FIFO Status Prior to Transfer and FIFO Status on Completion of Transfer are shown.
Continuous transfers for the Microwire protocol can be sequential or nonsequential, and are controlled by the MWMOD bit field (bit 0) in the MWCR register.
Nonsequential continuous transfers occur as illustrated in Figure 136 , with the control word for the next transfer following immediately after the LSB of the current data word.
Figure 136. Continuous Nonsequential Microwire Transfer (receiving data frame)

The diagram illustrates the timing for a continuous nonsequential Microwire serial transfer. It shows five signals over time: sclk_out (serial clock), txd (transmit data), rxd (receive data), ss_0_n (slave select), and ssi_oe_n (serial output enable). The txd signal shows Control word 0, followed by Data Word 0, then Control word 1, followed by Data Word 1. The rxd signal shows the data frame (MSB to LSB) starting after the dummy 0 bit. The ss_0_n signal is active-low and stays low during the transfer. The ssi_oe_n signal is active-low and goes low during the transfer.
The only modification needed to perform a continuous nonsequential transfer is to write more control words into the transmit FIFO buffer; this is illustrated in Figure 137 . In this example, two data words are read from the external serial-slave device.
Figure 137. FIFO Status for Nonsequential Microwire Transfer (receiving data frame)

During sequential continuous transfers, only one control word is transmitted from the DW_apb_ssi master. The transfer is started in the same manner as with nonsequential read operations, but the cycle is continued to read further data. The slave device automatically increments its address pointer to the next location and continues to provide data from that location. Any number of locations can be read in this manner; the DW_apb_ssi master terminates the transfer when the number of words received is equal to the value in the CTRLR1 register plus one.
The timing diagram in Figure 138 and example in Figure 139 show a continuous sequential read of two data frames from the external slave device.
Figure 138. Continuous Sequential Microwire Transfer (receiving data frame)

Figure 139. FIFO Status for Sequential Microwire Transfer (receiving data frame)

When MDD = 1, this indicates that the DW_apb_ssi serial master transmits data to the external serial slave. Immediately after the LSB of the control word is transmitted, the DW_apb_ssi master begins transmitting the data frame to the slave peripheral.
Figure 140 shows the timing diagram for a single DW_apb_ssi serial master write to an external serial slave.
Figure 140. Single Microwire Transfer (transmitting data frame)

NOTE
The DW_apb_ssi does not support continuous sequential Microwire writes, where MDD = 1 and MWMOD = 1.
Figure 141 shows how the data and control frames are structured in the transmit FIFO prior to the transfer, also shown is the value programmed into the MWCR register.
Figure 141. FIFO Status for Single Microwire Transfer (transmitting data frame)

Continuous transfers occur as shown in Figure 142, with the control word for the next transfer following immediately after the LSB of the current data word.
Figure 142. Continuous Microwire Transfer (transmitting data frame)

The only modification you need to make to perform a continuous transfer is to write more control and data words into the transmit FIFO buffer, shown in Figure 143. This example shows two data words are written to the external serial slave device.
Figure 143. FIFO Status for Continuous Microwire Transfer (transmitting data frame)

The Microwire handshaking interface can also be enabled for DW_apb_ssi master write operations to external serial-slave devices. To enable the handshaking interface, you must write 1 into the MHS bit field (bit 2) on the MWCR register. When MHS is set to 1, the DW_apb_ssi serial master checks for a ready status from the slave device before completing the transfer, or transmitting the next control word for continuous transfers.
Figure 144 shows an example of a continuous Microwire transfer with the handshaking interface enabled.
Figure 144. Continuous Microwire Transfer with Handshaking (transmitting data frame)

After the first data word has been transmitted to the serial-slave device, the DW_apb_ssi master polls the rxd input waiting for a ready status from the slave device. Upon reception of the ready status, the DW_apb_ssi master begins transmission of the next control word. After transmission of the last data frame has completed, the DW_apb_ssi master transmits a start bit to clear the ready status of the slave device before completing the transfer. The FIFO status for this transfer is the same as in Figure 143, except that the MWHS bit field is set (1).
To transmit a control word (not followed by data) to a serial-slave device from the DW_apb_ssi master, there must be only one entry in the transmit FIFO buffer. It is impossible to transmit two control words in a continuous transfer, as the shift logic in the DW_apb_ssi treats the second control word as a data word. When the DW_apb_ssi master transmits only a control word, the MDD bit field (bit 1 of MWCR register) must be set (1).
In the example shown in Figure 145 and in the timing diagram in Figure 146, the handshaking interface is enabled. If the handshaking interface is disabled (MHS=0), the transfer is terminated by the DW_apb_ssi master one sclk_out cycle after the LSB of the control word is captured by the slave device.
Figure 145. FIFO Status for Microwire Control Word Transfer

Figure 146. Microwire Control Word

The diagram illustrates the Microwire Control Word timing. It shows five signals:
sclk_out,
txd,
rx,
ss_0_n, and
ssi_oe_n. The
sclk_out signal is a periodic clock. The
txd signal shows a sequence of bits from MSB to LSB, followed by a Start Bit. The
rx signal shows a Busy period followed by a Ready period. The
ss_0_n and
ssi_oe_n signals show a pulse during the Ready period.
4.10.10.4. Enhanced SPI Modes
DW_apb_ssi supports the dual and quad modes of SPI in RP2040; octal mode is not supported.
txd,
rx and
ssi_oe_n signals are four bits wide.
Data is shifted out/in on more than one line, increasing the overall throughput. All four combinations of the serial clock's polarity and phase are valid in this mode and work the same as in normal SPI mode. Dual SPI, or Quad SPI modes function similarly except for the width of
txd,
rx and
ssi_oe_n signals. The mode of operation (write/read) can be selected using the
CTRLR0.TMOD field.
4.10.10.4.1. Write Operation in Enhanced SPI Modes
Dual, or Quad, SPI write operations can be divided into three parts:
- • Instruction phase
- • Address phase
- • Data phase
The following register fields are used for a write operation:
- •
CTRLR0.SPI_FRF- Specifies the format in which the transmission happens for the frame. - •
SPI_CTRLR0(Control Register 0 register) – Specifies length of instruction, address, and data. - •
SPI_CTRLR0.INST_L– Specifies length of an instruction (possible values for an instruction are 0, 4, 8, or 16 bits.) - •
SPI_CTRLR0.ADDR_L– Specifies address length (See Table 579 for decode values) - •
CTRLR0.DFSorCTRLR0.DFS_32– Specifies data length.
An instruction takes one FIFO location. An address can take more than one FIFO locations.
Both the instruction and address must be programmed in the data register (DR). DW_apb_ssi will wait until both have been programmed to start the write operation.
The instruction, address and data can be programmed to send in dual/quad mode, which can be selected from the
SPI_CTRLR0.TRANS_TYPE and
CTRLR0.SPI_FRF fields.
NOTE
- • If CTRLR0.SPI_FRF is selected to be "Standard SPI Format", everything is sent in Standard SPI mode and SPI_CTRLR0.TRANS_TYPE field is ignored.
- • CTRLR0.SPI_FRF is only applicable if CTRLR0.FRF is programmed to 00b.
Figure 147 shows a typical write operation in Dual, or Quad, SPI Mode. The value of N will be: 7 if SSI_SPI_MODE is set to 3, 3 if SSI_SPI_MODE is set to 2, and 1 if SSI_SPI_MODE is set to 1. For 1-write operation, the instruction and address are sent only once followed by data frames programmed in DR until the transmit FIFO becomes empty.
Figure 147. Typical Write Operation Dual/Quad SPI Mode
![Timing diagram for a typical write operation in Dual/Quad SPI Mode. The diagram shows four signals: sclk_out, txd[N:0], ssi_oe_n[N:0], and ss_oe_n. The txd[N:0] signal is divided into three sections: INSTRUCTION, ADDRESS, and DATA. The ssi_oe_n signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_oe_n signal is active low and covers the DATA section.](/RP2040/e6766df4a3bbd48e22e5467cd47fb47e_img.jpg)
To initiate a Dual/Quad write operation, CTRLR0.SPI_FRF must be set to 01/10/11, respectively. This will set the transfer type, and for each write command, data will be transferred in the format specified in CTRLR0.SPI_FRF field.
Case A: Instruction and address both transmitted in standard SPI format
For this, SPI_CTRLR0.TRANS_TYPE field must be set to 00b. Figure 148 shows the timing diagram when both instruction and address are transmitted in standard SPI format. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 148. Instruction and Address Transmitted in Standard SPI Format
![Timing diagram for Case A: Instruction and address both transmitted in standard SPI format. The diagram shows five signals: sclk_out, txd[0], txd[N-1:0], ss_oe_n[0], and ss_oe_n[N-1:0]. The txd[0] signal is divided into three sections: INSTRUCTION, ADDRESS, and DATA. The txd[N-1:0] signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_oe_n[0] signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_oe_n[N-1:0] signal is active low and covers the DATA section.](/RP2040/9a40c254094509a810f8b80041d2e7d4_img.jpg)
Case B: Instruction transmitted in standard and address transmitted in Enhanced SPI format
For this, SPI_CTRLR0.TRANS_TYPE field must be set to one. Figure 149 shows the timing diagram when an instruction is transmitted in standard format and address is transmitted in dual SPI format specified in the CTRLR0.SPI_FRF field. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 149. Instruction Transmitted in Standard and Address Transmitted in Enhanced SPI Format
![Timing diagram for Case B: Instruction transmitted in standard and address transmitted in Enhanced SPI format. The diagram shows five signals: sclk_out, txd[0], txd[N-1:0], ss_oe_n[0], and ss_oe_n[N-1:0]. The txd[0] signal is divided into three sections: INSTRUCTION, ADDRESS, and DATA. The txd[N-1:0] signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_oe_n[0] signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_oe_n[N-1:0] signal is active low and covers the DATA section.](/RP2040/50774a8583b762f7d7440ecbade23d2b_img.jpg)
Case C: Instruction and Address both transmitted in Enhanced SPI format
For this, SPI_CTRLR0.TRANS_TYPE field must be set to 10b. Figure 150 shows the timing diagram in which instruction and address are transmitted in SPI format specified in the CTRLR0.SPI_FRF field. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 150. Instruction and Address Both Transmitted in Enhanced SPI Format
![Timing diagram for Case C: Instruction and Address both transmitted in Enhanced SPI format. The diagram shows four signals: sclk_out, txd[N:0], ssi_oe_n[N:0], and ss_0_n. The txd[N:0] signal is divided into three sections: INSTRUCTION, ADDRESS, and DATA. The ssi_oe_n[N:0] signal is active low and covers the INSTRUCTION and ADDRESS sections. The ss_0_n signal is active low and covers the DATA section.](/RP2040/102d454eaa01f008a4068add3d41a9fa_img.jpg)
Case D: Instruction only transfer in enhanced SPI format
For this, SPI_CTRLR0.TRANS_TYPE field must be set to 10b. Figure 151 shows the timing diagram for such a transfer. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if
CTRLR0.SPI_FRF is set to 01b.
Figure 151. Instruction only transfer in enhanced SPI Format
![Timing diagram for Figure 151 showing sclk_out, txd[N:0], ssL_oe_n[N:0], and ss_0_n signals. The txd[N:0] signal contains the INSTRUCTION data.](/RP2040/358abc2a30e04e387549d81724174e61_img.jpg)
The diagram shows four signals over time: sclk_out (clock), txd[N:0] (transmit data), ssL_oe_n[N:0] (slave select output enable), and ss_0_n (slave select output). The txd[N:0] signal is active during the INSTRUCTION phase. The ssL_oe_n[N:0] signal is active during the INSTRUCTION phase. The ss_0_n signal is active during the INSTRUCTION phase.
4.10.10.4.2. Read Operation in Enhanced SPI Modes
A Dual, or Quad, SPI read operation can be divided into four phases:
- • Instruction phase
- • Address phase
- • Wait cycles
- • Data phase
Wait Cycles can be programmed using SPI_CTRLR0.WAIT_CYCLES field. The value programmed into SPI_CTRLR0.WAIT_CYCLES is mapped directly to sclk_out times. For example, WAIT_CYCLES=0 indicates no Wait, WAIT_CYCLES=1, indicates one wait cycle and so on. The wait cycles are introduced for target slave to change their mode from input to output and the wait cycles can vary for different devices.
For a READ operation, DW_apb_ssi sends instruction and control data once and waits until it receives NDF (CTRLR1 register) number of data frames and then de-asserts slave select signal.
Figure 152 shows a typical read operation in dual quad SPI mode. The value of N will be: 3 if SSI_SPI_MODE is set to Quad mode, and 1 if SSI_SPI_MODE is set to Dual mode.
Figure 152. Typical Read Operation in Enhanced SPI Mode
![Timing diagram for Figure 152 showing sclk_out, txd[N:0], rxd[N:0], ssL_oe_n[N:0], and ss_0_n signals. The txd[N:0] signal contains INSTRUCTION, ADDRESS, and WAIT CYCLES. The rxd[N:0] signal contains DATA.](/RP2040/3bc79190b437fe6fd69b02c8152c0194_img.jpg)
The diagram shows five signals over time: sclk_out (clock), txd[N:0] (transmit data), rxd[N:0] (receive data), ssL_oe_n[N:0] (slave select output enable), and ss_0_n (slave select output). The txd[N:0] signal contains INSTRUCTION, ADDRESS, and WAIT CYCLES. The rxd[N:0] signal contains DATA. The ssL_oe_n[N:0] signal is active during the INSTRUCTION, ADDRESS, and WAIT CYCLES phases. The ss_0_n signal is active during the INSTRUCTION, ADDRESS, and WAIT CYCLES phases.
To initiate a dual/quad read operation, CTRLR0.SPI_FRF must be set to 01/10/11 respectively. This will set the transfer type, now for each read command data will be transferred in the format specified in CTRLR0.SPI_FRF field.
Following are the possible cases of write operation in enhanced SPI modes:
Case A: Instruction and address both transmitted in standard SPI format
For this, SPI_CTRLR0.TRANS_TYPE field should be set to 00b. Figure 153 shows the timing diagram when both instruction and address are transferred in standard SPI format. The figure also shows WAIT cycles after address, which can be programmed in the SPI_CTRLR0.WAIT_CYCLES field. The value of N will be 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 153. Instruction and Address Transmitted in Standard SPI Format
![Timing diagram for Figure 153 showing sclk_out, txd[0], txd[N-1:0], rxd[N:0], ssL_oe_n[0], ssL_oe_n[N-1:0], and ss_0_n signals. The txd[0] signal contains INSTRUCTION. The txd[N-1:0] signal contains ADDRESS. The rxd[N:0] signal contains DATA.](/RP2040/ae5f7c74f295b4316b6f4ca77529924d_img.jpg)
The diagram shows seven signals over time: sclk_out (clock), txd[0] (transmit data), txd[N-1:0] (transmit data), rxd[N:0] (receive data), ssL_oe_n[0] (slave select output enable), ssL_oe_n[N-1:0] (slave select output enable), and ss_0_n (slave select output). The txd[0] signal contains INSTRUCTION. The txd[N-1:0] signal contains ADDRESS. The rxd[N:0] signal contains DATA. The ssL_oe_n[0] signal is active during the INSTRUCTION, ADDRESS, and WAIT CYCLES phases. The ssL_oe_n[N-1:0] signal is active during the INSTRUCTION, ADDRESS, and WAIT CYCLES phases. The ss_0_n signal is active during the INSTRUCTION, ADDRESS, and WAIT CYCLES phases.
Case B: Instruction transmitted in standard and address transmitted in dual SPI format
For this, SPI_CTRLR0.TRANS_TYPE field should be set to 01b. Figure 154 shows the timing diagram in which instruction is transmitted in standard format and address is transmitted in dual SPI format. The value of N will be 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 154. Instruction Transmitted in Standard and Address Transmitted in Enhanced SPI Format
![Timing diagram for Figure 154 showing SPI signals: sclk_out, txd[0], txd[N-1:0], rxd[N:0], ssi_oe_n[0], ssi_oe_n[N-1:0], and ss_o_n. The diagram shows the sequence of instruction and address transmission in standard and enhanced SPI formats.](/RP2040/31726f761cbbda3f2e76eefdbbef084a_img.jpg)
The diagram shows the timing of SPI signals. ss_o_n is active low and goes low at the start of the transfer. ss_i_oe_n[0] and ss_i_oe_n[N-1:0] are active low and go high at the start of the transfer. txd[0] and txd[N-1:0] transmit the instruction and address. rxd[N:0] receives the data. sclk_out is the serial clock. The diagram shows the sequence of instruction and address transmission in standard and enhanced SPI formats.
Case C: Instruction and Address both transmitted in Dual SPI format
For this, SPI_CTRLR0.TRANS_TYPE field must be set to 10b . Figure 155 shows the timing diagram in which both instruction and address are transmitted in dual SPI format. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b , 3 if CTRLR0.SPI_FRF is set to 10b , and 1 if CTRLR0.SPI_FRF is set to 01b .
Figure 155. Instruction and Address Transmitted in Enhanced SPI Format
![Timing diagram for Figure 155 showing SPI signals: sclk_out, txd[N:0], rxd[N:0], ssi_oe_n[N:0], and ss_o_n. The diagram shows the sequence of instruction and address transmission in enhanced SPI format.](/RP2040/0d22641ea83ac2e2a5b26457b97d06ce_img.jpg)
The diagram shows the timing of SPI signals. ss_o_n is active low and goes low at the start of the transfer. ss_i_oe_n[N:0] is active low and goes high at the start of the transfer. txd[N:0] transmits the instruction and address. rxd[N:0] receives the data. sclk_out is the serial clock. The diagram shows the sequence of instruction and address transmission in enhanced SPI format.
Case D: No Instruction, No Address READ transfer
For this, SPI_CTRLR0.ADDR_L and SPI_CTRLR0.INST_L must be set to 0 and SPI_CTRLR0.WAIT_CYCLES must be set to a non-zero value. Table 579 lists the ADDR_L decode value and the respective description for enhanced (Dual/Quad) SPI modes.
Table 579. ADDR_L Decode in Enhanced SPI Mode
| ADDR_L Decode Value | Description |
|---|---|
| 0000 | 0-bit Address Width |
| 0001 | 4-bit Address Width |
| 0010 | 8-bit Address Width |
| 0011 | 12-bit Address Width |
| 0100 | 16-bit Address Width |
| 0101 | 20-bit Address Width |
| 0110 | 24-bit Address Width |
| 0111 | 28-bit Address Width |
| 1000 | 32-bit Address Width |
| 1001 | 36-bit Address Width |
| 1010 | 40-bit Address Width |
| 1011 | 44-bit Address Width |
| 1100 | 48-bit Address Width |
| 1101 | 52-bit Address Width |
| 1110 | 56-bit Address Width |
| 1111 | 60-bit Address Width |
Figure 156 shows the timing diagram for such type of transfer. The value of N will be: 7 if CTRLR0.SPI_FRF is set to 11b , 3 if CTRLR0.SPI_FRF is set to 10b , and 1 if CTRLR0.SPI_FRF is set to 01b . To initiate this transfer, the software has to perform a dummy write in the data register (DR), DW_apb_ssi will wait for programmed wait cycles and then fetch the amount of data specified in NDF field.
Figure 156. No Instruction and No Address READ Transfer
![Timing diagram for Figure 156 showing signals: sclk_out, txd[N:0], rxd[N:0], ssi_oe_n[N:0], and ss_0_n. The diagram illustrates a sequence of operations where the txd[N:0] signal is high during 'WAIT CYCLES' and then transitions to a 'DATA' phase. The rxd[N:0] signal is high during the 'DATA' phase. The ssi_oe_n[N:0] signal is high during the 'WAIT CYCLES' phase and then transitions to a low state. The ss_0_n signal is high during the 'WAIT CYCLES' phase and then transitions to a low state.](/RP2040/014ecafcfe5066ed6c217297b8fe83c8_img.jpg)
4.10.10.4.3. Advanced I/O Mapping for Enhanced SPI Modes
The Input/Output mapping for enhanced SPI modes (dual, and quad) is hardcoded inside the DW_apb_ssi. The rxd[1] signal will be used to sample incoming data in standard SPI mode of operation.
For other protocols (such as SSP and Microwire), the I/O mapping remains the same. Therefore, it is easy for other protocols to connect with any device that supports Dual/Quad SPI operation because other protocols do not require a MUX logic to exist outside the design.
Figure 157 shows the I/O mapping of DW_apb_ssi in Quad mode with another SPI device that supports the Quad mode. As illustrated in Figure 157, the IO[1] pin is used as DO in standard SPI mode of operation and it is connected to rxd[1] pin, which will be sampling the input in the standard mode of operation.
Figure 157. Advanced I/O Mapping in Quad SPI Modes
![Block diagram for Figure 157 showing the I/O mapping of DW_apb_ssi in Quad SPI mode. The DW_apb_ssi block has signals txd[3], rxd[3], txd[2], rxd[2], txd[1], rxd[1], txd[0], and rxd[0]. These signals are connected to four IO Buffers. The IO Buffers are connected to the SPI slave Device signals IO[3], IO[2], IO[1]/DO, and IO[0]/DI. The IO[1]/DO signal is connected to the rxd[1] signal of the DW_apb_ssi block.](/RP2040/bcc96fa6e8fa30df412515edbeee32d6_img.jpg)
4.10.10.5. Dual Data-Rate (DDR) Support in SPI Operation
In standard operations, data transfer in SPI modes occur on either the positive or negative edge of the clock. For improved throughput, the dual data-rate transfer can be used for reading or writing to the memories.
The DDR mode supports the following modes of SPI protocol:
- • SCPH=0 & SCPOL=0 (Mode 0)
- • SCPH=1 & SCPOL=1 (Mode 3)
DDR commands enable data to be transferred on both edges of clock. Following are the different types of DDR commands:
- • Address and data are transmitted (or received in case of data) in DDR format, while instruction is transmitted in standard format.
- • Instruction, address, and data are all transmitted or received in DDR format.
The DDR_EN (SPI_CTRLR0[16]) bit is used to determine if the Address and data have to be transferred in DDR mode and INST_DDR_EN (SPI_CTRLR0[17]) bit is used to determine if Instruction must be transferred in DDR format. These bits
are only valid when the CTRLR0.SPI_FRF bit is set to be in Dual, or Quad mode.
Figure 158 describes a DDR write transfer where instructions are continued to be transmitted in standard format. In Figure 158, the value of N will be 7 if CTRLR0.SPI_FRF is set to 11b, 3 if CTRLR0.SPI_FRF is set to 10b, and 1 if CTRLR0.SPI_FRF is set to 01b.
Figure 158. DDR Transfer with SCPH=0 and SCPOL=0
![Timing diagram for Figure 158 showing a DDR write transfer with SCPH=0 and SCPOL=0. The diagram tracks signals: sclk_out (clock), ss_oe_n (active low chip select), txd[N:0] (transmit data), rxd[N:0] (receive data), and ss_oe_n[N:0]. The txd[N:0] signal begins with an instruction phase (INST) in standard format, followed by address bytes (A3, A2, A1, A0) and data bytes (D3, D2, D1, D0) transmitted on both edges of sclk_out. Legend: INST = Instruction Phase; A3, A2, A1, A0 = Address Bytes; D3, D2, D1, D0 = Data Bytes.](/RP2040/ae11c60feb544e83a0ef802bf234adc0_img.jpg)
Figure 159 describes a DDR write transfer where instruction, address and data all are transferred in DDR format.
Figure 159. DDR Transfer with Instruction, Address and Data Transmitted in DDR Format
![Timing diagram for Figure 159 showing a DDR write transfer where all phases are in DDR format. Signals include sclk_out, ss_0_n, txd[N:0], rxd[N:0], and ssi_oe_n[N:0]. The txd[N:0] line shows two instruction bytes (INST-1, INST-2) followed by address bytes (A3, A2, A1, A0) and data bytes (D3, D2, D1, D0), all changing on both rising and falling edges of sclk_out. Legend: INST-1, INST-2 = Instruction Bytes; A3, A2, A1, A0 = Address Bytes; D3, D2, D1, D0 = Data Bytes.](/RP2040/9ef050ef6cbd305f87b3b3cecba84a45_img.jpg)
NOTE
In the DDR transfer, address and instruction cannot be programmed to a value of 0.
4.10.10.5.1. Transmitting Data in DDR Mode
In DDR mode, data is transmitted on both edges so that it is difficult to sample data correctly. DW_apb_ssi uses an internal register to determine the edge on which the data should be transmitted. This will ensure that the receiver is able to get a stable data while sampling. The internal register (DDR_DRIVE_EDGE) determines the edge on which the data is transmitted. DW_apb_ssi sends data with respect to baud clock, which is an integral multiple of the internal clock ( \( ssi\_clk * BAUDR \) ). The data needs to be transmitted within half clock cycle ( \( BAUDR/2 \) ), therefore the maximum value for DDR_DRIVE_EDGE is equal to \( [(BAUDR/2)-1] \) . If the programmed value of DDR_DRIVE_EDGE is 0 then data is transmitted edge-aligned with respect to sclk_out (baud clock). If the programmed value of DDR_DRIVE_EDGE is one then the data is transmitted one ssi_clk before the edge of sclk_out.
NOTE
If the baud rate is programmed to be two, then the data will always be edge aligned.
Figure 160, Figure 161, and Figure 162 show examples of how data is transmitted using different values of the DDR_DRIVE_EDGE register. The green arrows in these examples represent the points where data is driven. Baud rate used in all these examples is 12. In Figure 160, transmit edge and driving edge of the data are the same. This is default behavior in DDR mode.
Figure 160. Transmit Data With DDR_DRIVE_EDGE = 0
![Timing diagram for Figure 160 showing transmit data with DDR_DRIVE_EDGE = 0. Signals include ssi_clk (high frequency internal clock), sclk_out (baud clock), ss_0_n, txd[N:0], rxd[N:0], and ssi_oe_n[N:0]. Green arrows indicate that data transitions on txd[N:0] are aligned exactly with the edges of sclk_out. The sequence on txd[N:0] is INST, A3, A2, A1, A0, D3, D2, D1, D0. Legend: INST = Instruction Phase; A3, A2, A1, A0 = Address Bytes; D3, D2, D1, D0 = Data Bytes.](/RP2040/c4a023e1fe87d37f0e5e6a2241b43cbf_img.jpg)
Figure 160 shows the default behavior in which the transmit and driving edge of the data is the same.
Figure 161. Transmit Data With \( DDR\_DRIVE\_EDGE = 1 \)
![Timing diagram for Figure 161 showing transmit data with DDR_DRIVE_EDGE = 1. The diagram includes signals: ssi_clk, sclk_out, ss_0_n, txd[N:0], rxd[N:0], and ssi_oe_n[N:0]. The txd[N:0] signal shows an instruction phase (INST) followed by address bytes (A3, A2, A1, A0) and data bytes (D3, D2, D1, D0). The ssi_oe_n[N:0] signal is active (low) during the instruction and address phases. The legend indicates: INST = Instruction Phase, A3, A2, A1, A0 = Address Bytes, D3, D2, D1, D0 = Data Bytes. In this mode, data transitions on txd[N:0] occur on the falling edge of sclk_out.](/RP2040/6b74f92c0b63e1f3aadb1773646f7e92_img.jpg)
Figure 162. Transmit Data With \( DDR\_DRIVE\_EDGE = 2 \)
![Timing diagram for Figure 162 showing transmit data with DDR_DRIVE_EDGE = 2. The diagram includes signals: ssi_clk, sclk_out, ss_0_n, txd[N:0], rxd[N:0], and ssi_oe_n[N:0]. The txd[N:0] signal shows an instruction phase (INST) followed by address bytes (A3, A2, A1, A0) and data bytes (D3, D2, D1, D0). The ssi_oe_n[N:0] signal is active (low) during the instruction and address phases. The legend indicates: INST = Instruction Phase, A3, A2, A1, A0 = Address Bytes, D3, D2, D1, D0 = Data Bytes. In this mode, data transitions on txd[N:0] occur on the rising edge of sclk_out.](/RP2040/e48e44dc323fc70838f2d4a424022bcf_img.jpg)
4.10.10.6. XIP Mode Support in SPI Mode
The eXecute In Place (XIP) mode enables transfer of SPI data directly through the APB interface without writing the data register of DW_apb_ssi. XIP mode is enabled in DW_apb_ssi when the XIP cache is enabled. This control signal indicates whether APB transfers are register read-write or XIP reads. When in XIP mode, DW_apb_ssi expects only read request on the APB interface. This request is translated to SPI read on the serial interface and soon after the data is received, the data is returned to the APB interface in the same transaction.
NOTE
- • Only APB reads are supported during an XIP operation
The address length is derived from the SPI_CTRLR0.ADDR_L field, and relevant bits from paddr ( \( [SPI\_CTRLR0.ADDR\_L-1:0] \) ) are transferred as address to the SPI interface. XIP address is managed by the XIP cache controller.
4.10.10.6.1. Read Operation in XIP Mode
The XIP operation is supported only in enhanced SPI modes (Dual, Quad) of operation. Therefore, the CTRLR0.SPI_FRF bit should not be programmed to 0. An XIP read operation is divided into two phases:
- • Address phase
- • Data phase
For an XIP read operation
- 1. Set the SPI frame format and data frame size value in CTRLR0 register. Note that the value of the maximum data frame size is 32.
- 2. Set the Address length, Wait cycles, and transaction type in the SPI_CTRLR0 register. Note that the maximum address length is 32.
After these settings, a user can initiate a read transaction through the APB interface which will transferred to SPI peripheral using programmed values. Figure 163 shows the typical XIP transfer. The Value of N = 1, 3 and 7 for SPI mode Dual, and Quad modes, respectively.
Figure 163. Typical Read Operation in XIP Mode
![Timing diagram for a typical read operation in XIP mode. The diagram shows signals: pclk, xip_en, psel, penable, paddr, pready, prdata[31:0], ss_x_n, sclk_out, txd[N:0], and rxd[N:0]. The pclk is a periodic clock. xip_en is active high. psel is active high. penable is active high. paddr is 0x00. pready is active high. prdata[31:0] shows data D1. ss_x_n is active low. sclk_out is active high. txd[N:0] shows data 0x00. rxd[N:0] shows data D1. Blue arrows indicate data flow from prdata to txd and from rxd to prdata.](/RP2040/412796d8f3fd911a5a215d4d11887495_img.jpg)
4.10.11. DMA Controller Interface
The DW_apb_ssi has built-in DMA capability; it has a handshaking interface to a DMA Controller to request and control transfers. The APB bus is used to perform the data transfer to or from the DMA.
NOTE
When the DW_apb_ssi interfaces to the DMA controller, the DMA controller is always a flow controller; that is, it controls the block size. This must be programmed by software in the DMA controller.
The DW_apb_ssi uses two DMA channels, one for the transmit data and one for the receive data. The DW_apb_ssi has these DMA registers:
DMACR
Control register to enable DMA operation.
DMATDLR
Register to set the transmit the FIFO level at which a DMA request is made.
DMARDLR
Register to set the receive FIFO level at which a DMA request is made.
The DW_apb_ssi uses the following handshaking signals to interface with the DMA controller.
- • dma_tx_req
- • dma_tx_single
- • dma_tx_ack
- • dma_rx_req
- • dma_tx_req
- • dma_tx_single
- • dma_tx_ack
- • dma_rx_req
To enable the DMA Controller interface on the DW_apb_ssi, you must write the DMA Control Register (DMACR). Writing a 1 into the TDMAE bit field of DMACR register enables the DW_apb_ssi transmit handshaking interface. Writing a 1 into the RDMAE bit field of the DMACR register enables the DW_apb_ssi receive handshaking interface.
Table 580 provides description for different DMA transmit data level values.
Table 580. DMA Transmit Data Level (DMATDL) Decode Value
| DMATDL Value | Description |
|---|---|
| 0000_0000 | dma_tx_req is asserted when zero data entries are present in the transmit FIFO |
| 0000_0001 | dma_tx_req is asserted when one or less data entry is present in the transmit FIFO |
| 0000_0010 | dma_tx_req is asserted when two or less data entries are present in the transmit FIFO |
| ... | ... |
| 0000_1101 | dma_tx_req is asserted when 13 or less data entries are present in the transmit FIFO |
| 0000_1110 | dma_tx_req is asserted when 14 or less data entries are present in the transmit FIFO |
| 0000_1111 | dma_tx_req is asserted when 15 or less data entries are present in the transmit FIFO |
Table 581 provides description for different DMA Receive Data Level values.
Table 581. DMA
Receive Data Level
(DMARDL) Decode
Value
| DMARDL Value | Description |
|---|---|
| 0000_0000 | dma_rx_req is asserted when one or more data entries are present in the receive FIFO |
| 0000_0001 | dma_rx_req is asserted when two or more data entries are present in the receive FIFO |
| 0000_0010 | dma_rx_req is asserted when three or more data entries are present in the receive FIFO |
| ... | ... |
| 0000_1101 | dma_rx_req is asserted when 14 or more data entries are present in the receive FIFO |
| 0000_1110 | dma_rx_req is asserted when 15 or more data entries are present in the receive FIFO |
| 0000_1111 | dma_rx_req is asserted when 16 data entries are present in the receive FIFO |
4.10.11.1. Overview of Operation
As a block flow control device, the DMA Controller is programmed by the processor with the number of data items (block size) that are to be transmitted or received by the DW_apb_ssi.
The block is broken into a number of transactions, each initiated by a request from the DW_apb_ssi. The DMA Controller must also be programmed with the number of data items (in this case, DW_apb_ssi FIFO entries) to be transferred for each DMA request. This is also known as the burst transaction length.
Figure 164 shows a single block transfer, where the block size programmed into the DMA Controller is 12 and the burst transaction length is set to four. In this case, the block size is a multiple of the burst transaction length; therefore, the DMA block transfer consists of a series of burst transactions.
CAUTION
On RP2040, the burst transaction length of the SSI's DMA interface is fixed at four transfers.
SSI.DMARDLR must always be equal to 4, which is the value it takes at reset. The SSI will then request a single transfer when it has between one and three items in its FIFO, and a 4-burst when it has four or more.
Figure 164.
Breakdown of DMA
Transfer into Burst
Transactions. Block
size,
\(
\text{DMA\_CTLx.BLOCKS\_TS} =
\)
12. Number of data
items per source burst
transaction,
\(
\text{DMA\_CTLx.SRC\_MSIZE} =
\)
4. SSI receive FIFO
watermark level,
\(
\text{SSI\_DMARDLR} + 1 =
\)
\(
\text{DMA\_CTLx.SRC\_MSIZE} =
\)
4

graph TD
A[12 Data Items] --> B[DMA Multi-block Transfer Level]
B --> C[12 Data Items]
C --> D[DMA Block Level]
D --> E1[DMA Burst Transaction 1]
D --> E2[DMA Burst Transaction 2]
D --> E3[DMA Burst Transaction 3]
E1 --> F1[4 Data Items]
E2 --> F2[4 Data Items]
E3 --> F3[4 Data Items]
If the DW_apb_ssi makes a transmit request to this channel, four data items are written to the DW_apb_ssi transmit FIFO. Similarly, if the DW_apb_ssi makes a receive request to this channel, four data items are read from the DW_apb_ssi receive FIFO. Three separate requests must be made to this DMA channel before all 12 data items are written or read.
When the block size programmed into the DMA Controller is not a multiple of the burst transaction length, as shown in Figure 165 , a series of burst transactions followed by single transactions are needed to complete the block transfer.
Figure 165.
Breakdown of DMA
Transfer into Single
and Burst
Transactions. Block
size,
\(
\text{DMA\_CTLx.BLOCK\_TS} =
\)
15. Number of data
items per burst
transaction,
\(
\text{DMA\_CTLx.DEST\_MSIZE} =
\)
4. SSI transmit FIFO
watermark level,
\(
\text{SSI\_DMATDLR} =
\)
\(
\text{DMA\_CTLx.DEST\_MSIZE} =
\)
4

graph TD
A[15 Data Items] --> B[DMA Multi-block Transfer Level]
B --> C[15 Data Items]
C --> D[DMA Block Level]
D --> E1[DMA Burst Transaction 1]
D --> E2[DMA Burst Transaction 2]
D --> E3[DMA Burst Transaction 3]
D --> F1[DMA Single Transaction 1]
D --> F2[DMA Single Transaction 2]
D --> F3[DMA Single Transaction 3]
E1 --> G1[4 Data Items]
E2 --> G2[4 Data Items]
E3 --> G3[4 Data Items]
F1 --> H1[1 Data Items]
F2 --> H2[1 Data Items]
F3 --> H3[1 Data Items]
4.10.12. APB Interface
The host processor accesses data, control, and status information on the DW_apb_ssi through the APB interface. APB accesses to the DW_apb_ssi peripheral are described in the following subsections.
4.10.12.1. Control and Status Register APB Access
Control and status registers within the DW_apb_ssi are byte-addressable. The maximum width of the control or status register in the DW_apb_ssi is 16 bits. Therefore all read and write operations to the DW_apb_ssi control and status registers require only one APB access.
4.10.12.2. Data Register APB Access
The data register (DR) within the DW_apb_ssi is 32 bits wide in order to remain consistent with the maximum serial transfer size (data frame). An APB write operation to DR moves data from pwwdata into the transmit FIFO buffer. An APB read operation from DR moves data from the receive FIFO buffer onto prdata.
The DW_apb_ssi DR can be written/read in one APB access.
i NOTE
The DR register in the DW_apb_ssi occupies sixty-four 32-bit locations of the memory map to facilitate AHB burst transfers. There are no burst transactions on the APB bus itself, but DW_apb_ssi supports the AHB bursts that happen on the AHB side of the AHB/APB bridge. Writing to any of these address locations has the same effect as pushing the data from the pwwdata bus into the transmit FIFO. Reading from any of these locations has the same effect as popping data from the receive FIFO onto the prdata bus. The FIFO buffers on the DW_apb_ssi are not addressable.
4.10.13. List of Registers
The SSI registers start at a base address of
0x18000000(defined as
XIP_SSI_BASE in SDK).
Table 582. List of SSI registers
| Offset | Name | Info |
|---|---|---|
| 0x00 | CTRLR0 | Control register 0 |
| 0x04 | CTRLR1 | Master Control register 1 |
| 0x08 | SSIENR | SSI Enable |
| 0x0c | MWCR | Microwire Control |
| 0x10 | SER | Slave enable |
| 0x14 | BAUDR | Baud rate |
| 0x18 | TXFTLR | TX FIFO threshold level |
| 0x1c | RXFTLR | RX FIFO threshold level |
| 0x20 | TXFLR | TX FIFO level |
| 0x24 | RXFLR | RX FIFO level |
| 0x28 | SR | Status register |
| 0x2c | IMR | Interrupt mask |
| 0x30 | ISR | Interrupt status |
| 0x34 | RISR | Raw interrupt status |
| 0x38 | TXOICR | TX FIFO overflow interrupt clear |
| 0x3c | RXOICR | RX FIFO overflow interrupt clear |
| 0x40 | RXUICR | RX FIFO underflow interrupt clear |
| 0x44 | MSTICR | Multi-master interrupt clear |
| 0x48 | ICR | Interrupt clear |
| 0x4c | DMACR | DMA control |
| 0x50 | DMATDLR | DMA TX data level |
| 0x54 | DMARDLR | DMA RX data level |
| Bits Register 31:0 Bits | column_2 | Description Description | Type RO Type | Reset 0x00000001 Reset |
|---|---|---|---|---|
| 0xf8 | TXD_DRIVE_EDGE | TX drive edge | ||
| Table 583. CTRLR0 Bits | Control register 0 Description | Type | Reset | |
| Register 31:25 | Reserved. | - | - | |
| 24 | SSTE | : Slave select toggle enable | RW | 0x0 |
| 23 | Reserved. | - | - | |
| 22:21 | SPI_FRF | : SPI frame format | RW | 0x0 |
| 0x0 | Enumerated values: → STD: Standard 1-bit SPI frame format; 1 bit per SCK, full-duplex | |||
| 0x1 | → DUAL: Dual-SPI frame format; two bits per SCK, half-duplex | |||
| 0x2 | → QUAD: Quad-SPI frame format; four bits per SCK, half-duplex | |||
| 20:16 | DFS_32 | : Data frame size in 32b transfer mode | RW | 0x00 |
| Value of n | → n+1 clocks per frame. | |||
| 15:12 | CFS | : Control frame size | RW | 0x0 |
| Value of n | → n+1 clocks per frame. | |||
| 11 | SRL | : Shift register loop (test mode) | RW | 0x0 |
| 10 | SLV_OE | : Slave output enable | RW | 0x0 |
| 9:8 | TMOD | : Transfer mode | RW | 0x0 |
| 0x0 | Enumerated values: → TX_AND_RX: Both transmit and receive | |||
| 0x1 | → TX_ONLY: Transmit only (not for FRF == 0, standard SPI mode) | |||
| 0x2 | → RX_ONLY: Receive only (not for FRF == 0, standard SPI mode) | |||
| 0x3 | → EEPROM_READ: EEPROM read mode (TX then RX; RX starts after control data TX’d) | |||
| 7 | SCPOL | : Serial clock polarity | RW | 0x0 |
| 6 | SCPH | : Serial clock phase | RW | 0x0 |
| 5:4 | FRF | : Frame format | RW | 0x0 |
| 3:0 | DFS | : Data frame size | RW | 0x0 |
SSI: CTRLR0 Register
Offset: 0x00
Description
Control register 0
Table 583. CTRLR0 Register
SSI: CTRLR1 Register
Offset: 0x04
Description
Master Control register 1
Table 584. CTRLR1 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:16 | Reserved. | - | - |
| 15:0 | NDF : Number of data frames | RW | 0x0000 |
SSI: SSIENR Register
Offset: 0x08
Description
SSI Enable
Table 585. SSIENR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | SSI_EN : SSI enable | RW | 0x0 |
SSI: MWCR Register
Offset: 0x0c
Description
Microwire Control
Table 586. MWCR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:3 | Reserved. | - | - |
| 2 | MHS : Microwire handshaking | RW | 0x0 |
| 1 | MDD : Microwire control | RW | 0x0 |
| 0 | MWMOD : Microwire transfer mode | RW | 0x0 |
SSI: SER Register
Offset: 0x10
Description
Slave enable
Table 587. SER Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | For each bit: 0 → slave not selected 1 → slave selected | RW | 0x0 |
SSI: BAUDR Register
Offset: 0x14
Description
Baud rate
Table 588. BAUDR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:16 | Reserved. | - | - |
| 15:0 | SCKDV : SSI clock divider | RW | 0x0000 |
SSI: TXFTLR Register
Offset: 0x18
Description
TX FIFO threshold level
Table 589. TXFTLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | TFT : Transmit FIFO threshold | RW | 0x00 |
SSI: RXFTLR Register
Offset: 0x1c
Description
RX FIFO threshold level
Table 590. RXFTLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | RFT : Receive FIFO threshold | RW | 0x00 |
SSI: TXFLR Register
Offset: 0x20
Description
TX FIFO level
Table 591. TXFLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | TFTFL : Transmit FIFO level | RO | 0x00 |
SSI: RXFLR Register
Offset: 0x24
Description
RX FIFO level
Table 592. RXFLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | RXTFL : Receive FIFO level | RO | 0x00 |
SSI: SR Register
Offset: 0x28
Description
Status register
Table 593. SR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:7 | Reserved. | - | - |
| 6 | DCOL : Data collision error | RO | 0x0 |
| 5 | TXE : Transmission error | RO | 0x0 |
| 4 | RFF : Receive FIFO full | RO | 0x0 |
| 3 | RFNE : Receive FIFO not empty | RO | 0x0 |
| 2 | TFE : Transmit FIFO empty | RO | 0x0 |
| 1 | TFNF : Transmit FIFO not full | RO | 0x0 |
| 0 | BUSY : SSI busy flag | RO | 0x0 |
SSI: IMR Register
Offset: 0x2c
Description
Interrupt mask
Table 594. IMR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:6 | Reserved. | - | - |
| 5 | MSTIM : Multi-master contention interrupt mask | RW | 0x0 |
| 4 | RXFIM : Receive FIFO full interrupt mask | RW | 0x0 |
| 3 | RXOIM : Receive FIFO overflow interrupt mask | RW | 0x0 |
| 2 | RXUIM : Receive FIFO underflow interrupt mask | RW | 0x0 |
| 1 | TXOIM : Transmit FIFO overflow interrupt mask | RW | 0x0 |
| 0 | TXEIM : Transmit FIFO empty interrupt mask | RW | 0x0 |
SSI: ISR Register
Offset: 0x30
Description
Interrupt status
Table 595. ISR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:6 | Reserved. | - | - |
| 5 | MSTIS : Multi-master contention interrupt status | RO | 0x0 |
| 4 | RXFIS : Receive FIFO full interrupt status | RO | 0x0 |
| 3 | RXOIS : Receive FIFO overflow interrupt status | RO | 0x0 |
| 2 | RXUIS : Receive FIFO underflow interrupt status | RO | 0x0 |
| 1 | TXOIS : Transmit FIFO overflow interrupt status | RO | 0x0 |
| 0 | TXEIS : Transmit FIFO empty interrupt status | RO | 0x0 |
SSI: RISR Register
Offset: 0x34
Description
Raw interrupt status
Table 596. RISR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:6 | Reserved. | - | - |
| 5 | MSTIR : Multi-master contention raw interrupt status | RO | 0x0 |
| 4 | RXFIR : Receive FIFO full raw interrupt status | RO | 0x0 |
| 3 | RXOIR : Receive FIFO overflow raw interrupt status | RO | 0x0 |
| 2 | RXUIR : Receive FIFO underflow raw interrupt status | RO | 0x0 |
| 1 | TXOIR : Transmit FIFO overflow raw interrupt status | RO | 0x0 |
| 0 | TXEIR : Transmit FIFO empty raw interrupt status | RO | 0x0 |
SSI: TXOICR Register
Offset: 0x38
Description
TX FIFO overflow interrupt clear
Table 597. TXOICR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | Clear-on-read transmit FIFO overflow interrupt | RO | 0x0 |
SSI: RXOICR Register
Offset: 0x3c
Description
RX FIFO overflow interrupt clear
Table 598. RXOICR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | Clear-on-read receive FIFO overflow interrupt | RO | 0x0 |
SSI: RXUICR Register
Offset: 0x40
Description
RX FIFO underflow interrupt clear
Table 599. RXUICR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | Clear-on-read receive FIFO underflow interrupt | RO | 0x0 |
SSI: MSTICR Register
Offset: 0x44
Description
Multi-master interrupt clear
Table 600. MSTICR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | Clear-on-read multi-master contention interrupt | RO | 0x0 |
SSI: ICR Register
Offset: 0x48
Description
Interrupt clear
Table 601. ICR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:1 | Reserved. | - | - |
| 0 | Clear-on-read all active interrupts | RO | 0x0 |
SSI: DMACR Register
Offset: 0x4c
Description
DMA control
Table 602. DMACR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:2 | Reserved. | - | - |
| 1 | TDMAE : Transmit DMA enable | RW | 0x0 |
| 0 | RDMAE : Receive DMA enable | RW | 0x0 |
SSI: DMATDLR Register
Offset: 0x50
Description
DMA TX data level
Table 603. DMATDLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | DMATDL : Transmit data watermark level | RW | 0x00 |
SSI: DMARDLR Register
Offset: 0x54
Description
DMA RX data level
Table 604. DMARDLR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | DMARDL : Receive data watermark level (DMARDLR+1) | RW | 0x00 |
SSI: IDR Register
Offset: 0x58
Description
Identification register
Table 605. IDR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | IDCODE : Peripheral dentification code | RO | 0x51535049 |
SSI: SSI_VERSION_ID Register
Offset: 0x5c
Description
Version ID
Table 606. SSI_VERSION_ID Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | SSI_COMP_VERSION : SNPS component version (format X.YY) | RO | 0x3430312a |
SSI: DR0 Register
Offset: 0x60
Description
Data Register 0 (of 36)
Table 607. DR0 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | DR : First data register of 36 | RW | 0x00000000 |
SSI: RX_SAMPLE_DLY Register
Offset: 0xf0
Description
RX sample delay
Table 608. RX_SAMPLE_DLY Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | RSD : RXD sample delay (in SCLK cycles) | RW | 0x00 |
SSI: SPI_CTRLR0 Register
Offset: 0xf4
Description
SPI control
Table 609.
SPI_CTRLR0 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:24 | XIP_CMD : SPI Command to send in XIP mode (INST_L = 8-bit) or to append to Address (INST_L = 0-bit) | RW | 0x03 |
| 23:19 | Reserved. | - | - |
| 18 | SPI_RXDS_EN : Read data strobe enable | RW | 0x0 |
| 17 | INST_DDR_EN : Instruction DDR transfer enable | RW | 0x0 |
| 16 | SPI_DDR_EN : SPI DDR transfer enable | RW | 0x0 |
| 15:11 | WAIT_CYCLES : Wait cycles between control frame transmit and data reception (in SCLK cycles) | RW | 0x00 |
| 10 | Reserved. | - | - |
| 9:8 | INST_L : Instruction length (0/4/8/16b) | RW | 0x0 |
| Enumerated values: | |||
| 0x0 → NONE: No instruction | |||
| 0x1 → 4B: 4-bit instruction | |||
| 0x2 → 8B: 8-bit instruction | |||
| 0x3 → 16B: 16-bit instruction | |||
| 7:6 | Reserved. | - | - |
| 5:2 | ADDR_L : Address length (0b-60b in 4b increments) | RW | 0x0 |
| 1:0 | TRANS_TYPE : Address and instruction transfer format | RW | 0x0 |
| Enumerated values: | |||
| 0x0 → 1C1A: Command and address both in standard SPI frame format | |||
| 0x1 → 1C2A: Command in standard SPI format, address in format specified by FRF | |||
| 0x2 → 2C2A: Command and address both in format specified by FRF (e.g. Dual-SPI) |
SSI: TXD_DRIVE_EDGE Register
Offset: 0xf8
Description
TX drive edge
Table 610.
TXD_DRIVE_EDGE
Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | Reserved. | - | - |
| 7:0 | TDE : TXD drive edge | RW | 0x00 |