NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
76
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
6.5 Programming Note
This section will demonstrate how to write a
Host Controller Driver
, including
•
Initialization,
•
Lists
management,
•
Interrupt processing, and
•
Root hub
management.
6.5.1 Initialization
The initialization of
Host Controller
contain the following steps :
1. Disable
Host Controller
interrupts by setting
MasterInterruptEnable
bit of
HcInterruptDisable
register.
2.
Issue a software reset command by setting
HostControllerReset
bit of
HcCommandStatus
register and waiting for 10ms until the read value of
HostControllerReset
become
0.
3. Allocate and create all necessary list structures and memory blocks, including
HCCA
, and
initialize all driver-maintained lists, including
InterruptTable
of
HCCA
(Note that
HCCA
must be aligned with
256-bytes
address boundary, while
ED
s and
TD
s must be aligned
with
32
-
bytes
address boundary).
4. Clear
HcControlHeadED
and
HcBulkHeadED
register
5. Program the physical address of software allocated
HCCA
to
HcHCCA
register
6. Programe frame interval value (11,999
±
6) to
HcFmInterval
register and 90% of this
value (recommended) to
HcPeriodicStart
register
7. Programe
0x628
to
HcThreshold
register (0x628 is the reset default value of
HcThreshold
register)
8.
Enable all transfer list by setting
PeriodicListEnable
,
IsochronousEnable
,
ControlListEnable
, and
BulkListEnable
bits of
HcControl
register
9. Let
Host Controller
transit to
USBOPERATIONAL
state by writing
10b
to
HostControllerFunctionalState
field of
HcControl
register