21.3 Functional Description
21.3.1 Endpoint Addressing
A total of eight endpoint pipes are available. The control endpoint (Endpoint0) always functions as a bi-directional IN/OUT endpoint.
The other endpoints are implemented as three pairs of IN/OUT endpoint pipes.
Table 21.1. Endpoint Addressing Scheme
Endpoint
Associated Pipes
USB Protocol Address
Endpoint 0
Endpoint 0 IN
0x00
Endpoint 0 OUT
0x00
Endpoint 1
Endpoint 1 IN
0x81
Endpoint 1 OUT
0x01
Endpoint 2
Endpoint 2 IN
0x82
Endpoint 2 OUT
0x02
Endpoint 3
Endpoint 3 IN
0x83
Endpoint 3 OUT
0x03
21.3.2 Transceiver Control
The USB Transceiver is configured via the USB0XCN register. This configuration includes transceiver enable/disable, pull-up resistor
enable/disable, and device speed selection (full or low speed). When bit SPEED = 1, USB0 operates as a full speed USB function, and
the on-chip pull-up resistor (if enabled) appears on the D+ pin. When bit SPEED = 0, USB0 operates as a low speed USB function, and
the on-chip pull-up resistor (if enabled) appears on the D- pin. The PHYTST bits can be used for transceiver testing. The pull-up resistor
is enabled only when VBUS is present.
Note:
The USB clock should be active before the transceiver is enabled.
21.3.3 Clock Configuration
The USB module is capable of communication as a full or low speed USB function. Communication speed is selected via the SPEED
bit in USB0XCN. When operating as a low speed function, the USB clock must be 6 MHz. When operating as a full speed function, the
USB clock must be 48 MHz. The USB clock is selected using the USBCLK bit field in the USB0CF register. A typical full speed applica-
tion would configure the USB clock to run directly from the HFOSC1 oscillator, while a typical low speed application would configure the
clock for HFOSC1/8. The USB clock may also be derived from an external CMOS clock with various divider options. By default, the
clock to the USB module is turned off to save power.
Clock Recovery circuitry uses the incoming USB data stream to adjust the internal oscillator; this allows the internal oscillator to meet
the requirements for USB clock tolerance. Clock Recovery should always be used any time the USB block is clocked from the internal
HFOSC1 clock in full speed applications. When operating the USB module as a low speed function with Clock Recovery, software must
write 1 to the CRLOW bit to enable low speed Clock Recovery. Clock Recovery is typically not necessary in low speed mode. Single
Step Mode can be used to help the Clock Recovery circuitry to lock when high noise levels are present on the USB network. This mode
is not required (or recommended) in typical USB environments.
21.3.4 VBUS Control
In a self-powered system, it is generally desirable to be able to detect the presence of VBUS. VBUS indicates when a host device has
been connected to or disconnected from the USB peripheral. The VBUS signal may be enabled on a port pin and configured to gener-
ate system interrupts if the state changes.
The VBUS control bits are found int he USB0CF register. VBUSEN enables the VBUS pin as an input to the USB module, while the
VBUSIE bit enables the associated interrupt. VBUSI will be set any time the state of VBUS changes, and firmware may then read the
state of the VBUS pin and act accordingly.
EFM8UB3 Reference Manual
Universal Serial Bus (USB0)
silabs.com
| Building a more connected world.
Rev. 0.2 | 312