DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
224 of 313
NXP Semiconductors
UM10601
Chapter 17: LPC800 SPI0/1
17.7.3 Clocking and data rates
In order to use the SPI, clocking details must be defined. This includes configuring the
system clock and selection of the clock divider value in DIV. See
.
17.7.3.1 Data rate calculations
The SPI interface is designed to operate asynchronously from any on-chip clocks, and
without the need for overclocking.
In slave mode, this means that the SCK from the external master is used directly to run
the transmit and receive shift registers and other logic. The upper rate limit depends on
the speed of the logic and pin electronics, and signalling quality in the external
connections.
In master mode, the SPI rate clock produced by the SPI clock divider is used directly as
the outgoing SCK. Again, the upper rate limit depends on the speed of the logic and pin
electronics, and signalling quality in the external connections.
The SPI clock divider is an integer divider. The SPI in master mode can be set to run at
the same speed as the selected PCLK, or at lower integer divide rates. The SPI rate will
be = PCLK_SPIn / DIVVAL.
In slave mode, the clock is taken from the SCK input and the SPI clock divider is not used.
17.7.4 Slave select
The SPI block provides for one Slave Select input in slave mode or output in master
mode. The SSEL can be set for normal polarity (active low), or can be inverted (active
high). Representation of the SSEL in a register is always active low. If the SSEL is
inverted, this is done as the signal leaves/enters the SPI block.
In slave mode, the asserted SSEL that is connected to a pin will activate the SPI. In
master mode, the SSEL that is connected to a pin will be output as defined in the SPI
registers.
In master mode, the Slave Select is configured by the TXSSE LN field, which appears in
both the CCD and DETECT registers. In slave mode, the state of the SSEL is saved along
with received data in the RXSSELN field of the RXDAT register.
17.7.5 Data lengths greater than 16 bits
The SPI interface handles data frame sizes from 1 to 16 bits directly. Larger sizes can be
handled by splitting data up into groups of 16 bits or less. For example, 24 bits can be
supported as 2 groups of 16 bits and 8 bits or 2 groups of 12 bits, among others. Frames
of any size, including greater than 32 bits, can supported in the same way.
Details of how to handle larger data widths depend somewhat on other SPI configuration
options. For instance, if it is intended for Slave Selects to be deasserted between frames,
then this must be suppressed when a larger frame is split into more than one part.
Sending 2 groups of 12 bits with SSEL deasserted between 24-bit increments, for
instance, would require changing the value of the EOF bit on alternate 12-bit frames.