UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
155 of 268
NXP Semiconductors
UM10413
MPT612 User manual
17.3 Pin
description
17.4 Register
description
The SPI contains 5 registers as shown in
. All registers are byte, halfword and
word accessible.
[1]
Reset value reflects the data stored in used bits only. It does not include the content of reserved bits.
17.4.1 SPI Control register (S0SPCR - 0xE002 0000)
Register S0SPCR controls the operation of the SPI0 as per the configuration bits setting.
Table 140. SPI pin description
Pin Name
Type
Pin Description
SCK0
input/output
serial clock.
The SPI is a clock signal used to synchronize the transfer of data across the
SPI interface. The SPI is always driven by the master and received by the slave. The clock is
programmable to be active HIGH or active LOW. The SPI is only active during a data
transfer. Any other time, it is either in its inactive state, or 3-stated.
SSEL0
input
slave select.
The SPI slave select signal is an active LOW signal that indicates which slave
is currently selected to participate in a data transfer. Each slave has its own unique slave
select signal input. The SSEL must be LOW before data transactions begin and normally
stays LOW for the duration of the transaction. If the SSEL signal goes HIGH any time during
a data transfer, the transfer is considered to be aborted. In this event, the slave returns to
idle, and any data that was received is thrown away. There are no other indications of this
exception. This signal is not directly driven by the master. It can be driven by a simple
general-purpose I/O under software control.
On pin MPT612, SSEL0 can be used for a different function when the SPI0 interface is only
used in Master mode. For example, the pin hosting the SSEL0 function can be configured as
an output digital GPIO pin or used to select one of the match outputs.
MISO0
input/output
master in slave out.
The MISO signal is a unidirectional signal used to transfer serial data
from the slave to the master. When a device is a slave, serial data is output on this signal.
When a device is a master, serial data is input on this signal. When a slave device is not
selected, the slave drives the signal high impedance.
MOSI0
input/output
master out slave in.
The MOSI signal is a unidirectional signal used to transfer serial data
from the master to the slave. When a device is a master, serial data is output on this signal.
When a device is a slave, serial data is input on this signal.
Table 141. SPI register map
Name
Description
Access
Reset
value
Address
S0SPCR
SPI control register. Controls SPI operation.
R/W
0x00
0xE002 0000
S0SPSR
SPI status register. Shows status of the SPI.
RO
0x00
0xE002 0004
S0SPDR
SPI data register. Bi-directional register provides
SPI transmit and receive data. Transmit data is
provided to the SPI0 by writing to this register.
Data received by the SPI0 can be read from this
register.
R/W
0x00
0xE002 0008
S0SPCCR SPI clock counter register. Controls the
frequency of a master’s SCK0.
R/W
0x00
0xE002 000C
S0SPINT
SP interrupt flag. Contains the interrupt flag for
the SPI interface.
R/W
0x00
0xE002 001C