General Purpose I/O
Serial Peripheral Interface (SPI) Module (SPNU195E)
17
3
General Purpose I/O
Each of the SPI pins may be programmed via the SPI Pin Control Registers
(SPIPC1, SPIPC2, SPIPC3, SPIPC4, SPIPC5, SPIPC6) to be a general-
purpose I/O pin.
When the SPI module is not used, the SPI pins may be programmed to be
either general input or general output pins. The direction is controlled in the
SPIPC1 register. Note that each pin can be programmed to be either a SPI
pin or a GPIO pin through register SPIPC6.
If the SPI function is to be used, application software must ensure that each
pin is configured as a SPI pin and not a GPIO pin, or else unexpected
behavior may result.
Note: Unused SPI Pins
If there are four or five SPI pins available and only the three- or four-pin
configuration is desired, the remaining pin(s) can be configured and used as
general-purpose input/output (GIO) pins.