User Guide for Microsemi models including: DG0476DG0476 SmartFusion2 USB OTG Capabilities, DG0476, SmartFusion2 USB OTG Capabilities, USB OTG Capabilities

DG0476: SmartFusion2 - USB OTG Capabilities - Demo Guide

Download PDF

SmartFusion 2 FPGAs | Microchip Technology


File Info : application/pdf, 21 Pages, 7.28MB

PDF preview unavailable. Download the PDF instead.

microsemi smartfusion2 usb otg capabilities demoguide dg0476 v7
DG0476 Demo Guide SmartFusion2 - USB OTG Capabilities

Microsemi Headquarters One Enterprise, Aliso Viejo, CA 92656 USA Within the USA: +1 (800) 713-4113 Outside the USA: +1 (949) 380-6100 Sales: +1 (949) 380-6136 Fax: +1 (949) 215-4996 Email: sales.support@microsemi.com www.microsemi.com
©2021 Microsemi, a wholly owned subsidiary of Microchip Technology Inc. All rights reserved. Microsemi and the Microsemi logo are registered trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners.

Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or the suitability of its products and services for any particular purpose, nor does Microsemi assume any liability whatsoever arising out of the application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have been subject to limited testing and should not be used in conjunction with mission-critical equipment or applications. Any performance specifications are believed to be reliable but are not verified, and Buyer must conduct and complete all performance and other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not rely on any data and performance specifications or parameters provided by Microsemi. It is the Buyer's responsibility to independently determine suitability of any products and to test and verify the same. The information provided by Microsemi hereunder is provided "as is, where is" and with all faults, and the entire risk associated with such information is entirely with the Buyer. Microsemi does not grant, explicitly or implicitly, to any party any patent rights, licenses, or any other IP rights, whether with regard to such information itself or anything described by such information. Information provided in this document is proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this document or to any products and services at any time without notice.
About Microsemi
Microsemi, a wholly owned subsidiary of Microchip Technology Inc. (Nasdaq: MCHP), offers a comprehensive portfolio of semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world's standard for time; voice processing devices; RF solutions; discrete components; enterprise storage and communication solutions, security technologies and scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Learn more at www.microsemi.com.

50200476. 7.0 6/21

Contents

1 Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1

Revision 7.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2

Revision 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3

Revision 5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.4

Revision 4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.5

Revision 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.6

Revision 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.7

Revision 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.8

Revision 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.1

Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.2

Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.3

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3 USB OTG Capabilities of SmartFusion2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.2

Design Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.3

Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.4

Demo Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.4.2 Demo Design Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.4.3 Demo Design Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.5

Setting Up the Demo Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.5.1 Board Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.6

Running the Demo Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.6.1 SmartFusion2 USB OTG Controller Acting as USB Device . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.6.2 SmartFusion2 USB OTG Controller Acting as USB Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Appendix 1: Programming the Device Using FlashPro Express . . . . . . . . . . . . . . . 11

5 Appendix 2: Board Setup for USB OTG Controller in USB Device Mode . . . . . . . . 14

6 Appendix 3: Board Setup for USB OTG Controller in USB Host Mode . . . . . . . . . . 15

7 Appendix 4: Jumper Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Microsemi Proprietary DG0476 Revision 7.0

iii

Figures

Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15

Demo Design Files Top-Level Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Top-Level Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 USB OTG Execution Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 USB to UART Bridge Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 UART Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 SmartFusion2 USB Device Detection on Host PC/Laptop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Micro-A to B USB Cable with Mass Storage at the End B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 USB Host Mode Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 FlashPro Express Job Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 New Job Project from FlashPro Express Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Programming the Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 FlashPro Express--RUN PASSED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Setup for USB OTG Controller in USB Device Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Setup for USB OTG Controller in USB Host Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 SmartFusion2 Security Evaluation Kit Silkscreen Top View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Microsemi Proprietary DG0476 Revision 7.0

iv

Tables

Table 1 Table 2

Design Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 SmartFusion2 Security Evaluation Kit Jumper Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Microsemi Proprietary DG0476 Revision 7.0

v

Revision History

1 Revision History

1.1
1.2 1.3 1.4 1.5 1.6 1.7 1.8

The revision history describes the changes that were implemented in the document. The changes are listed by revision, starting with the most current publication.
Revision 7.0
The following is a summary of the changes made in this revision.
· Updated the document for Libero SoC v2021.1. · Removed the references to Libero version numbers.
Revision 6.0
Updated the document for Libero v11.7 software release (SAR 76712c).
Revision 5.0
Updated the document for Libero v11.6 software release (SAR 72555).
Revision 4.0
Updated the document for Libero v11.5 software release (SAR 64193).
Revision 3.0
Updated the document for Libero v11.4 software release (SAR 61626).
Revision 2.0
Updated the document for Libero v11.3 software release (SAR 58734).
Revision 1.0
Updated the document for Libero v11.2 software release (SAR 52961).
Revision 0.0
The first publication of this document.

