ug u2edb 1.0 - intel · v corecommander user guide system level solutions may 2012 1. 2. numbered...

44
System Level Solutions, Inc. (USA) 14100 Murphy Avenue San Martin, CA 95046 (408) 852 - 0067 http://www.slscorp.com Board Version: r2a Document Version: 2.0 Document Date: May 2012 CoreCommander User Guide

Upload: others

Post on 12-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

System Level Solutions, Inc. (USA) 14100 Murphy AvenueSan Martin, CA 95046 (408) 852 - 0067

http://www.slscorp.com

Board Version: r2a

Document Version: 2.0 Document Date: May 2012

CoreCommander User Guide

Page 2: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Copyright©2012, System Level Solutions.All rights reserved. SLS, An Embedded systems company, the stylized SLS logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of SLS in India and other countries. All other products or service names are the property of their respective holders. SLS products are protected under numerous U.S. and foreign patents and pending applications, mask working rights, and copyrights. SLS warrants performance of its semiconductor products to current specifications in accordance with SLS is standard warranty, but reserves the right to make changes to any products and services at any time without notice. SLS assumes no responsibility or liability arising out of the application or use of any information, products, or service described herein except as expressly agreed to in writing by SLS. SLS customers are advised to obtain the latest version of specifications before relying on any published information and before orders for products or services.

ug_corecommander_2.0

ii

CoreCommander User GuideSystem Level Solutions

May 2012

Page 3: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

About this Guide

Introduction This document familiarizes you with the contents of the CoreCommander, the

Embedded Development board that allows seamless integration of IP Cores,

and guides you through the CoreCommander setup, downloading and running

the example applications.

Table below shows the revision history of the getting started user guide.

Version Date Description

2.0 May 2012 • Updated board version r1b to r2a

• Removed Application Selector of chapter 5

• Updated figure 3.1 and 3.5

• Updated all figures in chapter 4

1.8.1 June 2011 • Grammatically changed

1.8 October 2010 • Changed text from CCD cable to USB BitJetLite in all chapters.

1.7 December 2009 • Modified Figure 3.1. Installed Directory structure and Table 3.1

• Added text for Installing the PinMapper Software

1.6 August 2009 • Changed the path of image folder and removed capitalized from folder names.

• Added Chapter 5: Application Selector

• Modified Chapter Design Examples. Modified all examples using Application selector.

• Added an Appendix: Restoring the factory design to the Flash device.

1.5 May 2009 • Added Appendix B: Powering USB Embedded Host from the USB Device Power.

1.4 April 2009 • Updated SDHC and USB20HR IP Core version.

iii

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 4: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

How to Contact SLS

How to Contact SLS

For the most up-to-date information regarding about SLS products, go to the

SLS worldwide website at http://www.slscorp.com. For additional

information on about SLS products, consult the source shown below.

Typographic Conventions

The document uses the typographic conventions shown as below.

1.3 March 2009 • Added text to power up the board with External/Battery supply in chapter 2: power up the board section.

• Modified Figure 3.1, Figure 4.4, Figure 4.5

• Added Figure 4.7 and Figure 4.8

• Modified Table 3.1

• Added Installing CoreCommander Driver (CCD) cable text in place of Installing USB Blaster Driver text.

• Replaced USB Blaster with CCD Cable

1.2 February 2009 Modified Chapter 5. Design Examples.

1.1 December 2008 Updated document for the CoreCommander board, r1b.

1.0 July 2008 First release

Version Date Description

Information Type E-mail

Product literature services, SLS literature services, Non-technical customer services, Technical support.

[email protected]

Visual Cue Meaning

Bold Type with Initial Capital Letters All Headings and Sub Headings Titles in a document are displayed in bold type with initial capital letters; Example: Introduction, Kit Contents

Bold Type with Italic Letters All Definitions, Figure and Table Headings are displayed in Italics. Examples: Figure 2-1. CoreCommander Kit Contents

iv System Level SolutionsMay 2012CoreCommander User Guide

Page 5: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such as steps listed in procedure.

• Bullets are used in a list of items when the sequence of items is not important.

The hand points to information that requires special attention.

The caution sign indicates required information that needs special consideration and understanding and should be read prior to start-ing or continuing with the procedure or process.

The warning sign indicates information that should be read prior to starting or continuing the procedure or processes.

The feet direct you to more information on a particular topic.

Visual Cue Meaning

v

CoreCommander User Guide

System Level SolutionsMay 2012

Page 6: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Contents

About this Guide............................................................................................................................. iiiIntroduction..............................................................................................................................................iii

How to Contact SLS ................................................................................................................................ iv

Typographic Conventions ........................................................................................................................ iv

1. About CoreCommander .............................................................................................................. 1Introduction............................................................................................................................................... 1

Kit Contents .............................................................................................................................................. 1

2. Getting Started............................................................................................................................. 3Introduction............................................................................................................................................... 3

Before You Begin...................................................................................................................................... 3

Check the CoreCommander Kit Contents ......................................................................................... 3

