Registers
1442
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
29.3.2 SPI Global Control Register 1 (SPIGCR1)
The SPI global control register 1 (SPIGCR1) is shown in
and described in
Figure 29-19. SPI Global Control Register 1 (SPIGCR1)
31
25
24
Reserved
ENABLE
R-0
R/W-0
23
17
16
Reserved
LOOPBACK
R-0
R/W-0
15
9
8
Reserved
POWERDOWN
R-0
R/W-0
7
2
1
0
Reserved
CLKMOD
MASTER
R-0
R/W-0
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 29-10. SPI Global Control Register 1 (SPIGCR1) Field Descriptions
Bit
Field
Value
Description
31-25
Reserved
0
Reads return zero and writes have no effect.
24
ENABLE
SPI enable. This bit enables the SPI transfers. The other SPI configuration registers except
SPIINT0.DMAREQEN should be configured before writing a 1 to this bit. This will prevent the
SPI from responding to bus operations erroneously while it is in the process of being
configured. The SPIINT0.DMAREQEN should be enabled after setting ENABLE. If
SPIINT0.DMAREQEN is enabled before setting ENABLE then the first DMA request that occurs
before the SPI is ready for data transfer may get dropped.
When ENABLE bit is cleared to 0, the following SPI registers get forced to their default states
(to 0s except for RXEMPTY bit in SPIBUF):
• Both TX and RX shift registers
• The TXDATA fields of SPIDAT0 and SPIDAT1 registers
• All the fields of the SPIFLG register
• Contents of SPIBUF and the internal RXBUF registers
0
SPI is not activated for transfers.
1
Activates SPI.
23-17
Reserved
0
Reads return zero and writes have no effect.
16
LOOPBACK
Internal loop-back test mode. The internal self-test option can be enabled by setting this bit. If
the SPIx_SIMO and SPIx_SOMI pins are configured with SPI functionality, then the SPIx_SIMO
pin is internally connected to the SPIx_SOMI pin. The transmit data is looped back as receive
data and is stored in the receive field of the concerned buffer.
Externally, during loop-back operation, the SPIx_CLK pin outputs an inactive value, SPIx_SIMO
and SPIx_SOMI pins remain in high-impedance state. The SPI has to be initialized in master
mode before the loop-back can be selected. If the SPI is initialized in slave mode or a data
transfer is ongoing, errors may result.
0
Internal loop-back test mode disabled.
1
Internal loop-back test mode enabled.
15-9
Reserved
0
Reads return zero and writes have no effect.
8
POWERDOWN
When active, the SPI state machine enters a power-down state.
0
The SPI is in active mode.
1
The SPI is in power-down mode.
7-2
Reserved
0
Reads return zero and writes have no effect.