
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
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
377 of 808
1.
Basic configuration
The SPI is configured using the following registers:
1. Power: In the PCONP register (
), set bit PCSPI.
Remark:
On reset, the SPI is enabled (PCSPI = 1).
2. Clock: In the PCLKSEL0 register (
), set bit PCLK_SPI. In master mode,
the clock must be an even number greater than or equal to 8 (see
3. Pins: The SPI pins are configured using both PINSEL0 (
(
), as well as the PINMODE (
) register. PINSEL0[31:30] is
used to configure the SPI CLK pin. PINSEL1[1:0], PINSEL1[3:2] and PINSEL1[5:4]
are used to configure the pins SSEL, MISO and MOSI, respectively.
4. Interrupts: The SPI interrupt flag is enabled using the S0SPINT[0] bit
(
). The SPI interrupt flag must be enabled in the NVIC, see
.
Remark:
SSP0 is intended to be used as an alternative for the SPI interface, which is
included as a legacy peripheral. Only one of these peripherals can be used at the any one
time.
2.
Features
•
Compliant with Serial Peripheral Interface (SPI) specification.
•
Synchronous, Serial, Full Duplex Communication.
•
SPI master or slave.
•
Maximum data bit rate of one eighth of the peripheral clock rate.
•
8 to 16 bits per transfer.
3.
SPI overview
SPI is a full duplex serial interface. It can handle multiple masters and slaves being
connected to a given bus. Only a single master and a single slave can communicate on
the interface during a given data transfer. During a data transfer the master always sends
8 to 16 bits of data to the slave, and the slave always sends a byte of data to the master.
UM10360
Chapter 17: LPC17xx SPI
Rev. 00.06 — 5 June 2009
User manual