Inspect the CoreCommander ............................................................................................................. 4

Hardware and Software Requirements .............................................................................................. 4

Further Reference...................................................................................................................................... 5

3. Software Installation.................................................................................................................... 6Installing the CoreCommander CD-ROM ................................................................................................ 6

Installing Mass Storage Driver.................................................................................................................. 8

Installing SLS USB BitJetLite Driver..................................................................................................... 10

Installing USB BitJetLite Driver on Windows PC .......................................................................... 10

Setting Up USB BitJetLite Hardware in the Quartus II Software ................................................... 11

4. CoreCommander Hardware Setup ........................................................................................... 13Introduction............................................................................................................................................. 13

Requirements .......................................................................................................................................... 13

Board Setup............................................................................................................................................. 13

Power Up the Board ................................................................................................................................ 17

Using External Power Supply.......................................................................................................... 17

Using USB Cable............................................................................................................................. 18

viSystem Level Solutions

Page 7: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Using Battery ................................................................................................................................... 18

Configuring the FPGA ............................................................................................................................ 19

5. Design Examples ....................................................................................................................... 21About Design Examples.......................................................................................................................... 21

JPEG/MPEG Viewer............................................................................................................................... 21

USB 2.0 Host Mass Storage Application................................................................................................ 25

USB 2.0 Device Mass Storage Application using SD RAM .................................................................. 31

USB 2.0 Device Mass Storage Application using SD Card.................................................................... 32

Further Reference.................................................................................................................................... 34

Appendix A: Configuring PROM (M25P16) ....................................................................35Introduction............................................................................................................................................. 35

Creating .JIC File .................................................................................................................................... 35

Configuring PROM (M25P16) ............................................................................................................... 36

Appendix B: Restoring the Factory Design to the Flash Device ......................................37

vii

CoreCommander User Guide

System Level SolutionsMay 2012

Page 8: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

1. About CoreCommander

Introduction The CoreCommander is an Embedded Development board allowing seamless

IP Core integration and more. This board is packaged with the Cyclone III

Embedded Development board and User Interface Board.

Kit Contents The CoreCommander kit contains:

A Cyclone III Embedded Development board – provides a ready to use embedded development platform with SLS IP cores, drivers and application software ensuring quick and easy implementation with reduced risk and low cost. Key features of the board includes Altera Cyclone III device implementation, small form-factor, on-board ULPI PHY for both USB configurations (Host and OTG), more than 36 general purpose pins to have expandable development on board, enhanced user interface through User Interface board.

• For detailed information about the components and interfaces included on the Cyclone III Embedded Development board, and about their locations on the board, refer to the Cyclone III Embedded Development Board Components section of Corecommander board Reference Manual.

A User Interface board – Provides 1.7” TFT LCD and Navigation Keypad which enhances user interface.

• For detailed information about the components and interfaces included on the User Interface board, and about their locations on the board, refer to the User Interface Board Components section of CoreCommander Reference Manual.

CoreCommander CD ROM - This CD ROM includes several designs for exercising the Embedded Development. In addition the following documentation is included:

• CoreCommander Reference manual• CoreCommander User Guide• USB 2.0 Device Mass Storage using SD Card, USB 2.0 Device

Mass Storage using SDRAM, USB 2.0 Host Mass Storage and JPEG /MPEG Viewer Demonstration Examples

• USB 2.0 Device, SD Host Controller, USB 2.0 Host Controller and ONFI Controller IP Core

1

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 9: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Kit Contents

• Standard Reference Design

• Schematic of Cyclone III Embedded Development board and User Interface board

2 System Level SolutionsMay 2012CoreCommander User Guide

Page 10: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

2. Getting Started

Introduction This user guide familiarizes you with the contents of the CoreCommander

and guides you through the CoreCommander setup. Using this guide, you can

do the following:

Inspect the contents of the CoreCommander

Overview of the design resources available with the product

Set up, power up and verify correct operation of the CoreCommander hardware

Downloading and running the example applications

For complete details on the CoreCommander, refer CoreCommander Reference Manual.

Before You Begin

Before using the CoreCommander or installing the software, check the

CoreCommander contents and inspect the board to verify that you received

all of the items listed in this section. If any of the items are missing, contact

SLS before you proceed.

Check the CoreCommander Kit Contents

CoreCommander contains the following items:

CoreCommander board

5V, 2A Power Supply Adapter

Two USB Mini AB Type Cable

SLS USB BitJetLite Download Cable

2 GB SD Card

CD ROM

3

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 11: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Before You Begin

Figure 2-1. CoreCommander Kit Contents

Inspect the CoreCommander

Place the board on an anti-static surface and inspect it to ensure that it has

not been damaged during shipment.

Without proper anti-static handling, the CoreCommander can be damaged.

Verify that all components are on the board and appear intact.

Hardware and Software Requirements

Following is the hardware and software requirements required to use the

CoreCommander board.

1. Windows XP, Vista or 7 Operating System

2. SLS USB BitJetLite Download Cable

