Product Specs

Table Of Contents
48 SPI Serial peripheral interface master
Page
514
E0
E1
E2
E3
READY
MOSI
MISO
TXD
TXD+1
RXD-1
RXD
Mode Clock polarity
CPOL
Clock phase
CPHA
SPI_MOD 0 (Leading)
SPI_MOD 0 (Leading)
SPI_MOD 1 (Trailing)
SPI_MOD 1 (Trailing)
0 (Active High)
1 (Active Low)
0 (Active High)
1 (Active Low)
48 SPI Serial peripheral interface master
The SPI master provides a simple CPU interface which includes a TXD register for sending data and an RXD
register for receiving data. This section is added for legacy support for now.
PSEL.MISO PSEL.SCK PSEL.MOSI
Figure 150: SPI master
RXD-1 and TXD+1 illustrate the double buffered version of RXD and TXD respectively.
48.1 Functional description
The TXD and RXD registers are double-buffered to enable some degree of uninterrupted data flow in and
out of the SPI master.
The SPI master does not implement support for chip select directly. Therefore, the CPU must use available
GPIOs to select the correct slave and control this independently of the SPI master. The SPI master supports
SPI modes 0 through 3.
Table 120: SPI modes
48.1.1 SPI master mode pin configuration
The different signals SCK, MOSI, and MISO associated with the SPI master are mapped to physical pins.
This mapping is according to the configuration specified in the PSELSCK, PSELMOSI, and PSELMISO
registers respectively. If a value of 0xFFFFFFFF is specified in any of these registers, the associated SPI
master signal is not connected to any physical pin. The PSELSCK, PSELMOSI, and PSELMISO registers
and their configurations are only used as long as the SPI master is enabled, and retained only as long as
the device is in ON mode. PSELSCK, PSELMOSI, and PSELMISO must only be configured when the SPI
master is disabled.
To secure correct behavior in the SPI, the pins used by the SPI must be configured in the GPIO peripheral
as described in Table 121: GPIO configuration on page 515 prior to enabling the SPI. The SCK must