Philips Semiconductors
ISP1161
Full-speed USB single-chip host and device controller
Product data
Rev. 01 — 3 July 2001
42 of 130
9397 750 08313
Philips Electronics N.V. 2001. All rights reserved.
No matter which method is used to wake up the HC from SUSPEND state, you must
enable the corresponding interrupt bits before the HC goes into SUSPEND state so
that the microprocessor can receive the correct interrupt request to wake up the HC.
11. The USB device controller (DC)
The Device Controller (DC) in ISP1161 originates from Philips ISP1181 USB
Full-Speed Interface Device IC. The functionality is same as ISP1181 in 16-bit bus
mode. The command and register sets are also the same. Refer also to the ISP1181
datasheet for a description of the operation of ISP1161’s DC. If there is any difference
found in ISP1181 and ISP1161 datasheet in terms of the DC’s functionality, the
ISP1161 datasheet supersedes the content in ISP1181 datasheet.
In general the DC in ISP1161 provides 16 endpoints for USB device implementation.
Each endpoint can be allocated an amount of RAM space in the on-chip Ping-Pong
Buffer RAM. Note: the Ping-Pong buffer RAM for the DC is independent of the buffer
RAM in the HC. When the buffer RAM is full, the DC will transfer the data in the buffer
RAM to the USB bus. When the buffer RAM is empty, an interrupt is generated to
notify the microprocessor to feed in the data. The transfer of data between the
microprocessor and the DC can be done in Parallel I/O (PIO) mode or in DMA mode.
11.1 DC data transfer operation
The following session explains how the DC of ISP1161 handles an IN data transfer
and an OUT data transfer. In Device mode, ISP1161 acts as a USB device: an IN
data transfer means transfer from ISP1161 to an external USB Host (through the
upstream port) and an OUT transfer means transfer from external USB Host to
ISP1161.
11.1.1
IN data transfer
The arrival of the IN 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 full, the contents of the FIFO are sent during the data
phase, else a NAK handshake is sent.
After the data phase, the SIE expects a handshake (ACK) from the host (except for
ISO endpoints).
On receiving the handshake (ACK), the SIE updates the interrupt register
contents, which in turn generates an interrupt to the microprocessor. The Last
Transaction Register (LTR) status is updated and the buffer is set to zero in the
Endpoint Status Register. If it fails to get a handshake, a timeout error is generated
and the LTR status is updated accordingly. For ISO endpoints, the interrupt and
LTR status are updated as soon as data are sent, since there is no handshake
phase.
On receiving an interrupt, the microprocessor reads the interrupt register. It will
know which endpoint has generated the interrupt and reads the contents of the
corresponding Endpoint Status register. If the buffer is empty, it fills up the buffer,
so that data can be sent by the SIE at the next IN token phase.