CHAPTER 6 USB CONTROLLER
Preliminary User’s Manual S15543EJ1V0UM 331
6.4 Initialization
After USB Controller has been reset, the VR4120A must set several USB Controller registers. The initialization
sequence is listed below.
(1) A desired mode is set into the USB General Mode Register.
(2) The receive pools are placed in system memory, and the information they contain are set in the following
registers:
USB Rx Pool0 Information Register: (Address: 1000_1050H)
USB Rx Pool0 Address Register: (Address: 1000_1054H)
USB Rx Pool1 Information Register: (Address: 1000_1058H)
USB Rx Pool1 Address Register: (Address: 1000_105CH)
USB Rx Pool2 Information Register: (Address: 1000_1060H)
USB Rx Pool2 Address Register: (Address: 1000_1064H)
(3) The transmit/receive MailBoxes are placed in system memory, and the information they contain are set in the
following registers:
USB Tx MailBox Start Address Register (Address: 1000_1070H)
USB Tx MailBox Bottom Address Register (Address: 1000_1074H)
USB Rx MailBox Start Address Register (Address: 1000_1080H)
USB Rx MailBox Bottom Address Register (Address: 1000_1084H)
When Tx MailBox Start Address Register is set, the value in the register is copied to Tx MailBox Read
Address Register (Address: 1000_1078H) and Tx MailBox Write Address Register (Address: 1000_107CH).
In same way, when Rx MailBox Start Address Register is set, the value in the register is copied to Rx
MailBox Read Address Register (Address: 1000_1088H) and Rx MailBox Write Address Register (Address:
1000_108CH).
(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 transmitting/receiving, as well as the ability to respond to Device
Configuration from the Host PC.
(5) Device Configuration is started through EndPoint0. Therefore, a response must be returned to EndPoint0. At
this stage, the USB Function Address is allocated. The VR4120A must set that value into the Function
Address field in USB General Mode Register (Address: 1000_1000H).
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:
1000_1014H or 1000_101CH) and enable the interrupt.