3. Altera Tool Suite v11.1 or above

4. CoreCommander Board Accessories

For the Altera tools system requirement, refer the Altera website at http://www.altera.com/products/software/products/quartus2web/sof-

quarwebmain.html for details.

4 System Level SolutionsMay 2012CoreCommander User Guide

Page 12: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Getting Started

Further Reference

For more information on CoreCommander, refer CoreCommander Reference Manual.

5

CoreCommander User Guide

System Level SolutionsMay 2012

Page 13: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

3. Software Installation

The instructions in this section explain how to install the CoreCommander

CD ROM.

Before starting the installation, verify that you have complied with the

conditions described in “Hardware and Software Requirements” on page 4.

Installing the CoreCommander CD-ROM

The CoreCommander CD-ROM contains the following items:

Reference Designs

Demonstrations

CoreCommander Reference Manual CoreCommander User Guide (this document)

Encrypted IPs

Schematics

To install the CoreCommander CD-ROM, perform the following steps:

1. Insert the CoreCommander CD-ROM into the CD-ROM drive.

The CD-ROM should start an auto-install process. If it does not,

browse to the CD-ROM drive and double-click on the CoreCommander_ <Board Version>_<Setup Version>.exe where Board Version variable is the CoreCommander board version number and Setup Version variable is the CoreCommander package setup version number.

2. Follow the online instructions to complete the installation process.

The installation program copies the CoreCommander files to the computer

hard disk. When the installation is complete, the CoreCommander installation

program creates the directory structure shown in Figure 3-1.

IP licenses required to recomplile the reference design:

• SD Host Controller, v2.7

• USB 2.0 Device with Avalon Interface - ULPI support (USB20SR), v1.2

• ONFI Controller IP Core v1.2

• USB 2.0 Embedded Host Controller IP Core v1.7

6

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 14: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Software Installation

For more information on how to obtain evaluation or shipping licenses for the

above refer to http://www.slscorp.com/licensing/ip-licensing.html.

Figure 3-1. Installed Directory Structure

Table 3-1 lists the file directory names and a description of their contents. The

default Windows installation directory is c:\sls\kits\corecommander.

Table 3-1. Installed Directory Contents

Directory Name Description of Contents

board_design_files Contains Cyclone III Embedded Development board and User Interface board’s schematics.

demos Contains demonstrations which includes USB 2.0 Host Mass Storage, JPEG/MPEG Viewer, USB 2.0 Device Mass Storage using SD Card, and USB 2.0 Device Mass Storage using SDRAM.

7

CoreCommander User Guide

System Level SolutionsMay 2012

Page 15: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Installing Mass Storage Driver

Installing Mass Storage Driver

If the Mass Storage driver is not installed on your PC having Windows XP OS

then follow the steps described below to install the driver:

1. If the Mass Storage driver is not installed on your system then ‘Found New Hardware Wizard’ window will appear. See Figure 3-2.

documents Contains CoreCommander Reference Manual, User Guide, Data sheets and readme help files.

factory_contents Contains factory contents.

factory_recovery Contains factory design recovery files.

sdcard_contents Contains files and folders stored in the SD Card.

sdcard_format Contains batch file to format the SD Card.

ip_cores Contains USB 2.0 Device (USB20SR) v1.2, SD Host Controller v2.7, ONFI Controller v1.2, USB20 Host Controller v1.7, IPs and LCD Interface v1.0.

hw_ref_design Contains CoreCommnader reference design. (.qar-archive project).

resources Contains additional set up/files for CoreCommander use.

c_source Contains the c_source of NAND Flash.

driver Contains SLS USB BitJetLite Download Cable setup.

Table 3-1. Installed Directory Contents

Directory Name Description of Contents

8 System Level SolutionsMay 2012CoreCommander User Guide

Page 16: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Software Installation

Figure 3-2. Found New Hardware Wizard - Page 1

2. Select ‘No, not this time’ option and click ‘Next’.

Figure 3-3. Found New Hardware Wizard - Page 2

3. Select ‘Install the software automatically (Recommended)’ option and click Next.

9

CoreCommander User Guide

System Level SolutionsMay 2012

Page 17: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Installing SLS USB BitJetLite Driver

Figure 3-4. Found New Hardware Wizard - Page 3

4. On the Hardware Installation window click ‘Continue Anyway’ button.

5. Windows will install driver for Mass Storage Device, click Finish to complete hardware installation.

Installing SLS USB BitJetLite Driver

The CoreCommander comes with the SLS USB BitJetLite Download Cable

for FPGA programming. However, for the host computer and development

board to communicate, you must install the USB BitJetLite Download Cable

driver on the host computer.

This section describes installing the SLS USB BitJetLite driver and setting up

the USB BitJetLite hardware in the Quartus II software.

Installing USB BitJetLite Driver on Windows PC

This section describes how to install the SLS USB BitJetLite driver on Windows 2000, Windows XP/7 32/64-Bit systems. The driver is located at: <CoreCommander Installation Path>\resources\driver\usb_bitjet_lite.

