www
.mcu.com.cn
165
/
239
Rev.
1.00
CMS80F731x Reference Manual
20.
SPI Module
20.1 Overview
This SPI is a fully configurable SPI master/slave device that allows the user to configure the polarity and phase of the serial
clock signal SCLK. The serial clock line (SCLK) is synchronized with the shifting and sampling of information on two independent
serial data lines, and the SPI data is sent and received simultaneously. SPI allows the MCU to communicate with serial
peripherals, it is also capable of interprocessor-to-processor communication in multi-host systems, and is a technology-
independent design that can be implemented in a variety of process technologies.
The SPI system is flexible enough to connect directly with many standard product peripherals from several manufacturers.
To accommodate most of the available synchronous serial peripherals, clock control logic allows the selection of clock polarity
and phase. The system can be configured as a master device or slave device, and when the SPI is configured as a host device,
the software chooses one of eight different bit rates for the serial clock, up to the system clock divided by 4 (Fsys/4).
The SPI slave chip selects an addressable SPI slave device to exchange serial data. When the SPI is used as the host
device, the SPI auto-drive is selected by the slave selection control register SSCR. The SPI controller includes logical error
detection to support interprocessor communication, such as the write conflict detector that indicates when data is written to the
serial shift register during transfer.
SPI has the following features:
◆
Full-duplex synchronous serial data transfer.
◆
Supports master/slave mode.
◆
Support for multi-host systems.
◆
System error detection.
◆
Interrupt generation.
◆
Supports speeds up to 1/4 of the system clock (F
SYS
≤24MHz).
◆
The bit rate produces 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512 of the system clock.
◆
Four transmission formats are supported.
◆
The simple interface allows easy connection to the microcontroller.