General-Purpose I/O
1142
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Multi-Buffered Serial Peripheral Interface Module (MibSPI) with Parallel Pin
Option (MibSPIP)
24.3.2.1 Input/Output Loopback Mode Operation in Slave Mode
In multi-buffer slave mode, there are some additional requirements for using I/O loopback mode (IOLPBK).
In multi-buffer slave mode, the chip-select pins are the triggers for various TGs. Enabling the IOLPBK
mode by writing 0xA to the IOLPBTSTENA bits of the IOLPBKTSTCR register triggers TG0 by driving
SPICS to 0. The actual number of chip selects can be programmed to have any or all of the SPICS pins
as functional. All other configurations should be completed before enabling the IOLPBK mode in multi-
buffer slave mode since it triggers TG0.
After the first buffer transfer is completed, the CSNR field of the current buffer is used to trigger the next
buffer. So, if multiple TGs are desired to be tested, then the CSNR field of the final buffer in each TG
should hold the number of the next TG to be triggered. As long as TG boundaries are well defined and are
enabled, the completion of one TG will trigger the next TG.
To stop the transfer in multi-buffer slave mode in I/O Loopback configuration, either IOLPBK mode can be
disabled by writing 0x5 to the IOLPBTSTENA bits or all of the TGs can be disabled.
24.4 General-Purpose I/O
All of the SPI pins may be programmed via the SPIPCx control registers to be either functional or general-
purpose I/O pins.
If the SPI function is to be used, application software must ensure that at least the SPICLK pin and the
SOMI and/or SIMO pins are configured as SPI functional pins, and not as GIO pins, or else the SPI state
machine will be held in reset, preventing SPI transactions.
SPI pins support:
•
internal pull-up resistors
•
internal pull-down resistors
•
open-drain or push-pull mode
24.5 Low-Power Mode
The SPI can be put into either local or global low-power mode. Global low-power mode is asserted by the
system and is not controlled by the SPI. During global low-power mode, all clocks to the SPI are turned
off, making the module completely inactive.
Local low-power mode is asserted by setting the POWERDOWN (SPIGCR1[8]) bit; setting this bit stops
the clocks to the SPI internal logic and registers. Setting the POWERDOWN bit causes the SPI to enter
local low-power mode and clearing the POWERDOWN bit causes SPI to exit from local low-power mode.
All registers remain accessible during local power-down mode, since the clock to the SPI registers is
temporarily re-enabled for each access. RAM buffers are also accessible during low power mode.
NOTE:
Since entering a low-power mode has the effect of suspending all state-machine activities,
care must be taken when entering such modes to ensure that a valid state is entered when
low-power mode is active. Application software must ensure that a low power mode is not
entered during a data transfer.