To install the driver, follow the directions below:

1. Double-click on setup.exe located at <CoreCommander Installation Path>\resources\driver\usb_bitjet_lite.

10 System Level SolutionsMay 2012CoreCommander User Guide

Page 18: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Software Installation

2. Follow the on-screen instruction to install the USB BitJetLite related files into your PC.

3. After completing installation, plug in the USB BitJetLite to the PC.

4. Found New Hardware Wizard appears.

5. On the Found New Hardware Wizard window, click No, not this time and then click Next to continue.

6. Select Install from a list of specific location (Advanced) and click Next to continue.

7. Select Don’t search. I will choose the driver to install. Click Next.

8. Select Universal Serial Bus Controllers, and click Next to continue.

9. Select Have Disk and browse to the location of the driver on your system: <SLS USB BitJetLite Download Cable Installation Path> \Drivers.

10. Select slsusb.inf and click OK.

11. Select SLS USB BitJetLite and click Next to continue.

12. Click Next to install the driver.

13. Click Continue Anyway when the Hardware Installation warning appears.

14. Click OK.

15. Click Finish to exit the new hardware installation wizard.

16. Reboot your system.

Setting Up USB BitJetLite Hardware in the Quartus II Software

Use the following steps to set up the USB BitJetLite hardware in the Quartus II software:

1. Start the Quartus II software.

2. Choose Programmer (Tools menu).

3. Click Hardware Setup. The Hardware Settings tab of the Hardware Setup dialog box is displayed. See Figure 3-5.

4. From the drop-down menu, select USB-BitJetLite.

11

CoreCommander User Guide

System Level SolutionsMay 2012

Page 19: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Installing SLS USB BitJetLite Driver

Figure 3-5. Hardware Setup Dialog

5. Click Close to close the Hardware Setup dialog box.

12 System Level SolutionsMay 2012CoreCommander User Guide

Page 20: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

4. CoreCommander Hardware Setup

Introduction The instructions in this section explain how to connect the User Interface

Board to the Cyclone III Embedded Development board and configure the

FPGA.

Requirements Before starting the installation, verify that you have complied with the

conditions described in “Hardware and Software Requirements” on page 4

and have completed the following requirements:

Quartus II software installed on the host computer

SLS USB BitJetLite driver software installed on the host computer

The Cyclone III Embedded Development board comes with SLS USB BitJetLite Download Cable for FPGA programming. Host computer and development board can not communicate without the SLS USB BitJetLite driver software installed. For installation information, refer to

“Installing SLS USB BitJetLite Driver” on page 10.

Board Setup Figure 4-1. shows the Cyclone III Embedded Development board and its components.

13

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 21: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Board Setup

Figure 4-1. Cyclone III Embedded Development Board Layout and Components

Figure 4-2. shows the User Interface Board and its components.

Figure 4-2. User Interface Board Layout and Components

14 System Level SolutionsMay 2012CoreCommander User Guide

Page 22: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

CoreCommander Hardware Setup

Figure 4-3. shows the User Interface Board connected to the Cyclone III

Embedded Development board.

Figure 4-3. User Interface Board Connection to the Cyclone III Embedded Development Board

Before powering up, prepare the board as follows:

1. Connect USB Mini AB type cable to CON1 on USB BitJetLite and connect USBBitJetLite to JTAG Header (J1) of the CoreCommander Board. See Figure 4-4.

15

CoreCommander User Guide

System Level SolutionsMay 2012

Page 23: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Board Setup

Figure 4-4. Connection of USBBitJetLite to Cyclone III Embedded Development Board

2. Connect Standard USB Mini AB type cable to the CON2 as shown in Figure 4-5.

Figure 4-5. Connection of Standard Mini AB USB Connector to the Board

16 System Level SolutionsMay 2012CoreCommander User Guide

Page 24: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

CoreCommander Hardware Setup

Power Up the Board

The CoreCommander board is having multiple power source and hence it can

be powered using three sources by following the steps mentioned below:

Using External Power Supply

To power up the board with external supply, use DC Power Jack (CON4).

Connect the power supply provided with the board and press and hold the

switch SW1 for 1 second.

Figure 4-6. Power Up the Board with External Supply

You are now ready to run the demo.

17

CoreCommander User Guide

System Level SolutionsMay 2012

Page 25: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Power Up the Board

Using USB Cable

Figure 4-7. Powering Up the Board with USB

Press and hold the switch SW1 up to 1 second to power on the board. The

power LED2 lights up.

Using Battery

The board comes with the Li-ion battery installed.

1. To power up the board with the Li-ion battery, press and hold switch SW1 up to 1 second if battery is charged.

2. If the battery is not charged, follow the steps below:

• Connect Mini USB AB type cable on CON2 or connect external power supply at CON4.

• Battery charge LED (LED 3) glows when battery is in charging mode.

3. When the battery is fully charged, battery charge LED (LED 3) goes off.

18 System Level SolutionsMay 2012CoreCommander User Guide

