RM0082
LS_Synchronous serial peripheral (SSP)
Doc ID 018672 Rev 1
279/844
13.6.5 SSPCR1
register
SSPCR1 is the control register 1 and contains four different bit fields, which control various
functions within the SSP.
13.6.6 SSPDR
register
SSPDR is the data register and is 16 bits wide. When SSPDR is read, the entry in the
receive FIFO (pointed to by the current FIFO read pointer) is accessed. As data values are
removed by the PrimeCell SSP receive logic from the incoming data frame, they are placed
into the entry in the receive FIFO (pointed to by the current FIFO write pointer).
When SSPDR is written to, the entry in the transmit FIFO (pointed to by the write pointer), is
written to. Data values are removed from the transmit FIFO one value at a time by the
transmit logic. It is loaded into the transmit serial shifter, then serially shifted out onto the
SSPTXD pin at the programmed bit rate.
When a data size of less than 16 bits is selected, the user must right-justify data written to
the transmit FIFO. The transmit logic ignores the unused bits. Received data less than 16
bits is automatically right-justified in the receive buffer.
When the PrimeCell SSP is programmed for National Microwire frame format, the default
size for transmit data is eight bits (the most significant byte is ignored). The receive data size
is controlled by the programmer. The transmit FIFO and the receive FIFO are not cleared
even when SSE is set to zero. This allows the software to fill the transmit FIFO before
enabling the PrimeCell SSP.
shows the bit assignments for SSPDR.
Table 214.
SSPCR1 register bit assignments
Bit
Name
Type
Description
[15:04] -
-
Reserved. Read unpredictable, should be written as 0
[03]
SOD
R/W
Slave-mode output disable. This bit is relevant only in the slave mode
(MS=1). In multiple-slave systems, it is possible for an SSP master to
broadcast a message to all slaves in the system while ensuring that only
one slave drives data onto its serial output line. In such systems the RXD
lines from multiple slaves could be tied together.
To operate in such systems, the SOD bit can be set if the SSP slave is not
supposed to drive the SSPTXD line.
1’b0 = SSP can drive the TXD output in slave mode.
1’b1 = SSP must not drive the TXD output in slave mode.
[02]
MS
R/W
Master or slave mode select. This bit can be modified only when the SSP is
disabled (SSE=0):
1’b0 = device configured as master (default)
1’b1 = device configured as slave.
[01]
SSE
R/W
Synchronous serial port enable:
1’b0 = SSP operation disabled
1’b1 = SSP operation enabled.
[00]
LBM
R/W
Loop back mode:
1’b0 = Normal serial port operation enabled
1’b1 = Output of transmit serial shifter is connected to input of receive serial
shifter internally.