54
Ver 1.4
MITSUBISHI MICROCOMPUTERS
7640 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
1.21.4 USB Special Function Registers
The MCU controls USB operation through the use of
special function registers (SFR). This section de-
scribes in detail each USB related SFR. Certain USB
SFRs are endpoint-indexed: the Control & Status
Registers (IN CSR and OUT CSR), the Maximum
Packet Size Registers (IN MAXP and OUT MAXP),
and the Write Count Registers (OUT WRT CNT). To
access each endpoint-indexed SFR, the target end-
point number should be written to the Endpoint Index
Register first. The lower 3 bits (EPINDX2:0) of the
Endpoint Index Register are used for endpoint selec-
tion.
Note: Each endpoint’s FIFO Register is NOT end-
point-indexed.
Some USB special function registers have a mix of
read/write, read only, and write-only register bits. Ad-
ditionally, the bits may be configured to allow the user
to write only a “0” or a “1” to individual bits. When ac-
cessing these registers, writing a “0” to a register that
can only be set to a “1” by the CPU will have no affect
on that register bit. Each figure and description of the
special function registers will detail this operation.
The USB Control Register (USBC), shown in Figure
1.52, is used to control the USB FCU. A USB reset
signaling does not reset this register. After the USB is
enabled (USBC7 set to “1”), a minimum delay of 250
ns (three 12Mhz clock periods) is needed before per-
forming any other USB register read/write operations.
The USB Function Address Register (USBA),
shown in Figure 1.53, maintains the 7-bit USB ad-
dress assigned by the host. The USB FCU uses this
register value to decode USB token packet ad-
dresses. At reset, when the device is not yet
configured, the value is 0016.
Fig. 1.52. USB Control Register (USBC)
Fig. 1.53. Function Address Register (USBA)
Reser ved
FUNAD5
FUNAD3
FUNAD1
MSB
7
LSB
0
Address: 0050
16
Access: R/W
Reset: 00
16
FUNAD6
FUNAD0
FUNAD4
FUNAD2
FUNAD6:0
7-bit programmable Function Address (bit 6-0)
Bit 7
Reserved (Read/Write “0”)
Bit 0
Reserved (Read/Write “0”)
USBC1
USB Default State Selection Bit (bit 1)
0: In default state after power/reset
1: In default state after USB reset signaling received
Bit 2
Reserved (Read/Write “0”)
USBC3
Transceiver Voltage Converter High/Low Current Mode Select Bit (bit 3)
0: High current mode
1: Low current mode
USBC4
USB Transceiver Voltage Converter Bit (bit 4)
0: USB transceiver voltage converter disabled
1: USB transceiver vlotage converter enabled
USBC5
USB Clock Enabled Bit (bit 5)
0: 48 MHz clock to the USB block is disabled
1: 48 Mhz clock to the USB block is enabled
USBC6
USB SOF Port Select Bit (bit 6)
0: USB SOF output is disabled P70 is used to GPIO pin
1: USB SOF output is enabled
USBC7
USB Enable Bit (bit 7)
0: USB block is disabled, all USB internal registers are held at their default values
1: USB block is enabled
USBC7
USBC5
USBC4
Reser ved
USBC1
MSB
7
LSB
0
Address: 0013
16
Access: R/W
Reset: 00
16
USBC6
USBC3
Reser ved