Functional Description
1528
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Quad Synchronous Serial Interface (QSSI)
23.3.6 Interrupts
The QSSI can generate interrupts when the following conditions are observed:
•
Transmit FIFO service (when the transmit FIFO is half full or less)
•
Receive FIFO service (when the receive FIFO is half full or more)
•
Receive FIFO time-out
•
Receive FIFO overrun
•
End of transmission
•
Receive DMA transfer complete
•
Transmit DMA transfer complete
All of the interrupt events are ORed together before being sent to the interrupt controller, so the QSSI
generates a single interrupt request to the controller regardless of the number of active interrupts. Each of
the seven individual maskable interrupts can be masked by clearing the appropriate bit in the SSI Interrupt
Mask (SSIIM) register (see
). Setting the appropriate mask bit enables the interrupt.
The individual outputs, along with a combined interrupt output, allow use of either a global interrupt service
routine or modular device drivers to handle interrupts. The transmit and receive dynamic dataflow
interrupts have been separated from the status interrupts so that data can be read or written in response
to the FIFO trigger levels. The status of the individual interrupt sources can be read from the SSI Raw
Interrupt Status (SSIRIS) and SSI Masked Interrupt Status (SSIMIS) registers (see
and
, respectively).
The RX FIFO has an associated time-out counter which starts to down count at the same time the RX
FIFO is flagged as not empty by the RNE bit in the SSISR register. The counter is reset any time a new or
next byte is written to the RX FIFO, thus the counter will continue to count down to zero unless there is
new activity. The time-out period is 32 periods based on the period of SSInClk. When the counter reaches
zero, a time-out interrupt bit, RTRIS, is set in the SSIRIS register. The time-out interrupt can be cleared by
writing a 1 to the RTIC bit of the SSI Interrupt Clear (SSIIC) register or by emptying the RX FIFO. If the
interrupt is cleared and there is residual data left in the RX FIFO or new data entries have been written,
the timer count down initiates and the interrupt will be reasserted after 32 periods have been counted.
The EOT interrupt indicates that the data has been transmitted completely and is only valid for master
mode devices and operations. This interrupt can be used to indicate when it is safe to turn off the QSSI
module clock or enter sleep mode. In addition, because transmitted data and received data complete at
exactly the same time, the interrupt can also indicate that read data is ready immediately, without waiting
for the receive FIFO time-out period to complete.
NOTE:
In Freescale SPI mode only, a condition can be created where an EOT interrupt is
generated for every byte transferred even if the FIFO is full. If the µDMA has been
configured to transfer data from this QSSI to a Master QSSI on the device using external
loopback, an EOT interrupt is generated by the QSSI slave for every byte even if the FIFO is
full.
23.3.7 Frame Formats
Each data frame is between 4 and 16 bits long in legacy mode and 8-bits in advanced, bi-, and quad-SSI
mode and is transmitted starting with the MSB. There are two basic frame types that can be selected by
programming the FRF bit in the SSICR0 register:
•
TI synchronous serial
•
Freescale SPI
NOTE:
Advanced, Bi- and Quad-SSI modules only supports Freescale mode when SPH = 0, SPO =
0, and DDS = 0x8 in the SSI Control 0 (SSICR0) register.