USB Entity

API Documentation: [cpp] [python] [.NET] [CCA] [REST]

The USB Entity provides the software control interface for USB related features. This entity is supported by BrainStem products which have programmatically controlled USB features.


Alt. Mode Configuration

The USB-C-Switch Pro provides an intermediary receiver and amplifier on the HS and SS data lines. Alt-modes such as DisplayPort require different directional uses of the SS data lines. As such, it is required to define the alt-mode and direction of the connection. These modes are responsible for setting the direction of the SS data lines and related SBU lines.

stem.usb.getAltModeConfig(0, configuration) [cpp] [python] [NET] [LabVIEW]

stem.usb.setAltModeConfig(0, configuration) [cpp] [python] [NET] [LabVIEW]

where configuration is an integer value defined below. Details of the pin mapping and data direction are also depicted below.

Index

Alt Mode Configuration

0

SS Redrivers Disabled

1

USB 3.2 Enabled (No DisplayPort)

2

4-Lane DisplayPort Host on Common Port

3

4-Lane DisplayPort Host on Mux Port

4

2-Lane DisplayPort with USB 3.2 – Host on Common Port

5

2-Lane DisplayPort with USB 3.2 – Host on Mux Port

6

2-Lane DisplayPort Host on Common Port with USB 3.2 Inverted

7

2-Lane DisplayPort Host on Mux Port with USB 3.2 Inverted

8

USB4 / TB Enabled

9

USB4 / TB Inverted

Cable Flip

In normal operation, USB-C-Switch Pro connects signals on side A of the Common port to side A of the active Mux port. USB-C-Switch Pro can flip this mapping programmatically, rerouting CC/VCONN,SBU, and USB data so that side A of the Common Port connects to side B of the Mux ports.

stem.usb.getCableFlip(setting) [cpp] [python] [NET] [LabVIEW]

stem.usb.setCableFlip(setting) [cpp] [python] [NET] [LabVIEW]

where the parameter (setting) is an interger value of 0 or 1, where 0 is normal and 1 is full cable flip.

Individual functional groups of the USB connection can be flipped using the portMode option.

Port Operational State

The portState option provide an interface to the state of the common port and internals of the USB-C-Switch Pro system.

stem.usb.getPortState(0, state) [cpp] [python] [NET] [LabVIEW]

where (state) is a 32-bit word, defined below.

Bit

Port State Bit Map

0

VBUS enable

1

HS Data enable

2

Reserved

3

SBU enable

4

SS Data enable

5

Reserved

6

CC1 enable

7

CC2 enable

8:9

Reserved

10:13

Reserved

14

CC Flip enable

15

Super-Speed Flip enable

16

SBU Flip enable

SBU Manipulation

stem.usb.setSBUEnable(0, enabled) [cpp] [python] [NET] [LabVIEW]

stem.usb.getSBUEnable(0, enabled) [cpp] [python] [NET] [LabVIEW]

where (enable) is a Boolean vale of 0 or 1.