Microsemi Proprietary DG0476 Revision 7.0

1

Preface

2 Preface

2.1 2.2 2.3

Purpose
This demo is for the SmartFusion®2 System-on-Chip (SoC) Field Programmable Gate Array (FPGA) devices. It explains the Universal Serial Bus (USB) 2.0 on-the-go (OTG) feature with the help of USB mass storage class.
Intended Audience
This demo guide is intended for:
· FPGA designers · Embedded designers · System-level designers
References
The following documents are referred in this demo guide.
· UG0331: SmartFusion2 Microcontroller Subsystem User Guide · Configuring Serial Terminal Emulation Programs Tutorial · TU0546: SoftConsole v4.0 and Libero SoC v11.7 Tutorial Refer to the following web page for a complete and up-to-date listing of SmartFusion2 device documentation: www.microsemi.com/products/fpga-soc/soc-fpga/sf2docs#documents.

Microsemi Proprietary DG0476 Revision 7.0

2

USB OTG Capabilities of SmartFusion2

3 USB OTG Capabilities of SmartFusion2

3.1 3.2

Introduction
Microsemi offers a reference design for the SmartFusion2 SoC FPGA devices that demonstrates the USB controller OTG feature and implements the USB mass storage class. The reference design runs on the SmartFusion2 Security Evaluation Kit. The SmartFusion2 SoC FPGA device contains a USB OTG controller as part of the Microcontroller Subsystem (MSS). This demo guide describes the mechanism for the USB communication between the SmartFusion2 device and the external USB host/USB device/USB OTG protocol compliant devices provided by the SmartFusion2 USB OTG controller.
OTG is the USB 2.0 mode of operation, where the USB 2.0 OTG controller works as either the USB host or the USB device based on the target device and type of the plug connected to the USB OTG controller. For more information about the USB OTG controller and its operations, refer to UG0331: SmartFusion2 Microcontroller Subsystem User Guide..
Design Requirements
Table 1 lists the hardware and software design requirements for running this demo design.

Table 1 · Design Requirements

Requirement
Operating System
Hardware
SmartFusion2 Security Evaluation Kit: · FlashPro4 programmer · 12 V adapter · USB A to Mini-B cable (for serial communication) · Micro-A to B receptacle USB cable (to connect to the USB drive) · Micro-B to A USB cable (to connect the SmartFusion2 Security
Evaluation Kit board with the host PC)
Host PC or Laptop
Software
FlashPro Express Libero® System-on-Chip (SoC)
SoftConsole

Version 64 bit Windows 7 and 10 Rev D or later
Note: Refer to the readme.txt file provided in the design files for the software versions used with this reference design.

USB to UART drivers

­

Note: Libero SmartDesign and configuration screen shots shown in this guide are for illustration purpose only. Open the Libero design to see the latest updates.

Microsemi Proprietary DG0476 Revision 7.0

3

USB OTG Capabilities of SmartFusion2

3.3 3.4

Prerequisites
Before you begin:
Download and install Libero SoC (as indicated in the website for this design) on the host PC from the following location.
https://www.microsemi.com/product-directory/design-resources/1750-libero-soc
Demo Design

3.4.1
Figure 1 ·

Introduction
The demo design files are available for download from the following path in the Microsemi website: http://soc.microsemi.com/download/rsc/?f=m2s_dg0476_df
The demo design files include:
· Libero_Project · USB drivers · Programming_Job · Readme file Figure 1 shows the top-level structure of the design files. For more details, refer to the readme.txt file.
Demo Design Files Top-Level Structure

<download_folder>

m2s_dg0476_df Libero_Project usb drivers Programming_Job readme.txt

Microsemi Proprietary DG0476 Revision 7.0

4

USB OTG Capabilities of SmartFusion2

Figure 2 shows the demo architecture. Figure 2 · Top-Level Block Diagram

USB Flash Drive

Micro-A to B
Receptacle USB cable

ULPI Phy with Micro AB receptacle

MSS

Cortex-M3

Cache Controller

USB OTG Controller

Micro-B to A USB cable

Host PC
USB Port
Disk Drive HyperTerminal

Serial Communication
GPIO eNVM_1 eNVM_0

AHB Bus Matrix

APB_1

APB_0

SPI_0 MMUART_0