Page 26: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

CoreCommander Hardware Setup

Configuring the FPGA

Before configuring the FPGA, ensure that the Quartus II software and the

SLS USB BitJetLite driver software are installed on the host computer and

the development board is powered on.

For USB BitJetLite driver installation information, refer to “Installing SLS

USB BitJetLite Driver” on page 10.

To configure the Cyclone III FPGA, perform the following steps:

1. Connect USB Mini AB type cable to CON1 on USB BitJetLite and connect USB BitJetLite to JTAG Header (J1) of the CoreCommander Board.

2. Start the Quartus II software.

3. Choose Open Project from the File menu and browse to <CoreCommander Installation Path>\hw_ref_design\ cc_r2a_ref_des.qar. This will restore the project and open it.

4. On the Tools menu, click Programmer. The Quartus II Programmer appears. See Figure 4-8.

Figure 4-8. Quartus II Programmer

5. Click the Program/Configure box to select the added file.

19

CoreCommander User Guide

System Level SolutionsMay 2012

Page 27: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Configuring the FPGA

6. Click Start to download the selected file to the FPGA. The FPGA is configured when the progress bar reaches 100%.

20 System Level SolutionsMay 2012CoreCommander User Guide

Page 28: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

5. Design Examples

About Design Examples

The CoreCommander kit comes with several applications that showcase the

versatility of the Nios II processor in various applications such as:

JPEG/MPEG Viewer

USB 2.0 Host Mass Storage

USB 2.0 Device Mass Storage using SD Card

USB 2.0 Device Mass Storage using SDRAM

The section below describes basic overview and operation of each of these

applications.

1. All the design examples mentioned below use the Push button switches SW1-SW7. Refer Push button switch reference from Figure 4-2.

2. Before running the design examples, make sure that the board is powered up using any method mentioned in “Power Up the Board” on page 17.

JPEG/MPEG Viewer

JPEG/MPEG Viewer is a Video and SD Host Controller based application

which takes JPEG or MPEG files stored on the SD Card and display them on

the CoreCommander LCD.

Location: <CoreCommander Installation Path>\demos\ jpeg_mpeg_viewer. CoreCommander Installation path is a variable where CoreCommander kit is installed. The default installation path

is c:\sls\kits\corecommander.

The jpeg_mpeg viewer directory contains following folders and files:

Table 5-1. JPEG/MPEG Viewer Demo Directory Structure

Key Description

sdcard_contents Contains images and videos that are stored in the SD Card

cc_r2a_jpeg_mpeg Application Software image

cc_r2a_jpeg_mpeg.sof Application hardware image

cc_r2a_jpeg_mpeg_usb_bitjet_lite Cygwin shell script to download the software image using USB BitJetLite cable

21

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 29: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

JPEG/MPEG Viewer

You can customize the jpeg_mpeg_viewer application's image selection by

adding your own images in to the folder on the SD Card entitled as media

located at <CoreCommander Installation Path>\demos\jpeg_mpeg_viewer\

sdcard_contents\cc_applications\jpeg_mpeg_viewer.

Follow the steps below to download the demo application:

1. Before running the JPEG/MPEG Viewer application copy cc_applications folder in to SD Card from <CoreCommander Installation Path>\demos\jpeg_mpeg_viewer\sdcard_contents.

2. Plug the SD card on the board and power on the board.

3. If you are using SLS USB BitJetLite Download cable to download the .sof and .elf, double click on cc_r2a_jpeg_mpeg_usb_bitjet_lite.bat file and if you are using USB Blaster to download the .sof and .elf, double click on cc_r2a_jpeg_mpeg_usb_blaster.bat file.

4. The .sof file will be downloaded first using Quartus II programmer with the help of SLS USB BitJetLite.

5. The JPEG/MPEG Viewer application (.elf) will be downloaded. See Figure 5-1.

cc_r2a_jpeg_mpeg_usb_bitjet_lite.bat DOS Shell script for USB BitJetLite download cable to download the hardware image

cc_r2a_jpeg_mpeg_usb_blaster Cygwin shell script for USB Blaster to download the software image

cc_r2a_jpeg_mpeg_usb_blaster.bat DOS Shell script of USB Blaster to download the hardware image

jpeg_mpeg_viewer.htm Application readme file

Table 5-1. JPEG/MPEG Viewer Demo Directory Structure

Key Description

22 System Level SolutionsMay 2012CoreCommander User Guide

Page 30: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

Figure 5-1. Downloading JPEG/MPEG Viewer Application

6. CoreCommander LCD displays JPEG/MPEG Viewer application startup screen. See Figure 5-2.

Figure 5-2. JPEG/MPEG Viewer Application Startup Screen

23

CoreCommander User Guide

System Level SolutionsMay 2012

Page 31: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

JPEG/MPEG Viewer

7. Use keypad to run the application. Table 5-2 below displays CoreCommander board keypad configuration.

8. Press SW4 key to run the JPEG Viewer application.

9. CoreCommander LCD displays the list of JPEG files stored in the SD card. See Figure 5-3.

