![Analog Devices ADuCM355 Скачать руководство пользователя страница 241](http://html1.mh-extra.com/html/analog-devices/aducm355/aducm355_hardware-reference-manual_2939808241.webp)
UG-1262
Rev. B | Page 241 of 312
SERIAL PERIPHERAL INTERFACES
SPI FEATURES
The
integrates two complete hardware SPIs with the following standard features:
Serial clock phase mode and serial clock polarity mode.
LSB first transfer option.
Loopback mode.
Master or slave mode.
Flow control, the SPI for Channel 1 (SPI1) channel only.
Support for 3-pin SPI master or slave, single bidirectional data pin.
Transfer and interrupt mode.
Continuous transfer mode.
Transmit and receive FIFO.
Interrupt mode. Interrupt after one byte to eight bytes.
Receive overflow mode and transmit under run mode.
Open circuit data output mode.
Full duplex communications supported (simultaneous transmit and receive).
SPI OVERVIEW
The
integrates two complete hardware SPIs. SPI is an industry-standard, synchronous serial interface that allows eight bits
of data to be synchronously transmitted and simultaneously received (also known as full duplex). The two SPIs implemented on the
can operate to a maximum bit rate of 6.5 Mbps in both master and slave modes.
Optional modes of operation include the following:
Flow control. Supported by SPI1, which has an optional extra ready pin (P0.3/SPI0_CS). Flow control helps slow slave devices to
interface with fast masters. Another option available is to insert wait states during ready data, which is helpful in master mode when
the user is looking to read bursts of data from a slave and leave a timing gap between each burst. The gap or wait state is timer controlled.
Fast mode.
3-pin mode. The SPI0_MOSI and SPI1_MOSI pins in this mode are bidirectional pins.
The SPI blocks have an additional DMA feature. Each SPI block has two DMA channels that interface with a microDMA controller of
the Arm Cortex-M3 processor. One DMA channel is used for transmitting data, and the other is used for receiving data.
SPI OPERATION
In SPI operation, CS refers to the SPI0_CS pin and the SPI1_CS pin, SCLK refers to the SPI0_CLK pin and the SPI1_CLK pin, MOSI
refers to the SPI0_MOSI pin and the SPI1_MOSI pin, and MISO refers to the SPI0_MISO pin and the SPI1_MISO pin.
The SPI port can be configured for master or slave operation, and consists of four sets of pins: MISO, MOSI, SCLK, and CS. The GPIOs
used for SPI communication must be configured in SPI mode before enabling the SPI peripheral. Enable the internal pull-up resistors on
the MISO and MOSI pins when communicating over SPI.
MISO Pin
The MISO pin is configured as an input line in master mode and an output line in slave mode. The MISO line on the master (data in)
must be connected to the MISO line in the slave device (data out). The data is transferred as byte wide (8-bit) serial data, MSB first.
MOSI Pin
The MOSI pin is configured as an output line in master mode and an input line in slave mode. The MOSI line on the master (data out)
must be connected to the MOSI line in the slave device (data in). The data is transferred as byte wide (8-bit) serial data, MSB first.
SCLK Pin
The master SCLK synchronizes the data being transmitted and received through the MOSI SCLK period. Therefore, a byte is transmitted
or received after eight SCLK periods. SCLK is configured as an output in master mode and as an input in slave mode.