![](http://datasheet.mmic.net.cn/380000/-PD98501_datasheet_16745028/-PD98501_410.png)
CHAPTER 6 USB CONTROLLER
410
Preliminary User’s Manual S14767EJ1V0UM00
6.4 Initialization
After USB Controller has been reset, the V
R
4120A RISC Processor must set several USB Controller registers. The
setting that must be performed by the V
R
4120A RISC Processor is listed below.
(1) A desired mode is written into the USB General Mode Register.
(2) The receive pool area is secured in system memory, and the information it contains is set in the following
registers:
USB Rx Pool0 Information Register:
(Address: 50H)
USB Rx Pool0 Address Register:
(Address: 54H)
USB Rx Pool1 Information Register:
(Address: 58H)
USB Rx Pool1 Address Register:
(Address: 5CH)
USB Rx Pool2 Information Register:
(Address: 60H)
USB Rx Pool2 Address Register:
(Address: 64H)
(3) The send/receive mailbox area is secured in system memory, and the information it contains is set in the
following registers:
USB Tx MailBox Start Address Register
(Address: 70H)
USB Tx MailBox Bottom Address Register
(Address: 74H)
USB Tx MailBox Read Address Register
(Address: 78H)
USB Tx MailBox Write Address Register
(Address: 7CH)
USB Rx MailBox Start Address Register
(Address: 80H)
USB Rx MailBox Bottom Address Register (Address: 84H)
USB Rx MailBox Read Address Register
(Address: 88H)
USB Rx MailBox Write Address Register
(Address: 8CH)
(4) A value is written into the MAXP field of the USB EP0 Control Register, the EP1-2 Control Register, the EP3-
4 Control Register, and the EP5-6 Control Register. Then, each EndPoint is enabled.
The settings made up to this point enable the start of data sending/receiving, as well as the ability to respond to
Device Configuration from the Host PC.
(5) Device Configuration is started via EndPoint0. Therefore a response must be returned to EndPoint0. At this
stage, the USB Function Address is allocated. The V
R
4120A RISC Processor must write that value into the
Function Address field in USB General Mode Register (Address: 00H).
The initialization procedure is completed.
In addition to the above, it may be necessary to write a value into the USB Interrupt Mask Register (Address: 14H
or 1CH) and enable the interrupt.