Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
borderWidth0
titleTable - Generic Configuration Constants


ConstantDescriptionPossible values
USBD_CFG_OPTIMIZE_SPDOptimizes for either better performance or for smallest code size. Enabling this define will optimize µC/USB-Device code for better performance and disabling this define will lead to smaller code size. DEF_ENABLED or DEF_DISABLED
USBD_CFG_MAX_NBR_DEVConfigures the maximum number of devices. This value should be set to the number of device controllers used on your platform.Default value is 1.
USBD_CFG_BUF_ALIGN_OCTETSConfigures the alignment in octets that internal stack’s buffer needs. This value should be set in function of your platform/hardware requirements. If your platform does not require buffer alignment, this should be set to the size of a CPU word (sizeof(CPU_ALIGN)).Typically 1, 2, 4 or 8. Default value is sizeof(CPU_ALIGN).
USBD_ERR_CFG_ARG_CHK_EXT_ENAllows code to be generated to check arguments for functions that can be called by the user and, for functions which are internal but receive arguments from an API that the user can call. DEF_ENABLED or DEF_DISABLED
USBD_CFG_MS_OS_DESC_ENEnables or disables support of Microsoft OS descriptors. Enabling this feature will cause the device to respond to Microsoft OS string descriptor requests and Microsoft OS specific descriptors.

For more information on Microsoft OS descriptors, refer to the Microsoft Hardware Dev Center.
DEF_ENABLED or DEF_DISABLED



USB Device Configuration


Panel
borderWidth0
titleTable - Device Configuration Constants


ConstantDescriptionPossible Values
USBD_CFG_MAX_NBR_CFGSets the maximum number of USB configurations used by your device. Keep in mind that if you use a high-speed USB device controller, you will need at least two USB configurations, one for low and full-speed and another for high-speed. Refer to the Universal Serial Bus specification, Revision 2.0, section 9.2.3 for more details on USB configuration.From 1 (low- or full-speed) or 2 (high-speed) to 254. Default value is 2.
USBD_CFG_EP_ISOC_ENSelected portions of μC/USB-Device code required only for isochronous transfers may be disabled to reduce the code size by configuring USBD_CFG_EP_ISOC_EN. This define should be set to DEF_DISABLED if isochronous transfers are not required, to save space. DEF_ENABLED or DEF_DISABLED
USBD_CFG_HS_ENSelected portions of μC/USB-Device code required only for high-speed operation may be disabled to reduce the code size by configuring USBD_CFG_HS_EN. This define should be set to DEF_ENABLED if the USB device controller supports high-speed, or to DEF_DISABLED otherwise. DEF_ENABLED or DEF_DISABLED
USBD_CFG_CTRL_REQ_TIMEOUT_mSSets the timeout in milliseconds for the Data and the Status phases of a control transfer. This timeout prevent from a deadlock situation during a control transfer processing by the core layer. Thus a value of 0, meaning wait forever, is not allowed.From 1 to 65535. Default value is 5000.



Interface Configuration


Panel
borderWidth0
titleTable - Interface Configuration Constants


ConstantDescriptionPossible Values
USBD_CFG_MAX_NBR_IFConfigures the maximum number of interfaces available. This value should at least be equal to USBD_CFG_MAX_NBR_CFG and greatly depends on the USB class(es) used. It represents the total number of interfaces usable for all configurations of your device. Each class instance requires at least one interface, while CDC-ACM requires two.Refer to the Universal Serial Bus specification, Revision 2.0, section 9.2.3 for more details on USB interfaces.From 1 to 254. Default value is 2.
USBD_CFG_MAX_NBR_IF_ALTDefines the maximum number of alternate interfaces (alternate settings) available. This value should at least be equal to USBD_CFG_MAX_NBR_IF and represents the total number of alternate interfaces usable by all interfaces of your device. Refer to the Universal Serial Bus specification, Revision 2.0, section 9.2.3 for more details on alternate settings.From 1 to 254. Default value is 2.
USBD_CFG_MAX_NBR_IF_GRPDefines the maximum number of interface groups or associations available. For the moment, Micrium offers only one USB class (CDC-ACM) that requires interface groups. Refer to the Interface Association Descriptors USB Engineering Change Notice for more details about interface associations.From 0 to 254. Default value is 0 (should be equal to the number of instances of CDC-ACM).
USBD_CFG_MAX_NBR_EP_DESCDefines the maximum number of endpoint descriptors available. This value greatly depends on the USB class(es) used. For information on how many endpoints are needed for each class, refer to the class specific chapter. Keep in mind that control endpoints do not need any endpoint descriptors.From 0 to 254. Default value is 2.
USBD_CFG_MAX_NBR_EP_OPENConfigures the maximum number of opened endpoints per device. If you use more than one device, set this value to the worst case. This value greatly depends on the USB class(es) used. For information on how many endpoints are needed for each class, refer to the class specific chapter.From 2 to 32. Default value is 4 (2 control plus 2 other endpoints).
USBD_CFG_MAX_NBR_URB_EXTRADefines the number of additional URBs that are used for asynchronous transfers only. Since these URBs are shared between every endpoint, if one endpoint uses them all, other endpoints will not be able to queue any transfer, although it is guaranteed that every endpoint always has one URB still available, to ensure that a transfer can be done at any time.From 0 to (65535 - USBD_CFG_MAX_NBR_EP_OPENUSBD_CORE_EVENT_URB_NBR_TOTAL). Default value is 0.



String Configuration


Panel
borderWidth0
titleTable - String Configuration Constants


ConstantDescriptionPossible Values
USBD_CFG_MAX_NBR_STRConfigures the maximum number of string descriptors supported. This value can be increased if, for example, you plan to add interface specific strings.From 1 to 254. Default value is 3 (1 descriptor for Manufacturer string, Product string and Serial Number string).



Debug Configuration

Configurations in this section only need to be set if you use the core debugging service. For more information on that service, see the Debug and Trace page.

...

Panel
borderWidth0
titleTable - Debug Configuration Constants


ConstantDescriptionPossible Values
USBD_CFG_DBG_TRACE_ENEnables or disables the core debug trace engine.DEF_ENABLED or DEF_DISABLED
USBD_CFG_DBG_TRACE_NBR_EVENTSDefines the maximum number of debug trace events that can be queued by the core debug trace engine. This configuration constant has no effect and will not allocate any memory if USBD_CFG_DBG_TRACE_EN is set to DEF_DISABLED.From 1 to 65535. Default value is 10.



Classes Configuration

Audio Class Configuration

...