On-board SPI-Flash

On-board SPI-Flash as storage medium at host PC in USB device mode operation
Note: MSS USB drivers are provided along with the design files. These drivers are customized and used in the demo.
3.4.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 a storage medium in the 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.
3.4.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 a 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.

Microsemi Proprietary DG0476 Revision 7.0

5

USB OTG Capabilities of SmartFusion2

3.4.3.1
Figure 3 ·

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. For more information about the FatFs file system, refer to http://elm-chan.org/fsw/ff/00index_e.html.
USB OTG Mode Execution Flow
Figure 3 describes the USB OTG mode execution flow.
USB OTG Execution Flow

Start SmartFusion2 Device Application

Initialization and configuration 1. Disable the Watchdog Timer 2. Configure the GPIO for keeping the PHY out of reset, MMUART_0 for serial communication and SPI_0 to access SPI-Flash 3. Register the callback functions and ISRs 4. Initialize Device and Host mode drivers. 5. Clear and enable the interrupts

Start

Wait for connection interrupt

ISR to handle the USB interrupts in OTG mode 1. Connect/Disconnect Interrupt 2. End Point 0 interrupt

3. TX End point interrupt

4. RX End point interrupt

5. Host specific interrupts if in Host mode

Yes

No

Is Connected

6. Device specific interrupts if in Device mode

Device Type A?

No

Host Mode

Device Mode

Is Mass Storage Device supported?

Set the USB controller in Mass Storage class Device mode and wait for the Host
PC to detect

Stop

Yes
Set the USB controller in Mass Storage class Host mode.
Enumerate the Mass storage device and list the file names.

No Is device detected by Host PC?
Yes

Stop

Device responds to commands from the Host PC

Stop
The demo application configures MMUART_1 for serial communication, SPI_0 to access SPI-Flash, and GPIO to keep the USB controller out of reset. The application registers the USB callback functions and USB interrupt service routine to handle the USB events like connect/disconnect, Host mode specific events, and Device mode specific events.
When the SmartFusion2 device is connected to the host PC with Micro-B to A USB cable, the USB connect interrupt is generated and the Host mode flag is set to 0. The USB controller enters into mass storage class device mode and starts responding to the commands from the host PC. The SmartFusion2 on-board SPI-Flash is accessed by the host PC as a disk drive/volume in the USB Device mode.
When the Micro-A to B receptacle USB cable with the USB mass storage device is connected to the SmartFusion2 device, the connect interrupt is generated and the Host mode flag is set to 1. The USB controller switches to the Host mode from the Device mode and accesses the USB mass storage device.

Microsemi Proprietary DG0476 Revision 7.0

6

USB OTG Capabilities of SmartFusion2

3.5
Figure 4 ·

When the USB mass storage device is unplugged from the SmartFusion2 device, the Host mode flag is set to 0 and the disconnect interrupt is generated. The application releases the Host mode driver and waits to enter into either the Device mode or Host mode based on the target device and type of plug connected to the USB controller.
Setting Up the Demo Design
The following steps describe how to setup the demo design:
1. Connect the FlashPro4 programmer to the J5 connector of the SmartFusion2 Security Evaluation Kit board.
2. Connect the host PC to the J18 connector on the SmartFusion2 Security Evaluation Kit board using the USB A to Mini-B cable.
3. Ensure that the USB to UART bridge drivers are automatically detected. Download and install the drivers from www.microsemi.com/soc/documents/CDM_2.08.24_WHQL_Certified.zip.
4. Of the four COM ports, select the one with Location as on USD Serial Converter D. Figure 4 shows an example of the Device Manager window that has the USB Serial Port and its properties showing the port number and location. The COM port number is required to run the demo design, make a note of it.
USB to UART Bridge Drivers

5. Connect the jumpers on the SmartFusion2 Security Evaluation Kit board, as shown in Table 2. For more information about jumper locations, refer to Appendix 4: Jumper Locations, page 16.

Microsemi Proprietary DG0476 Revision 7.0

7

USB OTG Capabilities of SmartFusion2

CAUTION: Switch OFF the power supply switch, SW7, before connecting the jumpers. Table 2 · SmartFusion2 Security Evaluation Kit Jumper Settings

Jumper Number Pin (From) J22, J23, J8, J3 1

J24

1

J24

1

Pin (To) 2
2 (closed) 2 (open)

Comments
These are the default jumper settings of the SmartFusion2 Security Evaluation Kit board. Ensure that these jumpers are set properly.
USB Host mode jumper settings
USB Device mode jumper settings

3.5.1
3.6
Figure 5 ·

