153
Philips Semiconductors
Preliminary User Manual
LPC2119/2129/2292/2294
ARM-based Microcontroller
REGISTER DESCRIPTION
The SPI contains 5 registers as shown in Table 115. All registers are byte, half word and word accessible.
*Reset Value refers to the data stored in used bits only. It does not include reserved bits content.
SPI Control Register (S0SPCR - 0xE0020000, S1SPCR - 0xE0030000)
The SPCR register controls the operation of the SPI as per the configuration bits setting.
Table 115: SPI Register Map
Generic
Name
SPI0
Address &
Name
SPI1
Address &
Name
Description
Access
Reset
Value*
SPCR
0xE0020000
S0SPCR
0xE0030000
S1SPCR
SPI Control Register. This register controls the operation of
the SPI.
Read/
Write
0
SPSR
0xE0020004
S0SPSR
0xE0030004
S1SPSR
SPI Status Register. This register shows the status of the
SPI.
Read
Only
0
SPDR
0xE0020008
S0SPDR
0xE0030008
S1SPDR
SPI Data Register. This bi-directional register provides the
transmit and receive data for the SPI. Transmit data is
provided to the SPI by writing to this register. Data received
by the SPI can be read from this register.
Read/
Write
0
SPCCR
0xE002000C
S0SPCCR
0xE003000C
S1SPCCR
SPI Clock Counter Register. This register controls the
frequency of a master’s SCK.
Read/
Write
0
SPINT
0xE002001C
S0SPINT
0xE003001C
S1SPINT
SPI Interrupt Flag. This register contains the interrupt flag for
the SPI interface.
Read/
Write
0
Table 116: SPI Control Register (S0SPCR - 0xE0020000, S1SPCR - 0xE0030000)
SPCR
Function
Description
Reset
Value
2:0
Reserved
Reserved, user software should not write ones to reserved bits. The value read from
a reserved bit is not defined.
NA
3
CPHA
Clock phase control determines the relationship between the data and the clock on
SPI transfers, and controls when a slave transfer is defined as starting and ending.
When 1, data is sampled on the second clock edge of the SCK. A transfer starts with
the first clock edge, and ends with the last sampling edge when the SSEL signal is
active.
When 0, data is sampled on the first clock edge of SCK. A transfer starts and ends
with activation and deactivation of the SSEL signal.
0
4
CPOL
Clock polarity control. When 1, SCK is active low. When 0, SCK is active high.
0
5
MSTR
Master mode select. When 1, the SPI operates in Master mode. When 0, the SPI
operates in Slave mode.
0
6
LSBF
LSB First controls
which direction each byte is shifted when transferred.
When
1, SPI data is transferred LSB (bit 0) first. When 0, SPI data is transferred MSB (bit
7) first.
0
7
SPIE
Serial peripheral interrupt enable. When 1, a hardware interrupt is generated each
time the SPIF or MODF bits are activated. When 0, SPI interrupts are inhibited.
0