Figure 5-3. Running JPEG/MPEG Viewer Application

Table 5-2. CoreCommander Board Keypad Configuration

Key Description

SW1 Makes selection in forward direction from JPEG/MPEG file list.

SW2 Makes selection in Reverse direction from JPEG/MPEG file list.

SW3 Displays the list of MPEG files stored in the SD Card on CoreCommander LCD.

SW4 Displays the list of JPEG files stored in the SD Card on CoreCommander LCD.

SW5 Play/Pauses JPEG / MPEG files.

SW6 Returns back to JPEG/MPEG Viewer startup screen or stops playing MPEG file.

SW7 Resets the board.

24 System Level SolutionsMay 2012CoreCommander User Guide

Page 32: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

10. Press SW1/SW2 key to select the file.

11. Press SW5 to display the JPEG file on the LCD. See Figure 5-4.

Figure 5-4. Displaying JPEG File

12. Press SW6 key to return to the Startup screen.

13. Press SW3 key to run the MPEG Viewer application.

14. The LCD displays list of MPEG files stored in the SD Card.

15. Press SW1/SW2 key to select the file.

16. Press SW5 to run the MPEG file.

USB 2.0 Host Mass Storage Application

Mass Storage Host demonstration is designed to demonstrate the Mass

Storage device operation on SLS USB 2.0 Host. The demo also enumerates

the connected device and displays its configuration data on console.

Location: <CoreCommander Installation Path>\demos\ usb_host_mass_storage. CoreCommander Installation path is a variable where CoreCommander kit is installed. The default installation path

is c:\sls\kits\corecommander.

25

CoreCommander User Guide

System Level SolutionsMay 2012

Page 33: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

USB 2.0 Host Mass Storage Application

The usb_host_mass_storage directory contains following folders and files:

Follow the step below to run the USB 2.0 Host Mass Storage application:

1. Connect USB Mini AB type cable to CON1 on USB BitJetLite and connect USB BitJetLite to JTAG Header (J1) of the CoreCommander Board.

2. Connect external power supply cable to the board.

3. Switch on the board.

4. If you are using SLS USB BitJetLite Download cable to download the .sof and .elf, double click on cc_r2a_usb20mschc_usb_bitjet_lite.bat file and if you are using USB Blaster to download the .sof and .elf, double click on cc_r2a_usb20mschc_usb_blaster.bat file located at <CoreCommander Installation Path>\demos\usb_host_mass_storage folder. The console displays the message “PlugIn /RePlug the USB device”. The console displays as shown in the Figure 5-5.

Table 5-3. USB 2.0 Host Mass Storage Application Directory Structure

Key Description

cc_r2a_usb20mschc.elf Application Software image

cc_r2a_usb20mschc.sof Application hardware image

cc_r2a_usb20mschc_usb_bitjet_lite cygwin shell script to download the software image

cc_r2a_usb20mschc_usb_bitjet_lite.bat DOS Shell script for SLS USB BitJetLite Download Cable to download the hardware image

cc_r2a_usb20mschc_usb_blaster Cygwin shell script for USB Blaster to download the soft-ware image

cc_r2a_usb20mschc_usb_blaster.bat DOS Shell script of USB Blaster to download the hardware image

usb2massstorage.htm Application readme file

26 System Level SolutionsMay 2012CoreCommander User Guide

Page 34: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

Figure 5-5. Running the Batch File

5. Now, plug a USB pen drive or any other mass storage device.

6. The Enumeration starts which shows the device configuration data. If a USB device other than mass storage device is plugged in, you will see the message Plug/Replug USB device. See the Figure 5-6.

Figure 5-6. Displaying Device Configuration Data

7. If the device is supported by Mass Storage Class driver, it displays the message shown in Figure 5-7.

27

CoreCommander User Guide

System Level SolutionsMay 2012

Page 35: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

USB 2.0 Host Mass Storage Application

Figure 5-7. Device supported by Mass Storage Class Driver Message

If the device is not supported by the driver, you will see the message Plug/Replug USB device.

8. The console then displays a Menu as shown in Figure 5-8. on the console to allow you to operate on your Mass Storage Device.

Figure 5-8. Menu

9. When you select Option 1, you will be asked to open root/current/parent directory. Choose your desired option and you can browse through different directories and its contents. Enter directory name to open when prompted. See Figure 5-9.

Figure 5-9. Opening Directory

28 System Level SolutionsMay 2012CoreCommander User Guide

Page 36: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

10. Select Option 2 to view current directory contents. To open a directory, enter 1 again and follow the instructions thereafter. See Figure 5-10.

Figure 5-10. Current Directory Contents

11. Select Option 3 to read file from the current directory. The file contents will be displayed as shown in Figure 5-11.

Figure 5-11. Reading File from the Current Directory

12. Select Option 4 to write predefined contents to the file. Type the file name. The predefined contents (57 bytes) will be written to this new file. See Figure 5-12.

29

CoreCommander User Guide

