AN740: Using the Ember
®
EM358x/EM359x
USB
This application note provides key information for using the Em-
ber® EM358x/359x USB. The goal of the EM358/359x USB is to
act as a COM port replacement for UART-style functionality by
enumerating as a communications data class (CDC) USB device.
See EM358x/EM359x Errata for the following known issue: When using the integrated
USB on the EM358x and EM359x, the EM35xx may fail to enumerate. Additional infor-
mation is in section 6. USB Certification.
KEY POINTS
Breakout board configuration
Host PC driver
Terminal programs
On-chip firmware driver
Basic serial port functionality
USB certification
silabs.com | Smart. Connected. Energy-friendly. Rev. 0.7
1. Breakout Board Configuration
The 710-0680-000 C breakout board (EM358x) has a USB connector located next to the RCM. To use USB on this breakout board, the
J40 jumper next to the USB connector must be set in the “USB EN” state. With USB enabled, PA0, PA1, PA2, and PA3 are not func-
tional anywhere else on the breakout board.
The EM359x USB connector is located on the RCM. When used with the 710-0682-000 A0 breakout board, the J2/J3 Vin selector
should be disconnected.
1.1 GPIO Configuration and Control
The USB driver code will ignore any existing GPIO configuration by directly setting PA0, PA1, PA2, and PA3 as needed. PA0 and PA1
are the only pins that support USB data. The default configuration of the driver is to use PA2 for enumeration control and PA3 for VBUS
monitoring. Board file abstraction allows PA2 and PA2 functionality to be changed to other GPIO.
The board file uses the macro USB_SELFPWRD_STATE to define if the system is bus-powered or self-powered by a source other than
the USB connection. By default USB_SELFPWRD_STATE is set to 1 indicating the device is self-powered. When
USB_SELFPWRD_STATE is set to 1, VBUS monitoring is required. To conform to USB Certification, when USB is not physically con-
nected (no voltage on VBUS) enumeration control will be configured for de-enumeration and the on-chip driver will not allow enumera-
tion. When USB is physically connected, VBUS monitoring will sense the VBUS change and enumeration control will be returned to the
desired enumeration state.
1.1.1 PA0 and PA1
PA0 and PA1 are for D- and D+ bus signaling and configured as GPIOCFG_ANALOG.
Board file abstractions use USBDM for PA0 and USBDM for PA1 in the names.
1.1.2 PA2
PA2 is for enumeration control. The EM358x/359x must always be able to control enumeration. PA2 connects to the necessary pull-up
resistor allowing software on the device to specifically enumerate or de-enumerate as needed. When enumerated, PA2 is set to
GPIOCFG_OUT in a logic high state. When de-enumerated, PA2 is set to GPIOCFG_IN.
Board file abstractions use ENUMCTRL in the names.
1.1.3 PA3
PA3 is configured as GPIOCFG_IN for monitoring VBUS to know if the USB cable is physically connected. When a design is self-pow-
ered, VBUS monitoring is required. The 5 volt VBUS must be routed through a resistor-divider or similar circuit so that the EM358x/
EM359x sees an acceptable voltage level on an input GPIO.
Board file abstractions use VBUSMON in the names.
1.1.4 PA3 interaction with PA2
For USB devices that are configured as self-powered, the USB specification requires that the enumeration pull-up resistor only be ap-
plied if VBUS is present. If PA3 does not sense VBUS, PA2 will be configured as de-enumerated. The on-chip driver will not allow PA2
to attempt enumeration until PA3 detects VBUS. The on-chip driver will monitor for any change of VBUS state. PA2’s actual configura-
tion will appropriately track the desired enumeration state and the VBUS state.
1.1.5 VBUS Monitoring
To properly monitor a change in VBUS an IRQ must be used. The IRQ must be configured to monitor both a rising and falling edge of
VBUS to allow PA2 to be configured properly. The default configuration is to use PA3 for VBUS monitoring which means a selectable
IRQ must be used. The two available selectable IRQs are IRQC and IRQD. IRQD is the default choice. The behavior of the VBUS
monitoring IRQ is derived from the behavior of buttons.
AN740: Using the Ember
®
EM358x/EM359x USB
Breakout Board Configuration
silabs.com | Smart. Connected. Energy-friendly. Rev. 0.7 | 1