![SONiX TECHNOLOGY CO. SN8F22711B User Manual Download Page 88](http://html1.mh-extra.com/html/sonix-technology-co/sn8f22711b/sn8f22711b_user-manual_1321532088.webp)
SN8F2270B Series
USB 2.0 Low-Speed 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 88
Version 1.3
9.5 USB REGISTERS
9.5.1 USB DEVICE ADDRESS REGISTER
The USB Device Address Register (UDA) contains a 7-bit USB device address and one bit to enable the USB function.
This register is cleared during a reset, setting the USB device address to zero and disable the USB function.
090H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
UDA UDE UDA6 UDA5 UDA4 UDA3 UDA2 UDA1 UDA0
Read/Write R/W
R/W
R/W R/W R/W R/W R/W R/W
After
reset
0 0 0 0 0 0 0 0
Bit [6:0]
UDA [6:0]:
These bits must be set by firmware during the USB enumeration process (i.e., SetAddress) to
the non-zero address assigned by the USB host.
Bit 7
UDE: Device Function Enable.
This bit must be enabled by firmware to enable the USB device function.
0 = Disable USB device function.
1 = Enable USB device function.
9.5.2 USB STATUS REGISTER
The USB status register indicates the status of USB.
091H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
USTATUS
BUS_RST
SUSPEND EP0_SETUP
EP0_IN
EP0_OUT
Read/Write
R
R
R/W
R/W
R/W
After
reset
0 0 0 0 0
Bit 0
EP0_OUT
:
Endpoint 0 OUT Token Received.
0 = Endpoint 0 has no OUT token received.
1 = A valid OUT packet has been received. The bit is set to 1 after the last received packet in an OUT
transaction.
Bit 1
EP0_IN
:
Endpoint 0 IN Token Received.
0 = Endpoint 0 has no IN token received.
1 = A valid IN packet has been received. The bit is set to 1 after the last received packet in an IN
transaction.
Bit 2
EP0_SETUP
:
Endpoint 0 SETUP Token Received.
0 = Endpoint 0 has no SETUP token received.
1 = A valid SETUP packet has been received. The bit is set to 1 after the last received packet in an SETUP
transaction. While the bit is set to 1, the HOST can not write any data in to EP0 FIFO. This prevents SIE
from overwriting an incoming SETUP transaction before firmware has a chance to read the SETUP data.
Bit 3
SUSPEND:
indicate USB suspend status.