Motorola DSP56009 User Manual page 175

24-bit digital signal processor
Table of Contents

Advertisement

ninth clock pulse via the SDA line. Data is acknowledged bytewise, as required by
2
the I
C bus protocol, and is transferred to the HRX FIFO when the complete word
(according to HM0–HM1) is filled into IOSR. It is the responsibility of the
programmer to select the correct number of bytes in an I
complete number of words. For this purpose, the slave device address byte does not
count as part of the data, and therefore, it is treated separately.
In a receive session, only the receive path is enabled and HTX to IOSR transfers are
inhibited. The HRX FIFO contains valid data, which may be read by the DSP if the
HRNE status bit is set. When the HRX FIFO is full and IOSR is filled, an overrun
error occurs and the HROE status bit is set. In this case, the last received byte will not
be acknowledged (ACK = 1 is sent) and the word in the IOSR will not be transferred
to the HRX FIFO. This may inform the external I
an overrun error on the slave side. Consequently the I
terminate this session by generating a Stop event.
The HREQ output pin, if enabled for receive (HRQE1–HRQE0 = 01), is asserted when
the IOSR is ready to receive and the HRX FIFO is not full; this operation guarantees
that the next received data word will be stored in the FIFO. HREQ is deasserted at the
first clock pulse of the next received word. The HREQ line may be used to interrupt
2
the external I
C master device. Connecting the HREQ line between two
SHI-equipped DSPs, one operating as an I
slave device, enables full hardware handshaking.
5.6.3.2
Transmit Data In I
A transmit session is initiated when the personal slave device address has been
correctly identified and the R/W bit of the received slave device address byte has
been set. Following a transmit initiation, the IOSR is loaded from HTX (assuming the
latter was not empty) and its contents are shifted out, MSB first, on the SDA line.
Following each transmitted byte, the SHI controller samples the SDA line at the ninth
clock pulse, and inspects the ACK status. If the transmitted byte was acknowledged
(ACK = 0), the SHI controller continues and transmits the next byte. However, if it
was not acknowledged (ACK = 1), the transmit session is stopped and the SDA line is
released. Consequently, the external master device may generate a Stop event in
order to terminate the session.
HTX contents are transferred to IOSR when the complete word (according to
HM0–HM1) has been shifted out. It is, therefore, the responsibility of the
programmer to select the correct number of bytes in an I
complete number of words. For this purpose, the slave device address byte does not
count as part of the data, and therefore, it is treated separately.
MOTOROLA
2
C master device and the other as an I
2
C Slave Mode
DSP56009 User's Manual
Serial Host Interface
SHI Programming Considerations
2
C frame so that they fit in a
2
C master device of the occurrence of
2
C master device may
2
C frame so that they fit in a
2
C
5-27

Advertisement

Table of Contents
loading

Table of Contents