Synergy Software Package User's Manual
USBX Source

USBX Source Component Module Introduction

The purpose of this document is to provide an easy reference for the USBX source component in e2 studio. The properties are explained in greater detail than the footer comment supplied with each property. Context specific usage is included for if and when to change a default value.  This document should make it easier to use the USBX source component without having to cross reference with the Azure RTOS USBX User Guide, and help the developer get familiarized more quickly with USBX features.

When to Include the USBX Source Component

Adding the USBX source component enables the developer in the Synergy configurator environment to customize the USBX library, change values from default settings and enable or disable certain features.  Otherwise, they must use the prebuilt USBX library. In most projects beyond the simplest, the developer will typically want to customize their USBX environment. Adding USBX stack component does not add ThreadX stack source component by default.

Without adding the USBX source component, the e2 studio configurator will use a prebuilt library with the USBX default settings.

Adding the USBX Source Component

In the e2 studio configurator you can add the USBX Source component by selecting any thread from the Threads list and pressing the "New Stack" button and navigating the menu to X-Ware -> USBX -> Common -> USBX Source.

ux_src_MS.png

Changing the USBX Source Component Properties

After changing USBX property settings, the developer must click on the Generate Project Content button to update the project configurator in e2 studio; then the USBX library must be rebuilt (for example, rebuild the project).  Simply changing a property (or applying a #define in the preprocessor list) without rebuilding the project will not affect any change; e2 studio will use the previously built library. 

Default settings are based on use experience and are often the choice that will apply to the most common use cases.

USBX Source Component Overview

The properties of the USBX Source component are given in the order they appear in the properties window of the Synergy configurator.

Ticks per second for USBX system – default value not displayed, the ThreadX value is used – By default, USBX will use the value defined at ThreadX. You should not change this unless you have extensively modified the ThreadX tick timer mechanism.

Maximum Classes – default value not displayed, 8 used – When defined, this value is the maximum number of classes that can be loaded by USBX. This value represents the class container and not the number of instances of a class. For instance, if a particular implementation of USBX needs the hub class, the printer class and the storage class, then the UX_MAX_CLASSES value can be set to 3 regardless of the number of devices that belong to these.

Maximum Slave Classes – default value not displayed, 3 used – When defined, this value is the maximum number of classes in the device stack that can be loaded by USBX.

Maximum Slave Interfaces - default value not displayed, 16 used – When defined, this value is the maximum number of interfaces in the device framework.

Maximum Host Class Containers - default value not displayed, no maximum set.

Maximum Device Class Containers - default value not displayed, no maximum set.

Maximum Host Controllers - default value not displayed, no maximum set - This value represents the number of different host controllers that are available in the system. For USB 1.1 support, this value will mostly be 1. For USB 2.0 support, this value can be more than 1. This value represents the number of concurrent host controllers running at the same time. If, for instance, there are two instances of OHCI running or one EHCI and one OHCI controllers running, the UX_MAX_HCD should be set to 2.

Maximum Devices - default value not displayed, 8 used – This value represents the maximum number of devices that can be attached to the USB. Normally, the theoretical maximum number on a single USB is 127 devices. This value can be scaled down to conserve memory. It should be noted that this value represents the total number of devices regardless of the number of USB buses in the system.

Maximum EDs - default value not displayed, 80 used – This value represents the maximum number of EDs in the controller pool. This number is assigned to one controller only. If multiple instances of controllers are present, this value is used by each individual controller.

Maximum TDs - default value not displayed, 128 used – This value represents the maximum number of regular TDs in the controller pool. This number is assigned to one controller only. If multiple instances of controllers are present, this value is used by each individual controller.

Note: Sufficient numbers of TDs are required, when user changes this parameter for large size (FS more than 8KB and HS more the 64KB) of data transfer. Sufficient number of 'Maximum TDs' needs to be specified in USBX Source module (USBX Source property >> Common >> Maximum TDs).

  • Maximum TDs for FS mode (maximum data transfer size in bytes /64 bytes = TDs + additional TDs for SCSI wrapper commands).
  • Maximum TDs for HS mode (maximum data transfer size in bytes /512 bytes = TDs + additional TDs for SCSI wrapper commands).

Maximum Isochronous TDs - default value not displayed, 128 used – This value represents the maximum number of isochronous TDs in the controller pool. This number is assigned to one controller only. If multiple instances of controllers are present, this value is used by each individual controller.

Stack size for USBX threads - default value not displayed, 1024 bytes used on host and mixed controllers, 512 on device only controllers – This value is the size of the stack in bytes for the USBX threads. It can be typically 1024 or 2048 bytes depending on the processor used and the host controller.

USBX Enumeration Thread Priority - default value not displayed, 20 used – This is the ThreadX priority value for the USBX enumeration threads that monitors the bus topology.

USBX Standard Thread Priority - default value not displayed, 20 used – This is the ThreadX priority value for the standard USBX threads.

USBX HID Keyboard Class Thread Priority - default value not displayed, 20 used – This is the ThreadX priority value for the USBX HID keyboard class.

USBX HCD Thread Priority - default value not displayed, 2 used – This is the ThreadX priority value for the host controller thread.

No use of time slice - default value disabled – If enabled the ThreadX target port does not use time slicing.

Maximum Slave Logical Units - default value not displayed, 2 used – This value represents the current number of SCSI logical units represented in the device storage class driver.

Maximum Host Logical Units - default value not displayed, 16 used – This value represents the maximum number of SCSI logical units represented in the host storage class driver.

Slave Request Control Maximum Length - default value not displayed, 256 used – This value represents the maximum number of bytes received on a control endpoint in the device stack. The default is 256 bytes, but can be reduced in memory constraint environments.

Note
Slave request control maximum length value have to increase more than event buffer value, If USBX Device HID class event buffer length value is more then 256 (USBX Device class HID source >> Common >> USBX Device HID Event Buffer Length).

Slave Request Data Maximum Length - default value not displayed, 512 in device only controllers, 4096 otherwise – This value represents the maximum number of bytes received on a bulk endpoint in the device stack. The default is 4096 bytes, but can be reduced in memory constraint environments.

Enforce Safe Alignment - default value is disabled – When enabled the memory allocation scheme enforces alignment. The default alignment value is UX_SAFE_ALIGN.

__Control Transfer Timeout - default value not displayed, 10000 used -__ When set, this value represents the control transfer timeout in milliseconds.

__Non-Control Transfer Timeout - default value not displayed, 50000 used -__ When set, this value represents the non-control transfer timeout in milliseconds.

__Disable CDC-ACM Non-blocking Transmission - default value is yes -__ Select yes to disable the CDC ACM non-blocking transmission support.

Note
To enable CDC-ACM Non-blocking transmission, USBX source and USBX device class CDC-ACM source should be added in thread stack and the property "Disable CDC ACM Non-blocking Transmission" in USBX source should be set to "No".

__Bidirectional Endpoint Support - default value is disabled -__ This property enables support for device bi-directional endpoint.

__Enable Assert Check - default value is yes -__ This property enables assert checks inside USBX.

__Enable Assertion On Failure Detection - default value is no -__ Select yes to take assert actions on failure detection.

__Host Device Class Code Validation - default value is disabled -__ When enabled, the host device class code is validated.

__USBX Standalone Mode - default value is disabled -__ When enabled, the standalone mode of USBX is supported.

__USBX String Descriptor Requests With Zero Language ID - default value is disabled -__ When enabled, defines the processing of getting String Descriptor requests with zero Language ID.

__USBX Endpoint Buffer Owner - default value is disabled -__ When enabled, this value represents the endpoint buffer owner.

Show linkage warning - default value enabled – By default show linking warnings.