Demo Design Features; Demo Design Description - Microsemi SmartFusion2 Demo Manual

Usb otg capabilities - libero soc v11.7
Hide thumbs Also See for SmartFusion2:
Table of Contents

Advertisement

USB OTG Capabilities of SmartFusion2
2.3.2

Demo Design Features

The main objective of the demo is to show OTG capability with USB mass storage class. The demo
design performs the following operations:
Switching the USB OTG controller operation between Host mode and Device mode based on the
target device and type of plug connected to the USB OTG controller.
Device mode operation:
Displaying the on-board SPI flash (8 MB) as storage medium in host PC.
Host mode operation:
Detecting the USB 2.0 complaint USB mass storage device connected to the USB OTG
controller and listing the file names.
2.3.3

Demo Design Description

The USB OTG controller in the SmartFusion2 device can be configured to operate in the USB device
mode/USB host mode/USB OTG mode. In USB OTG mode, the USB OTG controller acts as either USB
device or USB host based on the target device and type of plug connected to the USB OTG controller.
If the Micro-A end of the cable is plugged into the SmartFusion2 device through the external PHY, the
USB controller takes the role of the host and goes into the Host mode. The Host mode flag is set to 1.
If the Micro-B end of the cable is plugged in, the USB controller goes into the Peripheral mode and the
Host mode flag is set to 0.
The demo design application initializes the USB Host mode stack and USB Device mode stack to
operate in the USB OTG mode. When the USB OTG controller enters into the Device mode, the
application initializes the USB mass storage class and registers with the MSS USB Device mode driver.
The on-board SPI flash memory (8 MB) is used as a storage medium in the USB Device mode operation
and read/write operations can be performed.
When the USB OTG controller enters into the Host mode, the application registers the USB mass
storage class with the MSS USB Host mode driver. The application detects the connected mass storage
device and lists the files names. The application uses the FatFs file system library to access the files from
the target USB mass storage device. Refer to the following link for more information on FatFs file system:
http://elm-chan.org/fsw/ff/00index_e.html.
Revision 6
8

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SmartFusion2 and is the answer not in the manual?

Table of Contents