Cypress Semiconductor FX2LP Información técnica Pagina 62

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 61
EZ-USB FX2 Technical Reference Manual
Page 2-8 EZ-USB FX2 Technical Reference Manual v2.1
As Figure 2-4 illustrates, the firmware responds to the SUDAV interrupt by decoding the eight
bytes the FX2 has copied into RAM at SETUPDAT. The firmware answers a
Get Status
request
(bRequest=0) by loading two bytes into the EP0BUF buffer and loading the byte count register
EP0BCH:L with the value 0x0002. The FX2 then transmits these two bytes in response to an IN
token. Finally, the firmware clears the HSNAK bit (by writing 1 to it), which instructs the FX2 to
ACK the status stage of the transfer.
The following tables show the eight SETUP bytes for Get Status Requests.
Get Status-Device
queries the state of two bits, “Remote Wakeup” and “Self-Powered”. The
Remote Wakeup bit indicates whether or not the device is currently enabled to request remote
wakeup (remote wakeup is explained in Chapter 6, "Power Management"). The Self-Powered bit
indicates whether or not the device is self-powered (as opposed to USB bus-powered).
The firmware returns these two bits by loading two bytes into EP0BUF, then loading a byte count
of 0x0002 into EP0BCH:L.
Each endpoint has a STALL bit in its EPxCS register. If this bit is set, any request to the endpoint
returns a STALL handshake rather than ACK or NAK. The
Get Status-Endpoint
request returns
the STALL state for the endpoint indicated in byte 4 of the request. Note that bit 7 of the endpoint
number EP (byte 4) specifies direction (0 = OUT, 1 = IN).
Table 2-3. Get Status-Device (Remote Wakeup and Self-Powered Bits)
Byte Field Value Meaning Firmware Response
0 bmRequestType 0x80 IN, Device
1 bRequest
0x00
“Get Status”
Load two bytes into EP0BUF:
2 wValueL 0x00
3 wValueH 0x00
Byte 0 : bit 0 = Self-Powered
4 wIndexL 0x00
: bit 1 = Remote Wakeup
5 wIndexH 0x00
Byte 1 : zero
6 wLengthL 0x02 Two bytes requested
7 wLengthH 0x00
Table 2-4. Get Status-Endpoint (Stall Bits)
Byte Field Value Meaning Firmware Response
0 bmRequestType 0x82 IN, Endpoint
Load two bytes into EP0BUF:
1 bRequest
0x00
“Get Status”
Byte 0 : bit 0 = Stall Bit for EP(n)
2 wValueL 0x00
Byte 1 : zero
3 wValueH 0x00
4 wIndexL
EP
0x00-0x08: OUT0-OUT8
5 wIndexH 0x00 0x80-0x88: IN0-IN8
6 wLengthL 0x02 Two bytes requested
7 wLengthH
0x00
Vista de pagina 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 459 460

Comentarios a estos manuales

Sin comentarios