LS_Synchronous serial peripheral (SSP)
RM0082
276/844
Doc ID 018672 Rev 1
To enable the operation of the PrimeCell SSP set the Synchronous Serial Port Enable (SSE)
bit to 1.
Bit rate generation
Dividing down the input clock SSPCLK derives the serial bit rate. The clock is first divided by
an even prescale value CPSDVSR from 2 to 254, which is programmed in SSPCPSR. The
clock is further divided by a value from 1 to 256, which is 1 + SCR, where SCR is the value
programmed in SSPCR0.
The frequency of the output signal bit clock SSPCLKOUT is:
For example, if SSPCLK is 3.6864 MHz, and CPSDVSR = 2, then SSPCLKOUT has a
frequency range from 7.2 kHz to 1.8432 MHz.
13.5.5 Frame
format
Each data frame is between 4 and 16 bits long depending on the size of data programmed,
and is transmitted starting with the MSB. There are three basic frame types that can be
selected:
●
Texas Instruments synchronous serial
●
Motorola SPI
●
National semiconductor microwire.
For all three formats, the serial clock (SSPCLKOUT) is held inactive while the SSP is idle,
and transitions at the programmed frequency only during active transmission or reception of
data. The idle state of SSPCLKOUT is utilized to provide a receive timeout indication that
occurs when the receive FIFO still contains data after a timeout period.
For Motorola SPI and National Semiconductor Microwire frame formats, the serial frame
(SSPFSSOUT) pin is active LOW, and is asserted (pulled down) during the entire
transmission of the frame.
For Texas Instruments synchronous serial frame format, the SSPFSSOUT pin is pulsed for
one serial clock period starting at its rising edge, prior to the transmission of each frame. For
this frame format, both the SSP and the off-chip slave device drive their output data on the
rising edge of SSPCLKOUT, and latch data from the other device on the falling edge.
Unlike the full-duplex transmission of the other two frame formats, the National
Semiconductor Microwire format uses a special master-slave messaging technique, which
operates at half-duplex. In this mode, when a frame begins, an 8 bit control message is
transmitted to the off-chip slave. During this transmission no incoming data is received by
the SSP. After the message has been sent, the off-chip slave decodes it and, after waiting
one serial clock after the last bit of the 8 bit control message has been sent, responds with
the requested data. The returned data can be 4 to 16 bits in length, making the total frame
length anywhere from 13 to 25 bits.
SSPCLKOUT
FSSPCLK
(
)
CPSDVR
1
SCR
+
(
)
⋅
[
]
----------------------------------------------------------------
=