This module guide will enable you to effectively use a module in your own design. Upon completion of this
guide, you will be able to add this module to your own design, configure it correctly for the target application,
and write code using the included application project code as a reference and an efficient starting point.
References to more detailed API descriptions and suggestions of other application projects that illustrate
more advanced uses of the module are included in this document and will be valuable resources for creating
more complex designs.
™
The USBX
applications and is implemented on g_ux_host. The USBX Host Class Mass Storage module uses the USB
and data-transfer peripherals on the Synergy MCU.
Contents
1. Features .................................................................................................................................. 2
11. Next Steps ............................................................................................................................. 13
12. Reference Information ........................................................................................................... 13
Revision History ............................................................................................................................ 15
R11AN0173EU0104 Rev.1.04 Page 1 of 15
Sep.30.19
Renesas Synergy™ Platform USBX™ Host Class Mass Storage Module Guide
1. Features
• Host controller for USB 2.0 with support for:
Root Hub
Power Management
Endpoints
Transfers
• High-level APIs simplify storage operations
• Supports optional data transfers using MCU hardware for improved efficiency
Figure 1. USBX Host Class Mass Storage Module Organization, Options and Stack Implementations
2. Overview
The USBX Host Class Mass Storage module does not have a separate API available for user applications.
When a USB media is connected, it is attached to the FileX
Storage instance. The user application uses this FileX member to access files on the USB media. For FileX
APIs, refer to the FileX User Guide for the Renesas Synergy™ Platform for more details. This document is
part of an X-Ware™ Component Documents for Renesas Synergy™ zip file available from the Renesas
Synergy Gallery (www.renesas.com/synergy/software
®
member included in the USBX Host Class Mass
).
3. Operational Overview
Initialization of USBX Resources
The USBX has its own memory manager. The memory needs to be allocated to the USBX before the host or
device side of the USBX is initialized. The USBX memory manager can accommodate systems where
memory can be cached.
Definition of USB Host Controllers
It is required to define at least one USB host controller for the USBX to operate in host mode. The application
initialization file should contain this definition.
R11AN0173EU0104 Rev.1.04 Page 2 of 15
Sep.30.19
Renesas Synergy™ Platform USBX™ Host Class Mass Storage Module Guide
Definition of Host Classes
It is required to define one or more host classes with the USBX. A USB class is required to drive a USB
device after the USB stack has configured the USB device. A USB class is very specific to the device. One
or more classes may be required to drive a USB device, depending on the number of interfaces contained in
the USB device descriptors.
USB Class Binding
When the device is configured, the topology manager will let the class manager continue the device
discovery by looking at the device-interface descriptors; a device can have one or more interface descriptors.
An interface represents a function in a device. A USB speaker has three interfaces; one for audio streaming,
one for audio control, and one to manage the various speaker buttons.
The class manager has two mechanisms to join the device interface(s) to one or more classes; it can either
use the combination of a PID/VID (product ID and vendor ID) found in the interface descriptor or the
combination of Class/Subclass/Protocol.
The PID/VID combination is valid for interfaces that cannot be driven by a generic class. The
Class/Subclass/Protocol combination is used by interfaces that belong to a USB-IF certified class such as a
printer, hub, storage, audio, or HID.
The class manager contains a list of registered classes from the initialization of the USBX. The class
manager will call each class one-at-a-time until one class agrees to manage the interface for that device;
each class can only manage one interface. (In the case of the USB audio speaker, the class manager will
call all the classes for each of the interfaces.)
Once a class accepts an interface, a new instance of that class is created. The class manager searches for
the default alternate setting for the interface. A device may have one or more alternate settings for each
interface; the alternate setting 0 will be the one used b y def ault unt il a class dec id es to change it.
For the default alternate setting, the class manager will mount all the endpoints contained in the alternate
setting. If the mounting of each endpoint is successful, the class manager will complete its job by returning to
the class that will finish the initialization of the interface.
3.1 Operational Notes and Limitations
3.1.1 Operational notes
• Use a class container for the USBX Host Class Mass Storage module obtained by auto-generated code
to get a mass storage instance.
• Pole the flag ux_host_class_storage_state in and make sure the status is live.
• Wait until the first media of the class container is attached.
• Access the file on the media with the FileX API.
3.1.2 Limitations
The module uses the interrupt of a USB controller; set the appropriate interrupt-priority level in the Synerg y
Configuration tool to ensure proper operation.
The module uses the interrupt of a transfer module (implemented as DMAC or DTC); set the appropriate
priority level in the Synergy Configuration tool. The level must be higher than a USB Controller to ensure
proper operation.
Refer to the most recent SSP Release Notes for any additional operational limitations for this module.
4. Including the USBX Host Class Mass Storage Module in an Application
This section describes how to include the USBX Host Class Mass Storage module in an application using the
SSP configurator.
Note: This section assumes you are familiar with creating a project, adding threads, adding a stack to a
thread, and configuring a block within the stack. If you are unfamiliar with any of these items, refer to
the first few chapters of the SSP User’s Manual to learn how to manage each of these important
To add the USBX Host Class Mass Storage module to an application, simply add it to a thread using the
stacks selection sequence given in the following table. (The default name for the USBX Host Class Mass
R11AN0173EU0104 Rev.1.04 Page 3 of 15
Sep.30.19
steps in creating SSP-based applications.
Renesas Synergy™ Platform USBX™ Host Class Mass Storage Module Guide
Resource
ISDE Tab
Stacks Selection Sequence
g_ux_host_class_storage0 USBX
Threads
New Stack > X-Ware > USBX > Host >
Class Mass Storage
Storage is g_ux_host_class_storage0. This name can be changed in the associated Properties
window.)
Table 1. USBX Host Class Mass Storage Selection Sequence
Host Class Mass Storage
When the USBX Host Class Mass Storage is added to the thread stack as shown in the following figure, the
configurator automatically adds any need ed lo wer -level drivers. Any drivers that need additional
configuration inform ation will be box text hig hl ight ed in red. Modu les with a gray band are individual modules
that stand alone. Modules with a blue band are shared or common and need only be added once and can be
used by multiple stacks. Modules with a pinkband can require the selection of lower-level drivers; these are
either optional or recommended. (This is indicated in the block with the inclusion of this text.) If the addition
of lower-level drivers is required, the module description will include Add in the text. Clicking on any pink
banded modules will bring up the New icon and then display the possible choices.
Classes > Mass Storage > USBX Host
Figure 2. USBX Host Class Mass Storage Module Stack
5. Configuring the Storage Module
The USBX Host Class Mass Storage module must be configured by you for the desired operation. The SSP
configuration window will a utomatically identify (by highlighting the block in red) any required configuration
selections, such as interrupts or operating modes, that must be configured for lower-level modules for
successful operation. Only those properties that can be changed without causing conflicts are available for
modification. Other properties are locked and are 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.
One of the properties most often identified as requiring a change is the interrupt priority; this configuration
setting is available within the Properties window of the associated module. Simply select the indicated
module and then view the Properties window; the interrupt settings are often toward the bottom of the
properties list, so scroll down until they become available. Note that the interrupt priorities listed in the
R11AN0173EU0104 Rev.1.04 Page 4 of 15
Sep.30.19
Renesas Synergy™ Platform USBX™ Host Class Mass Storage Module Guide
ISDE Property
Value
Description
Name
g_ux_host_class_storage0
Module name
ISDE Property
Value
Description
Name
g_ux_host0
Module name
ISDE Property
Value
Description
Full Speed Interrupt Priority
Priority 0 (highest), Priority 1:2,
Default: Disabled
Full speed interrupt priority
VBUSEN pin Signal Logic
Active Low, Active High
Default: Active High
VBUSEN pin signal logic
selection
Name
g_sf_el_ux_hcd_fs_0
Module name
USB Controller Selection
USBFS
USB controller selection
ISDE Property
Value
Description
High Speed Interrupt Priority
Priority 0 (highest), Priority 1:2,
not valid if using ThreadX, CM0+:
High speed interrupt priority
Properties window in the ISDE will include an indication as to the validity of the setting based on the targeted
MCU (CM4 or CM0+). This level of detail is not included in the following configuration properties tables but is
easily visible with the ISDE when configur i ng inter r upt prior ity levels.
Note: You may want to open your ISDE, create the module, and explore the property settings in parallel
with looking over the following configuration table settings. This will help orient you and can be a
useful hands-on approach to learning the ins and outs of developing with SSP.
Table 2. Configuration Settings for the USBX Host Class Mass Storage Module
Note: The example settings and defaults are for a project using the S7G2 Synergy Group. Other MCUs may
have different default values and available configuration settings.
In some cases, settings other than the defaults for a module can be desirable. For example, it might be
useful to select a different clock source than the default. The configurable properties for the lower-level stack
modules are given in the following sections for completeness and as a reference.
Note: Most of the property settings for lower-level modules are intuitive and usually can be determined by
inspection of the associated properties window from the SSP configurator.
5.1 Configuration Settings for Low-Level Modules
Typically, only a small number of settings must be modified from the default for lower-level modules 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 will be locked to prevent user modification. The
following table identifies all the settings within the properties section for the module.
Table 3. Configuration Settings for the USBX Host Configuration
Table 4. Configuration Settings for the USBX Port HCD on sf_el_ux for USBFS
Priority 3 (CM4: valid, CM0+:
lowest- not valid if using ThreadX),
Priority 4:14 (CM4: valid, CM0+:
invalid), Priority 15 (CM4 lowest not valid if using ThreadX, C M0 +:
invalid)
Note: The example settings and defaults are for a project using the S7 Synergy MCU Group. Other MCUs
may have different default values and available configuration settings.
Table 5. Configuration Settings for the USBX HCD on sf_el_ux for USBHS
selection
R11AN0173EU0104 Rev.1.04 Page 5 of 15
Sep.30.19
Priority 3 (CM4: valid, CM0+:
lowest- not valid if using ThreadX),
Priority 4:14 (CM4: valid, CM0+:
invalid), Priority 15 (CM4 lowest -
selection
Loading...
+ 11 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.