21.3.8 Function Configuration and Control
The USB register POWER is used to configure and control the USB block at the device level (enable/disable, Reset/Suspend/Resume
handling, etc.).
USB Reset
: The USBRST bit is set to 1 by hardware when Reset signaling is detected on the bus. Upon this detection, the following
occur:
1. The USB0 Address is reset (FADDR = 0x00).
2. Endpoint FIFOs are flushed.
3. Control/status registers are reset to 0x00 (E0CSR, EINCSRL, EINCSRH, EOUTCSRL, EOUTCSRH).
4. USB register INDEX is reset to 0x00.
5. All USB interrupts (excluding the Suspend interrupt) are enabled and their corresponding flags cleared.
6. A USB Reset interrupt is generated if enabled.
Writing a 1 to the USBRST bit will generate an asynchronous USB reset. All USB registers are reset to their default values following this
asynchronous reset.
Suspend Mode
: With Suspend detection enabled (SUSEN = 1), USB0 will enter suspend mode when Suspend signaling is detected
on the bus. An interrupt will be generated if enabled (SUSINTE = 1). The Suspend interrupt service routine (ISR) should perform appli-
cation-specific configuration tasks such as disabling appropriate peripherals and/or configuring clock sources for low power modes.
The USB module exits Suspend mode when any of the following occur:
• Resume signaling is detected or generated
• Reset signaling is detected
• A device or USB reset occurs
If the device itself is in suspend mode, the internal oscillator will also exit suspend mode upon any of the above listed events.
Resume Signaling
: The USB module exits Suspend mode if Resume signaling is detected on the bus. A Resume interrupt will be gen-
erated upon detection if enabled (RESINTE = 1). Software may force a Remote Wakeup by writing 1 to the RESUME bit (POWER.2).
When forcing a Remote Wakeup, software should write RESUME = 0 to end Resume signaling 10-15 ms after the Remote Wakeup is
initiated (RESUME = 1).
ISO Update
: When software writes 1 to the ISOUP bit, the isochronous update function is enabled. With isochronous update enabled,
new packets written to an isochronous IN endpoint will not be transmitted until a new Start-Of-Frame (SOF) is received. If the isochro-
nous IN endpoint receives an IN token before a SOF, the USB interface will transmit a zero-length packet. When ISOUP = 1, isochro-
nous update is enabled for all isochronous endpoints.
USB Enable
: The USB module is disabled following a power-on-reset (POR). USB is enabled by clearing the USBINH bit. Once written
to 0, the USBINH can only be set to 1 by a POR or an asynchronous USB reset generated by writing 1 to the USBRST bit.
Software should perform all USB configuration before enabling the USB module. The configuration sequence should be performed as
follows:
1. Select and enable the USB clock source.
2. Reset the USB block by writing USBRST= 1.
3. Configure and enable the USB Transceiver.
4. Perform any USB function configuration (interrupts, Suspend detect, power mode configuration).
5. Enable USB by writing USBINH = 0.
21.3.9 Interrupts
The read-only USB interrupt flags are located in the USB registers shown in IN1INT, OUT1INT, and CMINT. The associated interrupt
enable bits are located in the USB registers IN1IE, OUT1IE, and CMIE. A USB interrupt is generated when any of the USB interrupt
flags is set to 1.
Note:
Reading a USB interrupt flag register resets all flags in that register to 0.
21.3.10 Serial Interface Engine
The serial interface engine (SIE) performs all low level USB protocol tasks, interrupting the processor when data has successfully been
transmitted or received. When receiving data, the SIE will interrupt the processor when a complete data packet has been received;
appropriate handshaking signals are automatically generated by the SIE. When transmitting data, the SIE will interrupt the processor
when a complete data packet has been transmitted and the appropriate handshake signal has been received.
The SIE will not interrupt the processor when corrupted/erroneous packets are received.
EFM8UB3 Reference Manual
Universal Serial Bus (USB0)
silabs.com
| Building a more connected world.
Rev. 0.2 | 317