![](http://datasheet.mmic.net.cn/100000/ISP1181BDGG-112_datasheet_3494276/ISP1181BDGG-112_14.png)
Philips Semiconductors
ISP1181B
Full-speed USB peripheral controller
Product data
Rev. 02 — 07 December 2004
14 of 70
9397 750 13958
Koninklijke Philips Electronics N.V. 2004. All rights reserved.
9.3 Endpoint initialization
In response to the standard USB request, Set Interface, the rmware must program
all 16 ECRs of the ISP1181B in sequence (see
Table 4), whether the endpoints are
enabled or not. The hardware will then automatically allocate FIFO storage space.
If all endpoints have been congured successfully, the rmware must return an empty
packet to the control IN endpoint to acknowledge success to the host. If there are
errors in the endpoint conguration, the rmware must stall the control IN endpoint.
When reset by hardware or via the USB bus, the ISP1181B disables all endpoints
and clears all ECRs, except for the control endpoint which is xed and always
enabled.
Endpoint initialization can be done at any time; however, it is valid only after
enumeration.
9.4 Endpoint I/O mode access
When an endpoint event occurs (a packet is transmitted or received), the associated
endpoint interrupt bits (EPn) of the Interrupt Register (IR) will be set by the SIE. The
rmware then responds to the interrupt and selects the endpoint for processing.
The endpoint interrupt bit will be cleared by reading the Endpoint Status Register
(ESR). The ESR also contains information on the status of the endpoint buffer.
For an OUT (= receive) endpoint, the packet length and packet data can be read from
ISP1181B using the Read Buffer command. When the whole packet has been read,
the rmware sends a Clear Buffer command to enable the reception of new packets.
For an IN (= transmit) endpoint, the packet length and data to be sent can be written
to ISP1181B using the Write Buffer command. When the whole packet has been
written to the buffer, the rmware sends a Validate Buffer command to enable data
transmission to the host.
9.5 Special actions on control endpoints
Control endpoints require special rmware actions. The arrival of a SETUP packet
ushes the IN buffer and disables the Validate Buffer and Clear Buffer commands for
the control IN and OUT endpoints. The microcontroller needs to re-enable these
commands by sending an Acknowledge Setup command to both control endpoints.
This ensures that the last SETUP packet stays in the buffer and that no packets can
be sent back to the host until the microcontroller has explicitly acknowledged that it
has seen the SETUP packet.