13.4.3.1 SPI Control Register (CONTROL)

The following table provides details about the SPI Control register. Using this register, the SPI mode (Master/Slave), the type of the protocol it uses, and the data frame count can be set.

Table 13-9. CONTROL
Bit NumberNameR/WReset ValueDescription
31RESETR/W10: SPI is enabled.

1: SPI is held in Power reset state.

30OENOFFR/W00: SPI output enable active as required.

1: SPI output enable is not asserted. Allows multiple slaves to share a single slave select signal with a single master.

29BIGFIFOR/W0Alters FIFO depth when frame size is [4-8] bits.

0: FIFO depth is 4 frames.

1: FIFO depth is 32 frames when frame size is [9-16] bits FIFO depth is 16; and when frame size is [17-32] bits FIFO depth is 8.

28CLKMODER/W0Specifies the methodology used to calculate the SPICLK divider.

0: SPICLK = 1 / (2CLK_GEN + 1) where CLK_GEN = 0 to 15.

1: SPICLK = 1 / (2 × (CLK_GEN + 1)) where CLK_GEN = 0 to 255.

27FRAMEURUNR/W00: The under-runs are generated whenever a read is attempted from an empty transmit FIFO.

1: The under-run condition is ignored for the complete frame, if the first data frame read resulted in a potential overflow; that is, the slave was not ready to transmit any data. If the first data frame is read from the FIFO and transmitted, an under-run is generated, when the FIFO becomes empty for any of the remaining packet frames (that is, while SSEL is active). Master operation does not create a transmit FIFO under-run condition.

26SPSR/W0Defines slave select behavior. See Table 13-3.
25SPHR/W0Clock phase
24SPOR/W0Clock polarity
[23:8]TXRXDFCOUNTR/W0001Number of data frames to be sent or received. Counts from 1.

Maximum value is 0XFFFF.

7INTTXTURUNR/W0Interrupt on transmit the under-run

0: Interrupt disabled
1: Interrupt enabled

6INTRXOVRFLOR/W0Interrupt on receive overflow

0: Interrupt disable
1: Interrupt enabled

5INTTXDATAR/W0Interrupt on transmit data

0: Interrupt disabled
1: Interrupt enabled

4INTRXDATAR/W0Interrupt on receive data

0: Interrupt disabled
1: Interrupt enabled

[3:2]TRANSFPRTLR/W0Transfer protocol

Decode:

0b00: Motorola SPI

0b01: TI synchronous serial
0b10: National Semiconductor MICROWIRE
0b11: Reserved

The transfer protocol cannot be changed while the SPI is enabled.

1MODER/W1SPI implementation

0: Slave
1: Master (default)

0ENABLER/W0Core enable

0: Disable (default)
1: Enable

The core does not respond to external signals (SPI_X_DI, SPI_X_DO) until this bit is enabled. SPI_X_CLK is driven low and SPI_X_DOE_N and SPI_X_SS (slave select) are driven inactive.