The SPI module is a 3-wire or 4-wire
bidirectional communication interface that converts data between parallel and serial
formats. The SPI performs serial-to-parallel conversion on data received from a
target device and performs parallel-to-serial conversion on data transmitted to a
target device. The SPI can be configured as either a controller or a peripheral
device. As a peripheral device, the SPI can be configured to disable the SPI output,
which allows coupling of a controller device with multiple peripheral devices. The
TX and RX paths are buffered with separate internal FIFOs.
The SPI also includes a programmable
bit rate clock divider and prescaler to generate the output serial clock derived
from the input clock of the SPI. Bit rates are generated based on the input clock;
see the device-specific data sheet for maximum bit rates.
The SPI module supports the following
features:
- Programmable interface operation
for Motorola™ SPI (3-wire and 4-wire), MICROWIRE, or TI Synchronous Serial
format
- Configurable as a controller or a
peripheral on the interface
- Programmable clock bit rate and
prescaler
- CRC8-CCITT or CRC16-CCITT CRC
capability and auto insertion in TX upon underflow
- Separate transmit (TX) and
receive (RX) first-in first-out buffers (FIFOs)
- If Data Size Select (DSS)
is 4 to 8 bits FIFOs are 16 locations deep and 8 bits wide
- If Data Size Select (DSS)
is 9 to 16 bits FIFOS are 8 locations deep and 16 bits wide
- Programmable data frame size from
4 bits to 16 bits (controller mode) or 7 to 16 bits (peripheral mode)
- Internal loop-back test mode for
diagnostic and debug testing
- Interrupts for transmit and
receive FIFOs, overrun and time-out interrupts, and DMA done interrupts
- Efficient transfers using micro
direct memory access controller (μDMA):
- Separate channels for
transmit and receive
- Receive single request
asserted when data is in the FIFO; burst request asserted when FIFO
contains a configurable number of entries
- Transmit single request
asserted when there is space in the FIFO; burst request asserted when
FIFO contains a configurable number of entries