System Level SolutionsMay 2012

Page 37: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

USB 2.0 Host Mass Storage Application

Figure 5-12. Writing Predefined Contents to the File

13. Select Option 5 to make a new directory in the current directory. Type the directory name and the new directory will be created in the current directory. See Figure 5-13.

Figure 5-13. Creating New Directory

14. Select Option 6 to view the current directory path. See the Figure 5-14.

Figure 5-14. Current Directory Path

15. Select Option 7 to exit from the current drive. See Figure 5-15.

30 System Level SolutionsMay 2012CoreCommander User Guide

Page 38: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

Figure 5-15. Exit from the Menu

USB 2.0 Device Mass Storage Application using SD RAM

This demonstration uses SDRAM as a USB 2.0 Device Mass Storage. It

demonstrates Read/Write operation from/to the SDRAM.

Location: <CoreCommander Installation Path>\demos\ usb_device_mass_storage_sdram. CoreCommander Installation Path is a

variable where CoreCommander kit is installed. The default installation path

is c:\sls\kits\corecommander.

The usb_device_mass_storage_sdram directory contains following folders

and files:

Follow the steps below to run the demo:

1. Switch on the board and connect the USB BitJetLite Download cable to the board.

Table 5-4. USB 2.0 Device Mass Storage Application using SD RAM Directory Structure

Key Description

cc_r2a_usb20sr_ms_sdram.elf Application Software image

cc_r2a_usb20sr_ms_sdram.sof Application hardware image

cc_r2a_usb20sr_ms_sdram_usb_bitjet_lite cygwin shell script to download the software image

cc_r2a_usb20sr_ms_sdram_usb_bitjet_lite.bat DOS Shell script for SLS USB BitJetLite to download the hardware image

cc_r2a_usb20sr_ms_sdram_usb_blaster Cygwin shell script for USB Blaster to download the soft-ware image

cc_r2a_usb20sr_ms_sdram_usb_blaster.bat DOS Shell script of USB Blaster to download the hardware image

usb_device_massstorage_sdram.htm Application readme file

31

CoreCommander User Guide

System Level SolutionsMay 2012

Page 39: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

USB 2.0 Device Mass Storage Application using SD Card

2. If you are using SLS USB BitJetLite Download cable to download the .sof and .elf, double click on cc_r2a_usb20sr_ms_sdram_usb_bitjet_lite.bat file and if you are using USB Blaster to download the .sof and .elf, double click on cc_r2a_usb20sr_ms_sdram_usb_blaster.bat file located at <CoreCommander Installation Path>\demos\ usb_device_mass_storage_sdram.

3. The .sof file will be downloaded first using Quartus II programmer with the help of USB BitJetLite and then the USB 2.0 Device Mass Storage application (.elf) will be downloaded on the CoreCommander board. See Figure 5-16.

Figure 5-16.Downloading the Application

4. USB 2.0 Mass Storage device will be detected.

5. Format the drive (File System should be in FAT mode).

6. Now perform the Read/Write operation on SDRAM.

USB 2.0 Device Mass Storage Application using SD Card

The demonstration uses SD Card as a USB 2.0 Device Mass Storage. It

demonstrates Read/Write operation from/to the SD Card.

Location: <CoreCommander Installation Path>\demos\ usb_device_mass_storage_sdcard. Where CoreCommander Installation Path is a variable where CoreCommander kit is installed. The default instal-

lation path is c:\sls\kits\corecommander.

32 System Level SolutionsMay 2012CoreCommander User Guide

Page 40: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Design Examples

The usb_device_mass_storage_sdcard directory contains following folders

and files:

Follow the steps below to run the demo:

1. Before running the demonstration, insert an SD Card in the SD Card socket of the CoreCommander Board.

2. Power on the board and connect the USB BitJetLite to the board.

3. If you are using SLS USB BitJetLite Download cable to download the .sof and .elf, double click on cc_r2a_usb20sr_ms_sdcard_ubjl.bat file and if you are using USB Blaster to download the .sof and .elf, double click on cc_r2a_usb20sr_ms_sdcard_usb_blaster.bat file located at <CoreCommander Installation Path>\demos\ usb_device_mass_storage_sdcard.

4. The .sof file will be downloaded first using Quartus II programmer with the help of USB BitJetLite and then the USB 2.0 Device Mass Storage application (.elf) will be downloaded on the CoreCommander board. See Figure 5-17.

Table 5-5. USB 2.0 Device Mass Storage Application using SD Card Directory Structure

Key Description

cc_r2a_usb20sr_ms_sdcard.elf Application Software image

cc_r2a_usb20sr_ms_sdcard.sof Application hardware image

cc_r2a_usb20sr_ms_sdcard_usb_bitjet_lite cygwin shell script to download the software image

cc_r2a_usb20sr_ms_sdcard_usb_bitjet_lite.bat DOS Shell script for USB BitJetLite Download Cable to download the hardware image

cc_r2a_usb20sr_ms_sdcard_usb_blaster Cygwin shell script for USB Blaster to download the software image

