6-24 DSP56012 User’s Manual MOTOROLA

Serial Audio Interface
Programming Considerations

6.4 PROGRAMMING CONSIDERATIONS

This section discusses some important considerations for programming the SAI.

6.4.1 SAI Operation During Stop

The SAI operation cannot continue when the DSP is in the Stop state, since no DSP
clocks are active. Incoming serial data will be ignored. While the DSP is in the Stop
state, the SAI sections will remain in the individual reset state and the status bits in
the RCS and TCS registers will be cleared. No control bits in the RCS and TCS
registers are affected. It is recommended that the SAI be disabled before entering the
Stop state.

6.4.2 Initiating a Transmit Session

The recommended method of initializing a transmit session is to first write valid data
to the transmit data registers and then enable the transmit operation. This will ensure
that known data will be transmitted as soon as the transmitters are enabled (if
operating in the Master mode), or as soon as the word select event for the left word is
detected on the WST pin (if operating in the Slave mode). Note that even though the
TRDE and TLDE status flags are always cleared while the transmitter section is in the
individual reset state, the transmit data registers may be written in this state. The
data will remain in the transmit data registers while the transmitter section is in the
individual reset state, and will be transferred to the transmit shift registers only after
the respective transmitters are enabled and when the left word transmission slot
occurs (immediately for Master mode, or according to WST for Slave mode).

6.4.3 Using a Single Interrupt to Service Both Receiver and

Transmitter Sections

It is possible to use a single interrupt routine to service both the receiver and
transmitter sections if both sections are fully synchronized. To ensure full
synchronization, both sections must operate with the same protocol and the same
clock source. Only the receive interrupts (RXIE = 1) should be enabled for proper
operation in this configuration. When the condition arises for the receive interrupt to
occur, the same interrupt service routine may be used to read data from the receiver
section and to write data to the transmitter section.