Cypress EZ-USB Series 2100 User's Guide Page 201

  • Download
  • Add to my manuals
  • Print
  • Page
    / 239
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 200
EZ-USB FX2™/AT2™/SX2™
Reset and Power Considerations
3
The easiest solution is to set the DISCON bit to 0, so your
device will pull up D+ immediately. See chapter 3.5 in the FX2
technical reference manual for more information on the
DISCON and 400-kHz bits.
2. Respond to Reset within 100 ms
Typical FX2 designs easily meet this requirement, since the
first USB reset is handled automatically by the FX2 hardware.
3. Set-up Packet within 500 ms
This specification requires that all SETUP packets get replies
in a timely fashion. If the RENUM bit is set, this means that
there cannot be any tasks that delay the TD_Poll() loop. If this
is not practical in your design, SETUP packets can be
processed in an ISR. The CY4611 reference design provides
an example of SETUP processing in an ISR. As the code
fragment in Figure 3 shows, setting up the SUDAV interrupt
takes very little effort:
4. No D+ without VBUS
Specification section 7.1.5 states, “The voltage source on the
pull-up resistor must be derived from or controlled by the
power supplied on the USB cable such that when VBUS is
removed, the pull-up resistor does not supply current on the
data line to which it is attached.” This is not an issue for
bus-powered devices. For self-powered devices, this
requirement means that an I/O pin must be used to sense
VBUS. Don’t forget to pull the pin down, or it will not always
go to 0 when you’re disconnected!
On FX2, firmware must poll this pin regularly and disable the
pull-up resistor when VBUS is removed. Using the wake-up
line for this purpose allows the design to go to sleep until
VBUS is reapplied.
The AT2 provides a dedicated VBUS sense pin.
On SX2, the host CPU is responsible for disconnecting the
pull-up via the DISCON bit in the IFCONFIG register.
EZ-USB FX2, EZ-USB SX2, and EZ-USB AT2 are trademarks of Cypress Semiconductor
Corporation. All product and company names mentioned in this document are the trademarks
of their respective owners.
Approved AN065 10/14/03 kkv
EZUSB_IRQ_ENABLE(); // Enable USB interrupt (INT2)
EZUSB_ENABLE_RSMIRQ(); // Wake-up interrupt
INTSETUP |= (bmAV2EN); // Enable INT 2 auto vectoring
USBIE |= bmSUDAV | bmSUSP | bmURES | bmHSGRANT; // Enable selected interrupts
EA = 1; // Enable 8051 interrupts
// Setup Data Available Interrupt Handler
void ISR_Sudav(void) interrupt 0
{
EZUSB_IRQ_CLEAR();
INT2CLR = bmSUDAV; // Clear SUDAV IRQ
SetupCommand();
}
Figure 3.
Page view 200
1 2 ... 196 197 198 199 200 201 202 203 204 205 206 ... 238 239

Comments to this Manuals

No comments