NEC Network Controller uPD98502 User Manual
Page 339

CHAPTER 6 USB CONTROLLER
Preliminary User’s Manual S15543EJ1V0UM
339
(1)
First, the V
R
4120A prepares the data to be transmitted in system memory.
(2)
The V
R
4120A reads the USB Command Register.
(3)
The V
R
4120A checks whether the Busy bit of the USB Command Register is set. If the Busy bit is set, it
indicates that USB Controller is still executing the previous command. Thus the V
R
4120A can not issue a
new command.
(4)
The V
R
4120A reads the USB Tx EndPoint Status Register.
(5)
The V
R
4120A checks whether the EndPoint that is to perform transmission next is in the Busy status. If the
EndPoint is Busy, the V
R
4120A repeats the processing from the reading of the USB Tx EndPoint Status
Register.
(6)
The V
R
4120A issues the Tx command.
(7)
The V
R
4120A reads the USB General Status Registers 1.
(8)
The V
R
4120A checks whether transmission has completed.
(9)
The V
R
4120A reads the contents of the USB Tx Mailbox Read Address Register.
(10) The V
R
4120A reads the transmit Indication.
(11) The V
R
4120A updates the contents of the USB Tx MailBox Read Address Register.
By issuing a transmit command, the transmission of a data segment can be scheduled.
A transmit command is issued by writing a value into the registers listed below. When writing, it is necessary to
write first to the USB Command Extension Register, then the USB Command Register.
If data size field of USB Command Register is “0”, USB Controller transmits Zero-Length Packet.
The size of data set by the transmission command and the total size of data buffer to be transmitted have to be the
same value.
Figure 6-8. Transmit Command Issue
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R eserv ed
C om m and
D ata S ize
R eserv ed
31
16
15
0
A ddress
write start address of T x data
segm ent
S pec ifies E ndP oint N um ber
000: E ndP oint0 (C ontrol)
001: E ndP oint1 (Isochronous)
010: E ndP oint3 (B ulk)
011: E ndP oint5 (Interrupt)
U S B C om m and R egister (40H )
U S B C om m and E x tension R egister (44H )
For a given EndPoint, it is possible to schedule the transmitting of up to two data items. Once two data have been
scheduled, even if the V
R
4120A writes a transmit command into the USB Command Register to transmit a third data,
that command cannot be accepted until the first scheduled data is transmitted.
The number of data items that are scheduled for transmission can be determined by reading the USB Tx EndPoint
Status Register.