Silicon Laboratories USB-MSD-RD User Manual

USB-MSD-RD
USB MASS STORAGE DEVICE REFERENCE DESIGN KIT USERS GUIDE

1. Kit Contents

CF, SD, MMC Memory Expansion Board (AB5)256 MB SD CardStraight DB9 serial cable (RS-232 cable)Quick-start GuideReference Design Kit CD-ROM containing the following items:
USB Mass Storage Device Reference Design Programmer's Guide (AN282), and associated software (AN282SW.zip)Keil Software 8051 Development Tools (evaluation assembler, 2 kB limited compiler, and linker)All C8051F340 and USB MSD related documentation in PDF format

2. Requirements

The USB MSD Reference Design Kit has been designed for use with a C8051F340DK Development Kit. The development kit can be purchased separately from Silicon Laboratories (www.silabs.com). The following are the requirements to use this Reference Design Kit as described in this User's Guide.
C8051F340DK Development Kit (contents shown below):
C8051F340-TB Target BoardUSB Debug Adapter6' USB CableAC to DC Power Adapter
PC with the following features:
Operating system: Windows 2000/XP/Server2003 Available ports: One serial port (RS232) and one USB port
Note: A full version of the Keil tool chain is required in order to modify and recompile the code provided with this reference
design because the code size is greater than evaluation tool chain's code size limits. No tool chain is required for the demonstration or for debugging because an object file (*.OMF) is provided with the reference design.

3. USB Mass Storage Device Reference Design Kit Overview

The USB Mass Storage Device (MSD) Reference Design Kit includes the AB5 Expansion Board (shown in Figure 1) that can be connected directly to the expansion connector of a C8051F340-TB Target Board. The connected setup with a SD memory card is shown in Figure 2. This hardware and the included 'F340 firmware fully demonstrate how an application can benefit from implementing the USB MSD device class. The firmware is described in Section “4. USB MSD RD Firmware”. Step-by-step demonstration instructions are provided in Section “5. USB MSD Reference Design Kit Demonstration”. Detailed descriptions of the components and API functions are included in “AN282: USB Mass Storage Device Reference Design Programmer's Guide". The board hardware is described in sections 6, 7, and 8.
Rev. 0.1 5/06 Copyright © 2006 by Silicon Laboratories USB-MSD-RD
USB-MSD-RD

Figure 1. CF, SD, MMC Memory Expansion Board (AB5)

Note: The C8051F340-TB Target Board is not included with the USB-MSD-RD Kit.

Figure 2. C8051F340-TB connected to AB5 Expansion Board with SD Card

2 Rev. 0.1
USB-MSD-RD

4. USB MSD RD Firmware

The USB MSD RD includes all the 'F340 firmware necessary to handle the following:
USB enumeration and standard requestsMSD class requestsSCSI command setMedia access - SD, MMC and CompactFlash card formatsFAT16 file system support
Also included is an example application that can perform the following tasks:
Present an interactive command shell via the UARTMeasure temperature using the on-chip temperature sensor and ADCMonitor the state of the two push-button switches on the target boardLog the temperature and button state information to log files in the memory card
The USB MSD RD System Architecture shown in Figure 3 gives an overview of the various components that constitute the USB MSD RD firmware. The code space usage chart in Figure 4 shows the amount of code space used by the firmware components. Detailed descriptions of the components and API functions are included in “AN282: USB Mass Storage Device Reference Design Programmer's Guide".
To implement your own application based on this USB MSD Reference Design, you can customize the blocks labeled 'Application', 'Other HW Peripherals', and 'App. Specific Hardware' (all shown in blue in Figure 3). Source code for all the other firmware blocks is also provided, but typically there is no need to customize these blocks.
Rev. 0.1 3
USB-MSD-RD
Components used only for USB MSD Data Flow
USB MSD Data Flow
Windows Explorer or
Other Application
File system API serving the Example App.
Shared media access components
Example App. components that can be customized
Example App. Data Flow
HyperTerminal
Driver Stack Driver Stack
USB Host Controller RS232 Serial Port
PC
USB Function
Temp. Sensor
Controller
Transceiver
ADC
UART
USB
Mass Storage
Device
Example
Application
External HW Peripherals
RS232
Push
Buttons
SCSI
File System
Sector Server
C8051F340 USB Mixed Signal MCU
Media Access
C8051F340-TB Target Board

Figure 3. USB MSD RD System Architecture

4 Rev. 0.1
SPI
Compact
Flash
Memory
Card
SD /
MMC
Memory
Card
AB5 Memory
Expansion Board
USB-MSD-RD
Available
Free Space
(39.1 kB)
62%
File System
Used
(23.9 kB)
38%
USB / MSD /
SCSI (3.9 kB)
6%
(5.9 kB)
9%
Sector Server
(1.1 kB)
2%
Example
Application
(5.1 kB)
8%
SD / MMC
Media Access
(2.1 kB)
3%
Compiler
Libraries /
Misc
(5.1 kB)
8%
CF Media
Access
(0.7 kB)
1%

Figure 4. USB MSD Firmware Code Space Usage on the C8051F340

Rev. 0.1 5
USB-MSD-RD

5. USB MSD Reference Design Kit Demonstration

The following step-by-step demonstration will walk you through the various features and capabilities of this reference design. There are three parts to this demonstration: Firmware Download, Example Application Demonstration, and Mass Storage Device Demonstration.
Note: The demonstration instructions assume that a PC running Windows 2000/XP/Server2003 is being used.

5.1. Firmware Download

The steps in this section will guide you in downloading the USB MSD Reference Design firmware to the C8051F340-TB target board.
1. Follow the 'Software Setup' instructions in the C8051F340DK User's Guide to install the Silicon Laboratories IDE. This document is available at the following web page: http://www.silabs.com/tgwWebApp/public/
web_content/products/Microcontrollers/USB/en/C8051F340DK.htm.
2. Depending on which type of debug adapter you have, set up the hardware as shown in one of the two diagrams below (Figure 5, Figure 6). Consult the C8051F340DK User's Guide for detailed instructions.
AC/DC Adapter
PC
Serial Port
Serial
Cable
Serial
Adapter
Ribbon
Cable
Target
Board

Figure 5. Hardware Setup using a Serial Debug Adapter

AC/DC
Adapter
PC
USB Port
USB
Cable
USB
Debug
Adapter
Ribbon Cable
Target Board

Figure 6. Hardware Setup using a USB Debug Adapter

3. Launch the Silicon Labs IDE using the icon from your Start Menu: 'Start Menu Programs Silicon Laboratories
4. Before connecting to the target device, several connection options may need to be set. Open the 'Connection Options' window by selecting 'Options was included with the kit in the "Serial Adapter" section. Next, the correct "Debug Interface" must be selected. C8051F34x family devices use the Silicon Labs 2-wire (C2) debug interface. Once these selections are made, click the OK button to close the window.
Silicon Laboratories IDE'
Connection Options...' in the IDE menu. First, select the adapter that
6 Rev. 0.1
Loading...
+ 14 hidden pages