System

API Documentation: [cpp] [python] [.NET] [LabVIEW]

Every BrainStem module includes a single system entity. The system entity allows the retrieval and manipulation of configuration settings like the module address and input voltage, control over the user LED, as well as other functionality.


Serial Number

Every USBHub3c is assigned a unique serial number at the factory. This facilitates an arbitrary number of USBHub3c devices attached to a host computer. The following method call can retrieve the unique serial number for each device.

stem.system.getSerialNumber() [cpp] [python] [NET] [LabVIEW]

Saved Settings

Some entities can be configured and saved to non-volatile memory. This allows a user to modify the startup and operational behavior for the USBHub3+ away from the factory default settings. Saving system settings preserves the settings as the new default. Most changes to system settings require a save and reboot before taking effect. For example, upstream and downstream USB Boost settings will not take effect unless a system save operation is completed, followed by a reset or power cycle. Use the following command to save changes to system settings before reboot:

stem.system.save() [cpp] [python] [NET] [LabVIEW]

System Power

The USBHub3c is designed to accept power from either a Type-C PD port or from the unregulated power connector.

In the case of a Type-C PD source all power can be accounted for through Power Delivery (PD) negotiations. For instance, if a PD source advertises 100 Watts; that means we can provide 100 Watts of power to the connected sinking devices. The same can be said for a 60 Watt PD source. This value represents the maximum amount of power the USBHub3c can budget for all of its sinking devices. This value can be acquired through:

stem.system.getPowerLimit() [cpp] [python] [NET] [LabVIEW]

It is possible that the limit of your PD source may not match that of what is being advertised by the function above. The contributing factors can be determined by checking the state of the power limit.

stem.system.getPowerLimitState() [cpp] [python] [NET] [LabVIEW]

In the case of the unregulated power connector the power budgeting gets a bit more tricky because there is no way of knowing the supplies maximum power. To resolve this the user is allowed to define a power limit maximum that matches that of the connected power supply.

stem.system.setPowerLimitMax() [cpp] [python] [NET] [LabVIEW]
stem.system.getPowerLimitMax() [cpp] [python] [NET] [LabVIEW]

Note

Failure to correctly configure this value can result in undefined behavior such as resets.

These values only apply when the input power source is that of the unregulated power connector.

stem.system.getInputPowerSource() [cpp] [python] [NET] [LabVIEW]

Power Budgeting and Behavior

As we alluded to in the System power section the USBHub3c has to be a bit clever about accounting for all input and output power. The method by which an input power source is selected and used is referred to as Input Power Behavior. It can be configured through

stem.system.setInputPowerBehavior() [cpp] [python] [NET] [LabVIEW]
stem.system.getInputPowerBehavior() [cpp] [python] [NET] [LabVIEW]

Some behaviors require additional configuration. In most cases this is a list of port numbers that define which ports should be prioritized for input power.

stem.system.setInputPowerBehaviorConfig() [cpp] [python] [NET] [LabVIEW]
stem.system.getInputPowerBehaviorConfig() [cpp] [python] [NET] [LabVIEW]

Voltage and Current Monitoring