![Texas Instruments AM1808 Скачать руководство пользователя страница 1421](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581421.webp)
Architecture
1421
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
29.2.8 SPI Operation: 4-Pin with Chip Select Mode
The 4-pin with chip select option is a superset of the 3-pin option and uses the chip select (SPIx_SCS[n])
pin in addition to the clock (SPIx_CLK) and data (SPIx_SOMI and SPIx_SIMO) pins.
shows
the SPI 4-pin chip select option.
To select the 4-pin with chip select option, the SPIx_CLK, SPIx_SOMI, SPIx_SIMO, and SPIx_SCS[n]
pins should be configured as functional pins by configuring the SPI pin control register 0 (SPIPC0). The
SPIx_ENA pin can be used as a general-purpose I/O pin by configuring the SPIPC1 through SPIPC5
registers.
In SPI master mode, the SPIx_SOMI pin output buffer is in a high-impedance state and the SPIx_CLK,
SPIx_SIMO, and SPIx_SCS[n] pin output buffer is enabled. In SPI slave mode, the SPIx_CLK,
SPIx_SIMO, and SPIx_SCS[n] pin output buffer is in a high-impedance state, and the SPIx_SOMI pin
output buffer is enabled when SPIx_SCS[n] is asserted and in a high-impedance state when SPIx_SCS[n]
is deasserted.
In slave mode with the chip select option enabled, the SPI ignores all transactions on the bus unless
SPIx_SCS[n] is asserted by the bus master. It also 3-states its output pin when SPIx_SCS[n] is
deasserted by the master to avoid conflicting with the active slave device on the bus.
In master mode, the SPIx_SCS[n] pin functions as an output, and toggles when a specific slave device is
selected. However, this is most useful on devices that support multiple SPIx_SCS[n] pins.
However, one reason to use the SPIx_SCS[n] pin as a functional pin for the SPI master is to take
advantage of the timing parameters that can be set using the SPI delay register (SPIDELAY). The
SPIDELAY allows delays to be added automatically so that the slave timing requirements between clock
and chip select may be more easily met. Another reason would be to make use of the error detection built
into the SPI.
NOTE:
Either SPIDAT0 or SPIDAT1 can be used on both master and slaves sides.