NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
97
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
7.4 Functional descriptions
Please refer to Universal Serial Bus Specification and Class Specification Documents for detailed
USB protocol.
7.4.1 Initialization
The initialization of USBD controller contains the following steps:
1. Set
SIE_RCV
bit of register
USB_CTL
to set the RCV source generated by the USB
transceiver,
2. Set
SUSP
bit of register
USB_CTL
to enable suspend detect.
3. Set
CCMD
bit of register
USB_CTL
to enable the class command decode control.
4. Set
VCMD
bit of register
USB_CTL
to enable the vendor command decode.
5. Set
bits
RST_ENDI
and
RSTI
of
USB_IE
register to enable the reset interrupt.
6. Set
bits
CDII
and
CDOI
of
USB_IE
register to enable the control data in and control data out
interrupt.
7. Set
bits
VENI
and
CLAI
of
USB_IE
register to enable the vendor and class command
interrupt of control pipe.
8. Set
bits
GSTRI
,
GCFGI
and
GDEVI
of
USB_IE
register to enable the get string,
configuration, and device descriptor command interrupt.
9. Set
bits
RUM
and
SUSI
of
USB_IE
register to enable the USB suspend and resume detect
interrupt.
10. Set
USB_IFSTR
register to enable the interface and string descriptors control. If didn’t fill this
register, USBD only enable the interface 0 and string descriptor 0 control.
11. Configure
CONFD
in register
USB_CONFD
to the configuration wishes to be enabled.
Note: USBD won’t work if this value is not consist with CONF in register USB_CTLS
.
12. After finished the above steps, set the
USB_EN
bit of
USB_CTL
to enable USB engine. The