TM1100 Preliminary Data Book
Philips Semiconductors
16-6
PRELIMINARY INFORMATION
File: ssi.fm5, modified 7/24/99
16.5
SSI RECEIVE OPERATION
16.5.1
Setup SSI_CTL
Write the SSI_CTL to reset and enable the receiver. It is
required to reset both the transmitter and receiver simul-
taneously. This will set all registers and internal logic the
same as after a power-up reset. The recommended pro-
cedure is to set up all receiver related control bits before
performing a RXE assert. In particular, fields TCP, RSD,
IO1, IO2, FMS, FSP, MOD and TMS should NOT be
changed after enabling the receiver until after the next
receiver reset.
The direction of shift in the RxSR, mode, and the clock
edge polarity must also be configured in SSI_CTL. Set
the framing controls according to the external communi-
cation circuit’s requirements. Note that the Rx and Tx
machines share the framing and clock divide controls.
If the DSPCPU does not poll the SSI status registers, it
should enable the receiver interrupt and set the ILS field
by writing to the SSI_CTL to allow interrupt driven servic-
ing of the SSI receiver. Note that both transmit and re-
ceive use the same ILS field.
If the RxCLK is double the frequency of the data rate on
the SSI bus, SSI_CSR.CD2 can be used to divide the re-
ceive clock by two.
16.5.2
Operation Details
The
receive
state
machine
will
begin
shifting
SSI_RxDATA into the RxSR on the first active edge of
SSI_RxCLK received after the receiver is enabled (see
also
Figure 16-7). When full, the RxSR is parallel trans-
ferred to the first available RxFIFO entry and possibly
SSI_RxDR. Reception continues and when RxSR is full
again, a parallel load of the next available RxFIFO entry
from RxSR is accomplished. This continues until the re-
ceiver is disabled or reset. If the receive state machine
must transfer RxSR into one of the RxFIFO entries and
none of the RxFIFO entries is available, the value will be
lost and the receive overrun bit will be set.
16.5.3
Interrupt and Status
The status of the RxFIFO is visible in SSI_CSR, i.e. num-
ber of 32-bit words available for read (WAR), number of
words available for read is more than ILS (RDF). As the
receive state machine loads RxFIFO from the RxSR, it
sets the associated status bit. The SSI will generate an
internal interrupt when the number of full entries in
RxFIFO is more then SSI_CTL.ILS. If the receive state
machine attempts to load RxFIFO while none of the
RxFIFO entries is available, it will set the receive overrun
bit and generate an interrupt.
Due to the possibility of speculative reading of the
SSI_RxDR, the DSPCPU must explicitly indicate a suc-
cessful read of SSI_RxDR by writing a one in the LSB to
the SSI_RxACK register. The status fields of the
SSI_CSR will update within 1 highway clock cycle after
completion of writing to SSI_RXACK register.
16.6
FRAME TIMING
The frame timing can be controlled by the FSS and VSS
field in the SSI_CTL register.
The FSS[3:0] bits control the divide ratio for the program-
mable frame rate divider used to generate the frame
sync pulses. The valid value ranges from 1 to 16 slots of
16 bit each, e.g. a value of 5 indicates that a frame con-
tains 5 slots of 16 bits each. Note: the value 16 is accom-
plished by storing a 0 in this field. If a codec is connected
which generates 6 slots and the SSI block is pro-
grammed to 5 slots a framing error is indicated in
SSI_CSR.FES, and if TIE or RIE is enabled, an interrupt
is generated.
For an example of a frame timing diagram see
The VSS[3:0] bits control the number of valid slots in the
frame, starting from slot 1, e.g. if set to 4 and FSS set to
5, slots 1, 2, 3 and 4 in the frame contain valid data from
the FIFO of the transmitter and slot 5 will contain non-val-
4
5
6
7
...
29
30
31
RxSR
32-bit
MMIO
Reg
32-depth of 16-bit buffer
16-bit
SSI_RxDATA
0
1
2
3
rd_ptr
wr_ptr
To
Hiway
SSI_RxDR
Figure 16-7. The Receive Buffer operation.