ADSP-BF535 Blackfin Processor Hardware Reference
14-59
USB Device
(
USBD_EPCFGx
,
USBD_EPLENx
) for a zero-byte IN transfer, and set the
USBD_ARM
bit to 1. If the command does not complete successfully,
set the
USBD_EPxSTALL
bit in the
USBD_CTRL
register.
Control Transfers Gone Bad
The USB protocol is usually very reliable about ensuring that packets
reach their intended destination. However, in one case the packets can be
confused. The particular corner case occurs when the USB host sends a
command to a USB device.
The host sends a setup packet to the device, and the device acknowledges
it with an ACK handshake. If the ACK handshake is corrupted, the USB
host waits a while, then tries to resend the setup packet. In this case, the
device can wind up with 2 (or more) setup packets in its internal buffer,
and must figure out which is the real one before moving on and processing
the command.
The USBD module includes several features to help deal with this situa-
tion. The features are:
• The UDC correctly handles the situation within its own logic and
understands that the first setup packet is invalid.
• The
USBD_SETUP
and
USBD_MSETUP
interrupts can be used to deter-
mine whether two setup packets await service. An internal lockout
mechanism guarantees that if software tries to clear
USBD_SETUP
and
USBD_MSETUP
at the same time that another setup packet is received,
the software gets another
USBD_SETUP
interrupt indicating the
condition.
• The
USBD_SIP
and
USBD_PIP
status bits can be used to determine
whether the USB module is in the process of receiving a new setup
packet. Software can check these bits before moving to the DATA
or STATUS phase of the control transfer to determine whether the
command request that it is processing is about to be invalidated.
Summary of Contents for ADSP-BF535 Blackfin
Page 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Page 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Page 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Page 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Page 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Page 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Page 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Page 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Page 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...