
3/54
AN1886 - APPLICATION NOTE
Table 17. Interface Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 18. HID Descriptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 19. Endpoint Descriptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 20. Report Descriptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
High Level Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
HID Level Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
SUSPEND Mode and RESUME Mode Handling Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
USB Disconnect on Demand Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Important Rules when Starting to Design USB Applications with μPSD32xxA. . . . . . . . . . . . . . . 25
Differences between USB 1.1 Hosts and Some USB 2.0 High-speed Hosts . . . . . . . . . . . . . . 25
Figure 5. Traffic on USB (μPSD32xxA connected to USB1.1 Host, or to an Intel 82801DBx Type USB
2.0 Host) 25
Figure 6. Traffic on USB (μPSD32xxA connected to an NEC 720100A Type USB 2.0 Host) . . . . 26
USB Interrupt must have the Highest Priority Interrupt Level . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 21. Description of the IP Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 22. Description of the IPA Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Length of USB Interrupt Service Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 23. Oscillator Frequencies Suitable for Applications with USB . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 7. USB Demonstration Program USB Drivers Immunity versus Length of USB ISR (with re-
spect to Oscillator Frequency)28
Difference between Relative and Absolute Register Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 24. Suggested Assignment of Register Banks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
USB may Generate Spurious Interrupts when the Device is Plugged in . . . . . . . . . . . . . . . . . 30
μPSD USB IP sometimes Triggers an Interrupt but no Bit of UISTA is Set . . . . . . . . . . . . . . . 30
μPSD USB IP Generates Interrupts with an Undocumented Flag. . . . . . . . . . . . . . . . . . . . . . . 30
USB State Machine does not Clear the STALL0 Bit when a SETUP Packet is Received . . . . 30
The Number of Data Bytes Received in a Data Packet can be Greater than Eight . . . . . . . . . 31
C Source and Assembler Output can have Different Functionality . . . . . . . . . . . . . . . . . . . . . 31
Question: So How Must I Write My Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Question: Must I Enable and Service End-of-Packet Interrupt Requests . . . . . . . . . . . . . . . 32
Question: Is the Length of USB ISR Limited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Limits Set by the Specification: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 25. Examples of Limits set by USB Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Known limits: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Conclusion: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Question: My Device with μPSD is not Properly Detected by Windows . . . . . . . . . . . . . . . . . 33
Figure 8. USB ISR Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 9. USB ISR Response Time - Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Problems with Windows98 and Multiple-function USB Devices. . . . . . . . . . . . . . . . . . . . . . . . 34
Symptoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Cause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Conclusion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35