
USB DEVICE
S3C2440A RISC MICROPROCESSOR
13-12
END POINT0 CONTROL STATUS REGISTER (EP0_CSR)
This register has the control and status bits for Endpoint 0. Since a control transaction is involved with both IN and
OUT tokens, there is only one CSR register, mapped to the IN CSR1 register. (Share IN1_CSR and can access by
writing index register “0” and read/write IN1_CSR)
Register
EP0_CSR
Address
0x52000184(L)
0x52000187(B)
R/W
R/W
(byte)
Description
Reset Value
0x00
Endpoint 0 status register
EP0_CSR
SERVICED_SET
UP_END
SERVICED_OUT
_PKT_RDY
SEND_STALL
Bit
[7]
MCU
W
USB
CLEAR
Description
Initial State
0
The MCU should write a "1" to this bit to clear
SETUP_END.
The MCU should write a "1" to this bit to clear
OUT_PKT_RDY.
MCU should write a "1" to this bit at the same
time it clears OUT_PKT_RDY, if it decodes an
invalid token.
0 = Finish the STALL condition
1 = The USB issues a STALL and shake to the
current control transfer.
Set by the USB when a control transfer ends
before DATA_END is set.
When the USB sets this bit, an interrupt is
generated to the MCU.
When such a condition occurs, the USB
flushes the FIFO and invalidates MCU access
to the FIFO.
Set by the MCU on the conditions below:
1. After loading the last packet of data into the
FIFO, at the same time IN_PKT_RDY is set.
2. While it clears OUT_PKT_RDY after
unloading the last packet of data.
3. For a zero length data phase.
Set by the USB if a control transaction is
stopped due to a protocol violation. An interrupt
is generated when this bit is set. The MCU
should write "0" to clear this bit.
Set by the MCU after writing a packet of data
into EP0 FIFO. The USB clears this bit once
the packet has been successfully sent to the
host. An interrupt is generated when the USB
clears this bit, so as the MCU to load the next
packet. For a zero length data phase, the MCU
sets DATA_END at the same time.
Set by the USB once a valid token is written to
the FIFO. An interrupt is generated when the
USB sets this bit. The MCU clears this bit by
writing a "1" to the SERVICED_OUT_PKT_RDY
bit.
[6]
W
CLEAR
0
[5]
R/W
CLEAR
0
SETUP_END
[4]
R
SET
0
DATA_END
[3]
SET
CLEAR
0
SENT_STALL
[2]
CLEAR
SET
0
IN_PKT_RDY
[1]
SET
CLEAR
0
OUT_PKT_RDY
[0]
R
SET
0