cc_r2a_usb20sr_ms_sdcard_usb_blaster.bat DOS Shell script of USB Blaster to download the hard-ware image

usb_device_massstorage_sdcard.htm Application readme file

33

CoreCommander User Guide

System Level SolutionsMay 2012

Page 41: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Further Reference

Figure 5-17.Downloading the Application

5. USB 2.0 Mass Storage device will be detected.

6. Perform the read/write operation on SD Card.

Further Reference

For more information on Corecommander, refer CoreCommander Reference Manual.

34 System Level SolutionsMay 2012CoreCommander User Guide

Page 42: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Appendix A: Configuring PROM (M25P16)

Introduction This section describes how the Configuration flash on the Cyclone III Embedded Development board can be programmed using the JTAG

interface. Basically this is the method of performing indirect AS

configuration for storing the FPGA configuration data permanently into a

configuration prom (M25P16).

Creating .JIC File Follow the steps mentioned below to create the JTAG Indirect Configuration

file, which is used to program the configuration PROM (M25P16) on

CoreCommander board the using JTAG interface:

1. Compile the user project in Quartus II software to generate the desired.sof file (If the .sof file is already available, then no need to follow this step)

2. Go to File menu and click on Convert Programming Files. A window pops up.

3. Click on the drop down list in the Programming File Type Menu and select JTAG Indirect Configuration File (*.jic) (Last option).

4. Click on the drop down list in the Configuration Device Menu and select EPCS16 device.

5. Click on the Browse Button besides the File Name option to browse for the desired directory and output file name (e.g., c:\altera\work\test1.jic).

6. In the Input Files to convert box, perform following steps:

• Select Flash Loader and click on Add Device.

• Select Cyclone III device family and EP3C25F256 Device Name as per the Cyclone III Embedded Development board’s device option available and click OK.

• Select SOF Data and click on Add File.

• Browse for the desired directory and .sof file to be converted and click Open.

• Click on the added .sof file and click on Properties.

• Select (Enable) Compression and click OK.

35

CoreCommander User GuideSystem Level SolutionsMay 2012

Page 43: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

Configuring PROM (M25P16)

• Click on the Save Conversion Setup... button (top right option) to select the conversion configuration for the current project (Optional).

• Click on OK to perform the .sof to .jic conversion.

Configuring PROM (M25P16)

The configuration PROM (M25P16) can be programmed through the JTAG

interface in the same manner as doing the JTAG programming (downloading

.sof file). The only difference is that the desired .jic file is selected for

programming instead of the .sof file.

Follow the steps mentioned below to program the configuration PROM

(M25P16) on the Cyclone III Embedded Development board using a JTAG

Indirect configuration file through the JTAG interface:

1. Go to TOOLS menu and click on Programmer. The Quartus II Programmer window pops up.

2. Make sure that the available Programming Hardware (USB BitJetLite) is selected in the Hardware Setup.

3. Make sure that JTAG is selected as the programming Mode.

4. Select the currently available .sof file and click on the Delete button. If a ready made standalone .sof or .jic file is being used or Standalone Quartus II programmer is being used or programmer is not opening from the user project, then no .sof or .jic file is loaded by default and no need to follow this step.

5. Click on Add File Button and browse for the desired .jic file. Select the desired .jic file and click Open.

6. Check both the boxes for Program/Configure (for EP3C25).

7. Click on Start Button to start programming of the Configuration PROM (M25P16) using the JTAG interface. First the EP3C25 device is configured with the Flash loader design, which then programs the M25P16 Configuration PROM Device.

36 System Level SolutionsMay 2012CoreCommander User Guide

Page 44: ug u2edb 1.0 - Intel · v CoreCommander User Guide System Level Solutions May 2012 1. 2. Numbered steps are used in a list of items, when the sequence of items is important. such

37

CoreCommander User GuideSystem Level SolutionsMay 2012

Appendix B: Restoring the Factory Design to the

Flash Device

We assume that the Corecommander hardware is setup and the board is

powered up as shown in chapter 4. To program the M25P16 flash device on

the CoreCommander board, perform the following steps:

1. Connect SLS USB BitJetLite or Altera USB Blaster download cable to JTAG header (J1).

2. Switch on the board.

3. Format the SD Card by running the cc_r2a_format.bat file from <CoreCommander Installation Path>\factory_contents\ sdcard_format.

4. Copy cc_applications folder from the <CoreCommander Installation Path>\factory_contents\sdcard_contents using SD Card reader.

5. Execute cc_r2a_app_sel_usb_bitjet_lite.bat from <CoreCommander Installation Path>\factory_contents\factory_recovery, if you are using SLS USB BitJetLite download cable.

6. Execute cc_r2a_app_sel_usb_blaster.bat from <CoreCommander Installation Path>\factory_contents\factory_recovery, if you are using Altera USB Blaster download cable.

7. Switch off the CoreCommander board and switch on again.

8. Now the CoreCommander LCD will display SLS logo and another image that will lists demonstrations.