DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
256 of 571
1.
How to read this chapter
The contents of this chapter apply to all LPC29xx parts.
2.
Introduction
The LPC29xx contains three Serial Peripheral Interface (SPI) modules to enable
synchronous serial communication with slave or master peripherals that have either
Motorola SPI or Texas Instruments synchronous serial interfaces.
The key features are:
•
Master or slave operation
•
Supports up to four slaves in sequential multi-slave operation
•
Programmable clock bit rate and prescale based on SPI source clock
(BASE_SPI_CLK), independent of system clock
•
Separate transmit and receive FIFO memory buffers; each 16 bits wide by
32 locations deep
•
Programmable choice of interface operation: Motorola SPI or Texas Instruments
synchronous serial interfaces
•
Programmable data-frame size from four to16 bits
•
Independent masking of transmit FIFO, receive FIFO and receive-overrun interrupts
•
Serial clock rate master mode: fserial_clk
≤
f
CLK_SPI
/2
•
Serial clock rate slave mode: fserial_clk = f
CLK_SPI
/4
•
Internal loop-back test mode
2.1 SPI functional description
The SPImodule performs serial-to-parallel conversion on data received from a peripheral
device. The transmit and receive paths are buffered with FIFO memories (16 bits wide x
32 words deep). Serial data is transmitted on SPI_TxD and received on SPI_RxD.
2.1.1 Modes of operation
The SPI module can operate in:
•
Master mode:
–
Normal transmission mode
–
Sequential-slave mode
•
Slave mode
Normal transmission mode
In normal transmission mode software intervention is needed every time a new slave
needs to be addressed. Also some interrupt handling is required.
UM10316
Chapter 18: LPC29xx SPI0/1/2
Rev. 00.06 — 17 December 2008
User manual