Philips Semiconductors
ISP1161
Full-speed USB single-chip host and device controller
Product data
Rev. 01 — 3 July 2001
43 of 130
9397 750 08313
Philips Electronics N.V. 2001. All rights reserved.
11.1.2
OUT data transfer
The arrival of the OUT token is detected by the SIE by decoding the PID.
The SIE also checks for the device number and endpoint number and verifies
whether they are ok.
If the endpoint is enabled, the SIE checks the contents of the Endpoint Status
register. If the endpoint is empty, the data from USB is stored to FIFO during the
data phase, else a NAK handshake is sent.
After the data phase, the SIE sends a handshake (ACK) to the host (except for ISO
endpoints).
The SIE updates the contents of the interrupt register, which in turn generates an
interrupt to the microprocessor. The LTR status is updated and the buffer is set to
full in the Endpoint Status Register. For ISO endpoints, interrupt and LTR status
are updated as soon as data is received successfully, since there is no handshake
phase.
On receiving interrupt, the microprocessor reads the interrupt register. It will know
which endpoint has generated the interrupt and reads the content of the
corresponding Endpoint Status register. If the buffer is full, it empties the buffer, so
that data can be received by the SIE at the next OUT token phase.
11.2 Device DMA transfer
11.2.1
For OUT endpoint (external USB host to ISP1161’s DC)
When the internal DMA handler is enabled and at least one buffer (Ping or Pong) is
free, the DREQ2 line is asserted. The external DMA controller then starts negotiating
for the bus with ISP1161. As soon as it has access, it asserts the DACK2 line and
starts writing data. The burst length is programmable. When the number of bytes
equal to the burst length has been written, the DREQ2 line is deasserted. As a result,
the DMA controller deasserts the DACK2 line and releases the bus. At that moment
the whole cycle restarts for the next burst.
When the buffer is full, the DREQ2 line will be de-asserted and the buffer is validated
(which means that it will be sent to the host when the next IN token comes in). When
the DMA controller terminates the DMA transfer by asserting EOT, the buffer is also
validated (even if it is not full). In Auto-reload mode, the DMA handler will
automatically restart by asserting its DREQ2 line as soon as a new buffer is available.
If the Auto-reload mode is off, then the DMA handler will be disabled automatically.
For the next DMA transfer, the DMA handler must be reenabled.
11.2.2
For IN endpoint (ISP1161’s DC to external USB host)
When the internal DMA handler is enabled and at least one buffer is full, the DREQ2
line is asserted. The external DMA controller then starts negotiating for the bus with
other parties and as soon as it has access, it asserts the DACK2 line and starts
reading the data. The burst length is programmable. When the number of bytes equal
to the burst length has been read, the DREQ2 line is deasserted. As a result, the
DMA controller deasserts the DACK2 line and releases the bus. At that moment the
whole cycle restarts for the next burst. When all data are read, the DREQ2 line will be
deasserted and the buffer is cleared (which means that it can be overwritten when a
new packet comes in).