SN8P2200 Series
USB 1.1 Low-Speed 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 100
Version 1.7
9.5.2 USB ENDPOINT 0 ENABLE REGISTER
An endpoint 0 (EP0) is used to initialize and control the USB device. EP0 is bi-directional (Control pipe), as the device,
can both receive and transmit data, which provides to access the device configuration information and allows generic
USB status and control accesses.
0A1H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
UE0R UE0E UE0S UE0DO UE0DI UE0C3 UE0C2 UE0C1 UE0C0
Read/Write R/W
R
R/W
R/W R/W R/W R/W R/W
After
reset
0 0 0 0 0 0 0 0
Bit [3:0] UE0C [3:0]:
Indicate the number of data bytes in a transaction: For IN transactions, firmware loads the
count with the number of bytes to be transmitted to the host from the endpoint 0 FIFO.
Bit 4
UE0DI:
Indicate endpoint 0 data ready to host (IN token).
0 = Data is ready in EP0 FIFO for USB host drawing out. Firmware set the bit zero to indicate that data is
ready. Hardware will send an ACK to complete the transaction and set the bit to 1 after the IN token
transaction.
1 = Data is not ready in EP0 FIFO for IN token. Hardware will send NAK handshakes response to any IN
token sent to this endpoint. In addition, set this bit and the bit 3 of UPID register will send the STALL
handshake response to any IN token sent to this endpoint.
Bit 5
UE0DO:
Indicate endpoint 0 data ready from host (OUT token).
0 = Data doesn’t finish carrying.
1 = Data carries successfully, and data is ready in EP0 FIFO.
Bit 6 UE0S:
The Bit indicates that the USB function receives the Setup packet or OUT packet.
0 = A valid OUT packet has been received.
1 = A valid SETUP packet has been received.
Bit 7
UE0E:
USB endpoint 0 function enable bit.
0 = disable USB endpoint 0 function.
1 = enable USB endpoint 0 function.