English
Language : 

EZ-USB Datasheet, PDF (126/334 Pages) Cypress Semiconductor – The EZ-USB USB Integrated Circuit
Two bits in the USBIEN (USB Interrupt Enable) register enable the SETUP Token
(SUTOKIE) and SETUP Data interrupts. The actual interrupt request bits are in the
USBIRQ (USB Interrupt Requests) register. They are called STOKIR (SETUP Token
Interrupt Request) and SUDAVIR (SETUP Data Interrupt Request).
The EZ-USB core transfers the eight SETUP bytes into eight bytes of RAM at SETUP-
DAT. A 16-bit pointer, SUDPTRH/L gives hardware assistance for handling CONTROL
IN transfers, in particular, the USB Get_Descriptor requests described later in this chapter.
7.3 USB Requests
The Universal Serial Bus Specification Version 1.1, Chapter 9, "USB Device Framework"
defines a set of Standard Device Requests. When the 8051 is in control (ReNum=1), the
EZ-USB core handles one of these requests (Set Address) directly, and relies on the 8051
to support the others. The 8051 acts on device requests by decoding the eight bytes con-
tained in the SETUP packet. Table 7-1 shows the meaning of these eight bytes.
Table 7-1. The Eight Bytes in a USB SETUP Packet
Byte
Field
0 bmRequestType
1 bRequest
2 wValueL
3 wValueH
4 wIndexL
5 wIndexH
6 wLengthL
7 wLengthH
Meaning
Request Type, Direction, and Recipient
The actual request (see Table 7-2)
Word-size value, varies according to bRequest
Word-size field, varies according to bRequest
Number of bytes to transfer if there is a data phase
The Byte column in the previous table shows the byte offset from SETUPDAT. The Field
column shows the different bytes in the request, where the “bm” prefix means bit-map,
“b” means byte, and “w” means word (16 bits). Table 7-2 shows the different values
defined for bRequest, and how the 8051 responds to each request. The remainder of this
chapter describes each of the Table 7-2 requests in detail.
Note
Table 7-2 applies when ReNum=1, which signifies that the 8051, and not the EZ-USB
core, handles device requests. Table 5-2 shows how the core handles each of these
device requests when ReNum=0, for example when the chip is first powered and the
8051 is not running.
EZ-USB TRM v1.9
Chapter 7. EZ-USB CPU
Page 7-5