Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
Functional Description
In slave mode, the SSI transmits data each time the master initiates a transaction. If the TX FIFO is empty
and the master initiates, the slave transmits the eighth most-recent value in the transmit FIFO. If less than
eight values are successfully written to the TX FIFO since the power domain for the SSI module is
powered up, then 0 is transmitted. User or software is responsible to make valid data available in the FIFO
as needed. The SSI can be configured to generate an interrupt or a µDMA request when the FIFO is
empty.
20.4.2.2 Receive FIFO
The common RX FIFO is a 16-bit-wide, 8-location-deep, first-in first-out memory buffer. Received data
from the serial interface is stored in the buffer until read out by the CPU, which accesses the read FIFO by
reading the [SSI_DR] register.
When configured as a master or slave, serial data received through the SSIn_RX pin is registered before
parallel loading into the attached slave or master RX FIFO, respectively.
20.4.3 Interrupts
The SSI can generate interrupts when the following conditions are observed:
TX FIFO service (when the TX FIFO is half full or less)
RX FIFO service (when the RX FIFO is half full or more)
RX FIFO time-out
RX FIFO overrun
All interrupt events are ORed together before sent to the event fabric, so the SSI generates a single
interrupt request to the controller regardless of the number of active interrupts. The TX FIFO, RX FIFO,
RX time-out, and RX overrun interrupts can be masked by clearing the appropriate bit in the [SSI_IMSC]
register. Setting the appropriate mask bit in the [SSI_IMSC] register enables the interrupt. RX DMA done
and TX DMA done interrupts can be masked by setting the appropriate bit in the UDMA Channel Request
Done Mask [UDMA:DONEMASK] register. Clearing the appropriate bit in the [UDMA:DONEMASK]
register enables the RX or TX DMA done interrupt.
The status of the individual interrupt sources can be read from the SSI Raw Interrupt Status [SSI_RIS] and
SSI Masked Interrupt Status [SSI_MIS] registers.
The receive FIFO service interrupt request SSI_RIS.RXRIS is asserted when there are four or more valid
entries in the receive FIFO.
The transmit FIFO service interrupt request SSI_RIS.TXRIS is asserted when there are four or fewer valid
entries in the transmit FIFO. The transmitter interrupt is not qualified with the SSP enable signal, which
allows data to be written to the transmit FIFO before enabling the SSP and the interrupts and allows the
SSP and interrupts to be enabled so that data can be written to the transmit FIFO by an interrupt service
routine (ISR).
The receive overrun interrupt SSI_RIS.RORRIS request is asserted when the FIFO is already full and an
additional data frame is received, causing an overrun of the FIFO. Data is overwritten in the receive shift
register, but not in the FIFO.
The RX FIFO has a time-out period of 32 periods at the rate of SSIn_CLK (whether or not SSIn_CLK is
currently active), and is started when the RX FIFO goes from empty to not empty. If the RX FIFO is
emptied before 32 clocks pass, the time-out period is reset. As a result, the ISR should clear the RX FIFO
time-out interrupt just after reading out the RX FIFO by setting the RTIC bit in the SSI Interrupt Clear
[SSI_ICR] register to 1.
NOTE:
The interrupt should not be cleared so late that the ISR returns before the interrupt is
actually cleared, or the ISR may be re-activated unnecessarily.
1357
SWCU117A – February 2015 – Revised March 2015
Synchronous Serial Interface (SSI)
Copyright © 2015, Texas Instruments Incorporated