Philips Semiconductors
Synchronous Serial Interface
File: ssi.fm5, modified 7/24/99
PRELIMINARY INFORMATION
16-5
16.4
SSI TRANSMIT OPERATION
16.4.1
Setup SSI_CTL
Write the SSI_CTL to reset and enable the transmitter. It
is required to reset both the transmitter and receiver si-
multaneously. This will set all registers and internal logic
the same as after a power-up reset. The recommended
procedure is to set up all transmitter related control bits
before performing a TXE assert. In particular, fields TCP,
RSD, IO1, IO2, FMS, FSP, MOD and TMS should NOT
be changed after enabling the transmitter until after the
next transmitter reset.
The TxCLK is taken from the SSI_IO1 pin or from the re-
ceive clock, dependent on SSI_CTL.IO1. The direction of
shift in the TxSR and the clock edge to shift on must also
be configured in SSI_CTL. If the DSPCPU does not poll
the SSI status registers, it should enable the transmitter
interrupt and set the ILS field by writing to the SSI_CTL
to allow interrupt driven servicing of the SSI. Note that
both transmit and receive use the same ILS field. Set the
framing controls, slot size, and mode required according
to the external communication circuit’s requirements by
writing the SSI_CTL. Finally, set the interrupt level to re-
spond to empty levels in the TxFIFO. Note that the Rx
and Tx machines share the framing and clock divide con-
trols. They cannot be set to different values for Rx and
Tx.
If the RxCLK used to derive the TxCLK needs a divide by
two, this is done by setting SSI_CSR.CD2.
16.4.2
Operation Details
The transmit state machine will wait for transmit data to
be written to the SSI_TxDR register. (see also
propagated through two entries of the TxFIFO (TxFIFO
is 16-bit and SSI_TxDR is 32-bit) and transferred to Tx-
SR, synchronized to TxFSX. The order of transferring the
two 16-bit parts in the 32-bit SSI_TxDR can be config-
ured by the endian bit SSI_CTL.EMS. Data will begin
shifting out of TxSR, one bit for each active edge of the
TxCLK, from either bit 15 (MSB first SSI_CTL setting) or
from bit 0 (LSB first) until TxSR is empty. For endian con-
trol and shift direction see also subsection
16.8. When
the shift register is empty, the transmit state machine will
load the value from the next available TxFIFO location
and begin shifting out that data. The transmission contin-
ues until the transmit state machine is disabled or reset.
If the last available TxFIFO has not been updated at the
appropriate time to reload TxSR, the last transmitted
frame is retransmitted and a transmit underrun error is in-
dicated in the transmitter status SSI_CSR.TUE
16.4.3
Interrupt and Status
The refill status of the SSI_TxDR register is stored in
SSI_CSR. As the transmit state machine loads a TxFIFO
register to the TxSR, it sets the associated status bits.
The SSI will generate an internal interrupt when the num-
ber of empty words in the TxFIFO rises above the level
set by SSI_CSR.ILS. If the transmit state machine at-
tempts to read a TxFIFO while the last available TxFIFO
has not been updated, it will set the transmit underrun bit.
This can cause a protocol error in the transmission.
The number of available word buffers (SSI_CSR.WAW)
and transmitter data register empty (SSI_CSR.TDE) in-
formation is updated automatically by the SSI block.
...
7
6
5
4
3
2
1
0
TxSR
32-bit
MMIO
Reg
30-depth of 16-bit buffer
16-bit
SSI_TxDATA
29
28
27
...
rd_ptr
From
Hiway
wr_ptr
SSI_TxDR
Figure 16-6. The Transmit Buffer operation.