6. Connect the power supply to the J6 DC jack.
Board Setup
Snapshots of the SmartFusion2 Security Evaluation Kit board with the complete setup for both types of connections are given in the following sections:
· Appendix 2: Board Setup for USB OTG Controller in USB Device Mode, page 14 · Appendix 3: Board Setup for USB OTG Controller in USB Host Mode, page 15
Running the Demo Design
The following steps describe how to run the demo design:
1. Download the demo design from: http://soc.microsemi.com/download/rsc/?f=m2s_dg0476_df
2. Switch ON the power supply switch, SW7. 3. Start any serial terminal emulation program such as:
· HyperTerminal · PuTTY · TeraTerm
The configuration for the program is:
· Baud Rate: 115200 · 8 Data bits · 1 Stop bit · No Parity · No Flow Control For more information about configuring the serial terminal emulation programs, refer to Configuring Serial Terminal Emulation Programs Tutorial.
4. Program the SmartFusion2 Security Evaluation Kit board with the job file provided as part of the design files using FlashPro Express software, refer to Appendix 1: Programming the Device Using FlashPro Express, page 11.
5. After successfully programming the SmartFusion2 device using FlashPro Express, the serial terminal emulation program shows the initialization messages, as shown in Figure 5. The SmartFusion2 USB OTG controller is now set to perform the USB OTG functionality.
UART Message

Microsemi Proprietary DG0476 Revision 7.0

8

USB OTG Capabilities of SmartFusion2
3.6.1 SmartFusion2 USB OTG Controller Acting as USB Device
The following steps describe how to use the SmartFusion2 USB OTG Controller as a USB device: 1. Connect the host PC to the micro AB receptacle (P1 connector) on the SmartFusion2 Security
Evaluation Kit board using the Micro-B to A USB cable. A new disk drive/volume is created in the host PC. 2. Right-click the drive and select properties, as shown in Figure 6 to verify the USB device functionality of the SmartFusion2 USB OTG controller. Note: Format the disk drive when prompted by the host PC and ensure that there is no important data on the SmartFusion2 Security Evaluation Kit on-board SPI-Flash. Figure 6 · SmartFusion2 USB Device Detection on Host PC/Laptop

Microsemi Proprietary DG0476 Revision 7.0

9

USB OTG Capabilities of SmartFusion2

3.6.2
Figure 7 ·

SmartFusion2 USB OTG Controller Acting as USB Host
The following steps describe how to use the SmartFusion2 USB OTG Controller as a USB host:
1. Unplug the Micro-B to A USB cable from the P1 connector of the SmartFusion2 Security Evaluation Kit board.
2. Insert the Micro-A to B USB cable with a USB mass storage device at the B type end of the cable, as shown in Figure 7. Ensure that the mass storage device is preformatted.
3. Connect the Micro-A end of the Micro-A to B USB cable to the P1 connector of the SmartFusion2 Security Evaluation Kit board.
The SmartFusion2 USB OTG controller switches to the USB Host mode and detects the connected USB mass storage device to perform transactions as the USB host. The application enumerates the USB mass storage device and reads all file names on the USB drive to display the list on the serial terminal emulation program, as shown in Figure 8.
Micro-A to B USB Cable with Mass Storage at the End B

Figure 8 · USB Host Mode Results

To verify the USB OTG functionality again repeat the process of the SmartFusion2 USB OTG controller acting as a USB device and USB host.

Microsemi Proprietary DG0476 Revision 7.0

10

Appendix 1: Programming the Device Using FlashPro Express

4 Appendix 1: Programming the Device Using FlashPro Express

This section describes how to program the SmartFusion2 device with the programming job file using FlashPro Express.

To program the device, perform the following steps:

1. Ensure that the jumper settings on the board are the same as those listed in Table 2, page 8. Note: The power supply switch must be switched off while making the jumper connections.

Figure 9 ·

2. Connect the power supply cable to the J6 connector on the board. 3. Power ON the power supply switch SW7. 4. On the host PC, launch the FlashPro Express software. 5. Click New or select New Job Project from FlashPro Express Job from Project menu to create a
new job project, as shown in Figure 9.
FlashPro Express Job Project

6. Enter the following in the New Job Project from FlashPro Express Job dialog box: · Programming job file: Click Browse, and navigate to the location where the .job file is located and
select the file. The default location is: <download_folder>\m2s_dg0476_df\Programming_Job
· FlashPro Express job project name: Click Browse and navigate to the location where you want to save the project.

Microsemi Proprietary DG0476 Revision 7.0

11

