Universal Serial Bus
M30240 Group
Rev.1.00 Sep 24, 2003 Page 55 of 360
data will be in the FIFO. For this case, because the SETUP_END bit is set near the beginning of the packet
when the SETUP PID is encountered and the OUT_PKT_RDY bit is set at the end of the packet, the value
read from EP0IN_CSR in the USB functional interrupt routine may only show that the SETUP_END flag as “1”
instead of both the SETUP_END and OUT_PKT_RDY bits.
• EP0CSR6 and EP0CSR7:
These bits are used to clear EP0CSR0 and EP0CSR5 respectively. Writing a “1” to these bits clears the cor-
responding register bit.
Figure 1.44: USB Endpoint 0 CSR
1.2.18.4.12 USB Endpoint 0 MAXP Register
The USB Endpoint 0 MAXP Register, shown in Figure 1.45, indicates the maximum packet size (MAXP) of
Endpoint 0 IN/OUT packet. The default value for Endpoint 0 MAXP is 8 bytes.
Figure 1.45: USB Endpoint 0 MAXP
USB Endpoint 0 Control and Status Register (Note 5)
Symbol Address When reset
EP0CS 0311
16 0016
Bit nameBit symbol
b7 b6 b5 b4 b3 b2 b1 b0
Function W
R
EP0CSR0
EP0CSR1
EPOCSR2
EPOCSR3
EP0CSR4
EPOCSR5
EP0CSR6
EPOCSR7
OUT_PKT_RDY Flag
IN_PKT_RDY Bit
SEND_STALL Bit
DATA_END Bit
FORCE_STALL Flag
SETUP_END Flag
SERVICED_OUT_PKY_RDY Bit
SERVICED_SETUP_END Bit
0 : Not ready
1 : Ready
0 : Not ready
1 : Ready
0 : No action
1 : Stall Endpoint 0 by CPU
0 : No action
1 : Last packet transferred from/to FIFO
0 : No action
1 : Stall Endpoint 0 by USB FCU
0 : No action
1 : Control transfer ended before specific
length of data transferred during data phase
0 : No change
1 : Clear the OUT_PKT_RDY bit (EPOCSR0)
0 : No change
1 : Clear the STUP-END bit (EP0CSR5)
0 0
0 0
0 0
0 0
0
0
0 0
0 0
0 0
Note 1: Read only
Note 2: Write "1" only or Read
Note 3: Write "0" only or Read
Note 4: Write only - Read "0"
Note 5: Refer to Section 1.5.5 "Programming Notes" for this register
Note 1
Note 1
Note 2
Note 3
Note 2
Note 4
Note 4
USB Endpoint 0 MAXP Register
Symbol Address When reset
EP0MP 0313
16
08
16
Bit nameBit symbol
b7 b6 b5 b4 b3 b2 b1 b0
EP0MXP0 to
EP0MXP5
Function WR
Maximum packet size (MAXP)
of Endpoint 0 IN/OUT packet
Reserved
Must always be set to "0"
0
0