Module Configuration
1146
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Multi-Buffered Serial Peripheral Interface Module (MibSPI) with Parallel Pin
Option (MibSPIP)
24.8 Module Configuration
MibSPI/MibSPIP can be configured to function as Normal SPI and Multi-buffered SPI. Upon power-up or a
system-level reset, each bit in the module registers is set to a default state. The registers are writable only
after the RESET bit is set to 1.
24.8.1 Compatibility (SPI) Mode Configuration
The following list details the configuration steps that software should perform prior to the transmission or
reception of data. As long as the SPIEN bit in the Global Control Register 1 (SPIGCR1) is cleared to 0 the
entire time that the SPI is being configured, the order in which the registers are programmed is not
important.
•
Enable SPI by setting RESET bit.
•
Configure the SIMO, SOMI, SPICLK, and optional SPICS and SPIENA pins for SPI functionality by
setting the corresponding bit in SPIPC0 register.
•
Configure the module to function as Master or Slave using CLKMOD and MASTER bits.
•
Configure the required SPI data format using SPIFMTx register.
•
If the module is selected to function as Master, the delay parameters can be configured using
SPIDELAY register.
•
Enable the Interrupts using SPIINT0 register if required.
•
Select the chip select to be used by setting CSNR bits in SPIDAT1 register.
•
Configure CSHOLD and WDEL bits in SPIDAT1 register if required.
•
Select the Data word format by setting DFSEL bits. Select the Number of the configured SPIFMTx
register (0 to 3) to used for the communication.
•
Set LOOPBACK bit to connect the transmitter to the receiver internally. (This feature is used to perform
a self-test. Do not configure for normal communication to external devices).
•
Set SPIEN bit to 1 after the SPI is configured.
•
Perform Transmit and receive data, using SPIDAT1 and SPIBUF register.
•
You must wait for TXFULL to reset or TXINT before writing next data to SPIDAT1 register.
•
You must wait for RXEMPTY to reset or RXINT before reading the data from SPIBUF register.