Appendix 1: Programming the Device Using FlashPro Express Figure 10 · New Job Project from FlashPro Express Job
7. Click OK. The required programming file is selected and ready to be programmed in the device. 8. The FlashPro Express window appears as shown in Figure 11. Confirm that a programmer number
appears in the Programmer field. If it does not, confirm the board connections and click Refresh/Rescan Programmers. Figure 11 · Programming the Device
9. Click RUN. When the device is programmed successfully, a RUN PASSED status is displayed as shown in Figure 12.

Microsemi Proprietary DG0476 Revision 7.0

12

Appendix 1: Programming the Device Using FlashPro Express Figure 12 · FlashPro Express--RUN PASSED
10. Close FlashPro Express or in the Project tab, click Exit.

Microsemi Proprietary DG0476 Revision 7.0

13

Appendix 2: Board Setup for USB OTG Controller in USB Device Mode
5 Appendix 2: Board Setup for USB OTG Controller in USB Device Mode
Figure 13 shows the board setup for USB OTG Controller in USB Device Mode. Figure 13 · Setup for USB OTG Controller in USB Device Mode

Microsemi Proprietary DG0476 Revision 7.0

14

Appendix 3: Board Setup for USB OTG Controller in USB Host Mode
6 Appendix 3: Board Setup for USB OTG Controller in USB Host Mode
Figure 14 shows the board setup for USB OTG Controller in USB Host Mode. Figure 14 · Setup for USB OTG Controller in USB Host Mode

Microsemi Proprietary DG0476 Revision 7.0

15

Appendix 4: Jumper Locations

7 Appendix 4: Jumper Locations

Figure 15 shows the jumper locations in the SmartFusion2 Security Evaluation Kit board. Figure 15 · SmartFusion2 Security Evaluation Kit Silkscreen Top View

D8 TC3 L2
GND

12V 3.3V 5V U13
J3

1

C10 C7

G

SF2-GPIO J1

3

12V I/P 2

U4
J6 1 D9

RMT
SWT 1 23

TC2 TC1 60 G U2

TC5

TC4

TP2 U6

U8 L1
TP4

H5

H6

J6

H7

G7

F3

F4

G 50

G

G 40 20

G

30 15

G

G

20 10

G

G 10 5

G

D7 D6 D5 D4 D3 D2 C7 C6 C5 C4 C3 C2 B7 B6 B5 A7 A6 A5 A4

TP3 U7

2

10

FTDI-GPIO J2
J4 2

E1

RVI/IAR

SW7

4

3

ETH PHY-SGMII

ON 20

TC7 TC8

J13

U10

1

L3

J7 LED2

1

L3

U9

J11 100MBPS LINK

J12

LPDDR

U1
A1 1
DPR1 A

A TC9 TC10 TC6
1GMBPS LINK A1

J5

1

9

1

1 2

L19 L

PROG Header

RMT JTAG_SEL

B1 DEVRST

A1

2

J9

Trace DBG

K21 L18

3

SW6

4

H

K20

J8

B

SW5 M2GL_M2S-EVAL-KIT

DVP-102-000402-001

A 1
U5 1H1

4

2 Rev C 4

2

TP1 20
19 20 J10
19 4

TXD2N J15 TXD2P

I2C0_SDA I2C1_SDA

K16 I2C1_SCL

1 J18

SW2

SW4

J20 RXD2N J16 RXD2P

U12 CR1 X1
1

17

J14

Y2

Y1

U14

J18

U11

SERDES_REFCLK1P

3

1

I2C0_SCL

3

1 13

TP5

16 L2

1

CR2

5

Y3

L5 U16

U15 SPI

FTDI

TP6

J17

U18

SERDES_REFCLK1N

P1 CR4
TP8 SW1

1 Active

1 CR3
5 J24

U19 U20 1

TP9 4

2 J21

CLK_EN

1

J23 OSC

HZ

L6

SERDES_REFCLK1

SMA

U22

J22 J25 J26

U25

USB

3

1

L20

C103

U26

CON1 L0

B1

B11 B12 B18

Y4

Y5

XTAL

TP10

J27

C79
U21 1 A

U23

U24 J28

L7 TP16
TP17 TC18 TC19
SW3

A1
1P2V_CUR_SENSE 1P2V TP7
1 TP14

TP18 TP19 1P8V_CUR_SENSE 1P8V

TP11

GND

GND

4

2

TP15

3

1

Note:
· · ·

Jumpers highlighted in red (J22, J23, J8, J3) are set as default. Jumpers highlighted in green (J24) need to be set manually. The locations of the jumpers in Figure 15 are searchable.

Microsemi Proprietary DG0476 Revision 7.0

16



References