CHAPTER 8 USB FUNCTION
User’s Manual U12978EJ3V0UD
109
8.4 Registers Controlling USB Function
The following nine registers are used to control the USB function.
•
USB receiver enable register (USBMOD)
•
Data/handshake packet receive mode register (URXMOD)
•
Packet receive status register (RXSTAT)
•
Data/handshake packet receive result store register (DRXRSL)
•
Token packet receive result store register (TRXRSL)
•
Data packet transmit reservation register (DTXRSV)
•
Handshake packet transmit reservation register (HTXRSV)
•
USB timer start reservation control register (USBTCL)
•
Remote wakeup control register (REMWUP)
(1) USB receiver enable register (USBMOD)
This register controls USB receiver operation and halt.
Because a single-ended receiver does not have an enable flag, regular operation is possible. Thus reception of
the USB reset signal, Resume signal, and EOP signal for bus idle can be performed any time.
USBMOD is set with a 1-bit or 8-bit memory manipulation instruction.
RESET input sets USBMOD to 00H.
Figure 8-10. Format of USB Receiver Enable Register
Symbol
6
7
5
4
3
2
1
<0>
0
0
0
0
0
0
0
RXEN
RXEN
USB receiver operation control
0
1
FF6DH
Address
USBMOD
After reset
00H
R/W
R/W
USB receiver operation is stopped.
USB receiver operation is possible.
(2) Data/handshake packet receive mode register (URXMOD)
This register sets the data/handshake packet receive mode.
Bit 0 (DWRMSK) is set while saving a data packet and prevents an address greater than 11H in the receive
data address from being overwritten when the next packet is received.
Bit 1 (DINTEN) is a flag used to set the receive status synchronous interrupt (to generate the INTUSBRD
interrupt request to perform data packet reception and data save simultaneously).
Bit 2 (RESMOD) is a flag used to switch the detection mode of the USB reset signal between bus idle mode and
bus suspend mode.
URXMOD is set with a 1-bit or 8-bit memory manipulation instruction.
RESET input sets URXMOD to 00H.
SETUP reception
Note
also sets the URXMOD to 00H.
Note
SETUP reception implies the satisfaction of all the following three conditions.
•
Matching of address
•
Endpoint 0 received
•
No error in reception