9
SPI
9.1 Introduction
Serial Peripheral Interface Bus(SPI) is a synchronous serial communication interface specification for short-range com-
munication. Devices use full-duplex mode for communication. There is a master and one or more slaves. Requires
at least 4 wires, in fact 3 wires are also available (the one-way transmission), including SDI (data input), SDO (data
output), SCLK (clock), CS (chip select).
9.2 Main features
• Can be used as SPI master or SPI slave
• The transmit and receive channels each have a FIFO with a depth of 4 words
• Both master and slave devices support 4 clock formats(CPOL,CPHA)
• Both master and slave devices support 1/2/3/4 byte transmission mode
• Flexible clock configuration, support up to 40M clock
• Configurable MSB/LSB priority transmission
• Acceptance filtering function
• Timeout mechanism under the slave
• Support DMA transfer mode
9.3 Function description
9.3.1 Clock control
According to different clock phases and polarity settings, the SPI clock has four modes, which can be set by bit4
(CPOL) and bit5 (CPHA) of the SPI_CONFIG register. CPOL is used to determine the level of the SCK clock signal
BL602/604 Reference Manual
115/ 195
@2020 Bouffalo Lab