![]() |
Synergy Software Package User's Manual
|
The Azure RTOS USBX Synergy Port framework module (sf_el_ux) is integrated into the SSP and is used with Azure RTOS USBX. For more information about USBX (including API references), refer to the USBX User Guide.
Unsupported Features
The following features have not been integrated into this version of SSP:
The following features are experimental. They have been integrated but not tested:
The Azure RTOS USBX Synergy Port Framework module supports the following features:
__*
The Azure RTOS USBX Synergy Port Framework module doesn't have API calls of its own- it implements the API calls for the Azure RTOS USBX API calls. Documentation on these APIs is available in the Azure RTOS USBX User Manual.
The Azure RTOS USBX Synergy Port framework module provides the Synergy USB hardware port functions required to use the USBX stack on Synergy hardware. Application code using this module is expected to use USBX API calls.
The Azure RTOS USBX Synergy Port framework module includes the support for the Azure RTOS USBX APIs in SSP. Refer to the Azure RTOS USBX User Manual for a complete description of the available APIs.
The Azure RTOS USBX Synergy Port framework module supports the Port Device Controller Driver (DCD) on USBHS and USBFS peripherals as well as the Port Host Controller Driver (HCD) for the USBHS on USBFS peripherals.
Users have the option of using the Transfer Module for the USBX Synergy Port framework module to get better USB data throughput by transferring data in the block transfer mode. To enable the Transfer module, just add two instances of transfer components to the USBX Class stack in the Synergy Configuration tool and enable the interrupts in the property. The Synergy Configuration tool auto-generates the driver setup code to enable DMAC or DTC transfer in common_data.c.
The module uses the interrupt of a USB Controller. Set the appropriate interrupt priority level in the Synergy Configuration tool; otherwise it does not work. The module uses the interrupt of a transfer module (implemented as DMAC or DTC) if it is used. Set the appropriate priority level in the Synergy Configuration tool. The priority level of the transfer module must be higher than the priority level for the USB Controller; otherwise it does not work.
This section describes how to include the USBX Synergy Port Framework module in an application using the SSP configurator.
To add the USBX Synergy Port Framework module to an application, simply add it to a thread using the stacks selection sequence given in the following table.
USBX Synergy Port Framework Module Selection Sequence
| Resource | ISDE Tab | Stacks Selection Sequence |
|---|---|---|
| g_sf_el_ux_hcd_hs_0 USBX Port HCD on sf_el_ux for USBHS | Threads | New Stack> X-Ware> USBX> Host > Synergy Port> USBX Port HCD on sf_el_ux for USBHS |
| g_sf_el_ux_hcd_fs_0 USBX Port HCD on sf_el_ux for USBFS | Threads | New Stack> X-Ware> USBX> Host > Synergy Port> USBX Port HCD on sf_el_ux for USBFS |
| g_sf_el_ux_dcd_hs_0 USBX Port HCD on sf_el_ux for USBHS | Threads | New Stack> X-Ware> USBX> Device > Synergy Port> USBX Port HCD on sf_el_ux for USBHS |
| g_sf_el_ux_dcd_fs_0 USBX Port HCD on sf_el_ux for USBFS | Threads | New Stack> X-Ware> USBX> Device > Synergy Port> USBX Port HCD on sf_el_ux for USBFS |
When the USBX Synergy Port Framework module is added to the thread stack as shown in the following figure, the configurator automatically adds any needed lower‑level modules. Any modules needing additional configuration information have the box text highlighted in Red. Modules with a Gray band are individual modules that stand alone. Modules with a Blue band are shared or common; they need only be added once and can be used by multiple stacks. Modules with a Pink band can require the selection of lower-level modules; these are either optional or recommended. (This is indicated in the block with the inclusion of this text.) If the addition of lower-level modules is required, the module description include Add in the text. Clicking on any Pink banded modules brings up the New icon and displays possible choices.
The USBX Synergy Port Framework module must be configured by the user for the desired operation. The SSP configuration window automatically identifies (by highlighting the block in red) any required configuration selections, such as interrupts or operating modes, which must be configured for lower-level modules for successful operation. Only properties that can be changed without causing conflicts are available for modification. Other properties are locked and not available for changes and are identified with a lock icon for the locked property in the Properties window in the ISDE. This approach simplifies the configuration process and makes it much less error-prone than previous manual approaches to configuration. The available configuration settings and defaults for all the user-accessible properties are given in the Properties tab within the SSP Configurator and are shown in the following tables for easy reference.
Configuration Settings for the USBX Port DCD on sf_el_ux for USBFS
| ISDE Property | Value | Description |
|---|---|---|
| Full Speed Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the interrupt priority for full-speed USB. |
| LDO Regulator (Only for S3 and S1 part MCUs) | Enable, Disable Default: Disable | Select the LDO regulator will be enabled. |
| Name | g_sf_el_ux_dcd_fs_0 | Module name. |
| USB Controller Selection | USBFS | Select the USB controller. |
Configuration Settings for the USBX Port DCD on sf_el_ux for USBHS
| ISDE Property | Value | Description |
|---|---|---|
| High Speed Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the interrupt priority for high speed USB. |
| Name | g_sf_el_ux_dcd_hs_0 | Module name. |
| USB Controller Selection | USBHS | Select the USB controller. |
Configuration Settings for the USBX Port HCD on sf_el_ux for USBFS
| ISDE Property | Value | Description |
|---|---|---|
| Full Speed Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the interrupt priority for full-speed USB. |
| VBUSEN pin Signal Logic | Active Low, Active High Default: Active High | Select the VBUSEN pin signal logic. |
| LDO Regulator (Only for S3 and S1 part MCUs) | Enable, Disable Default: Disable | Select the LDO regulator will be enabled. |
| Name | g_sf_el_ux_hcd_fs_0 | Module name. |
| USB Controller Selection | USBFS | Select the USB controller. |
Configuration Settings for the USBX Port HCD on sf_el_ux for USBHS
| ISDE Property | Value | Description |
|---|---|---|
| High Speed Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the interrupt priority for high speed USB. |
| FIFO size for Bulk/Isochronous Pipes | 512, 1024, 1536, 2048 bytes Default: 512 bytes | Select the FIFO size for bulk and isochronous transfers. |
| Number of Isochronous Pipes Reserved | 0,1,2 Default: 0 | Select the number of isochronous pipes to reserve. |
| VBUSEN pin Signal Logic | Active Low, Active High Default: Active High | Select the VBUSEN pin signal logic. |
| Enable High Speed | Enable, Disable Default: Enable | Select if high speed should be enabled. |
| Name | g_sf_el_ux_hcd_hs_0 | Module name. |
| USB Controller Selection | USBHS | Select the USB controller. |
Only a small number of settings must be modified from the default for the IP layer and lower-level drivers as indicated via the red text in the thread stack block. Notice that some of the configuration properties must be set to a certain value for proper framework operation and are locked to prevent user modification. The following table identifies all the settings within the properties section for the module:
Configuration Settings for the Transfer Driver on r_dmac
| ISDE Property | Value | Description |
|---|---|---|
| Parameter Checking | BSP, Enabled, Disabled Default: BSP | If selected code for parameter checking is included in the build. |
| Name | g_transfer0 | Module name. |
| Channel | 0 | Specify the hardware channel. |
| Mode | Block | Select the transfer mode. |
| Transfer Size | 1 Byte | Select the transfer size. |
| Destination Address Mode | Fixed | Select the address mode for the destination. |
| Source Address Mode | Incremented | Select the address mode for the source. |
| Repeat Area (Unused in Normal Mode | Source | Select the repeat area. Either the source or destination address resets to its initial value after completing Number of Transfers in Repeat or Block mode. |
| Destination Pointer | NULL | Specify the transfer destination pointer. |
| Source Pointer | NULL | Specify the transfer source pointer. |
| Number of Transfers | 0 | Specify the number of transfers. |
| Number of Blocks (Valid only in Block Mode) | 0 | Specify the number of blocks to transfer in Repeat or Block mode. |
| Activation Source | Device: Event USBFS FIFO 0 Host: Software Activation | Select the DMAC transfer start event. |
| Auto Enable | False | Auto enable the transfer in open(). |
| Callback | NULL | A user callback that is called at the end of the transfer. |
| Transfer End Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the transfer end interrupt priority. |
Configuration Settings for the Transfer Driver on r_dmac
| ISDE Property | Value | Description |
|---|---|---|
| Parameter Checking | BSP, Enabled, Disabled Default: BSP | If selected code for parameter checking is included in the build. |
| Name | g_transfer0 | Module name. |
| Channel | 0 | Specify the hardware channel. |
| Mode | Block | Select the transfer mode. |
| Transfer Size | 1 Byte | Select the transfer size. |
| Destination Address Mode | Incremented | Select the address mode for the destination. |
| Source Address Mode | Fixed | Select the address mode for the source. |
| Repeat Area (Unused in Normal Mode | Destination | Select the repeat area. Either the source or destination address resets to its initial value after completing Number of Transfers in Repeat or Block mode. |
| Destination Pointer | NULL | Specify the transfer destination pointer. |
| Source Pointer | NULL | Specify the transfer source pointer. |
| Number of Transfers | 0 | Specify the number of transfers. |
| Number of Blocks (Valid only in Block Mode) | 0 | Specify the number of blocks to transfer in Repeat or Block mode. |
| Activation Source | Device: Event USBFS FIFO 1 Host: Software Activation | Select the DMAC transfer start event. |
| Auto Enable | False | Auto enable the transfer in open(). |
| Callback | NULL | A user callback that is called at the end of the transfer. |
| Transfer End Interrupt Priority | Priority 0 (highest), Priority 1:14, Priority 15 (lowest - not valid if using ThreadX), Disabled Default: Disabled | Select the transfer end interrupt priority. |
The USB peripheral module uses the UCLK as its clock source; the UCLK should be configured for 48MHz operation. In the SSP configuration window, select the Clocks tab to view the clock-source setting.
The USB peripheral module uses MCU pins to communicate with external devices. Select I/O pins and configure to the external device requirements. The following table illustrates the pin selection method within the SSP Configuration Window and the subsequent tables demonstrates the selection process using USB pins as an example.
USBFS and USBHS Pin Selection Sequence
| Resource | ISDE Tab | Pin selection Sequence |
|---|---|---|
| USBFS | Pins | Select Peripherals > Connectivity: USBFS> USBFS0 |
| USBHS | Pins | Select Peripherals > Connectivity: USBHS> USBHS0 |
USBHS Pin Configuration Settings
| Property | Value | Description |
|---|---|---|
| Operation Mode | Disabled, Custom, Device, Host, OTG Default: Custom | Select device as the Operation Mode |
| USBDP | USBDP | USBDP pin |
| USBDM | USBDM | USBDM pin |
| OVRCURB | None | OVRCURB pin |
| OVRCURA | None | OVRCURA pin |
| VBUSEN | None | VBUSEN pin |
| VBUS | None, P407 Default: P407 | VBUS pin |
| EXICEN | None | EXICEN pin |
| ID | None | ID Pin |
| VCCUSB | VCCUSB | VCCUSB pin |
| VSSUSB | VSSUSB | VSSUSB pin |
USBHS Pin Configuration Settings
| Property | Value | Description |
|---|---|---|
| Operation Mode | Disabled, Custom, Device, Host, OTG Default: Custom | Select Device as the Operation Mode |
| USBHSDP | USBHSDP | USBHSDP pin |
| USBHSDM | USBHSDM | USBHSDM pin |
| OVRCURB | None | OVRCURB pin |
| OVRCURA | None | OVRCURA pin |
| VBUSEN | PB00 | VBUSEN pin |
| VBUS | PB01 | VBUS pin |
| EXICEN | None | EXICEN pin |
| ID | None | ID pin |
| USBHSRREF | USBHSRREF | USBHSRREF pin |
| AVCCUSBHS | AVCCUSBHS | AVCCUSBHS pin |
| AVSSUSBHS | AVSSUSBHS | AVSSUSBHS pin |
| PVSSUSBHS | PVSSUSBHS | PVSSUSBHS pin |
| VCCUSBHS | VCCUSBHS | VCCUSBHS pin |
| VSS1USBHS | VSS1USBHS | VSS1USBHS pin |
| VSS2USBHS | VSS2USBHS | VSS2USBHS pin |
Once the Azure RTOS Synergy Port USBX framework module is added to a thread, the Azure RTOS APIs become available for use by higher-level modules. There is usually no need to use the Azure RTOS Synergy Port USBX framework module directly in application code. Refer to the Azure RTOS USBX User's Manual if you need to use the module stand-alone and need to access the associated APIs directly.
Following is the sequence of API's called successfully in a sequential order in an application for completely deleting detected USB Device class,
!( )[media/sf_el_ux_FD.png)