# USB Device Mass Storage Project 1.4

## Purpose

This application creates an USB Mass Storage drive on a host computer. The drive is created from the internal Flash or external SDRAM memory of the evaluation kit.

## Hardware Requirements

This package can be used with the following Atmel evaluation boards:

- AT91SAM7S-EK (except AT91SAM7S32)
- AT91SAM7X-EK
- AT91SAM7SE-EK
- AT91SAM9260-EK
- AT91SAM9261-EK
- AT91SAM9263-EK
- AT91SAM9RL-EK
- AT91SAM9XE-EK
- AT91SAM9G20-EK
- AT91CAP9-DK
- AT91CAP9-STK

## Description

This examples enumerates as a Mass Storage device on the host computer side. This effectively creates a new hard-drive from the PC point of view, enabling seamless file transfer to and from the memory.

One or more drives are created, depending on the evaluation kit and microcontroller capabilities. Currently, drives can be created from the following memories:

- Internal Flash
- External SDRAM

Each memory supported by the EK will have its own drive. Be careful that it may not be possible to run the application from a memory which is being used as a drive, unless the program is modified to account for that.

Depending on memory types, the content of each drive may or may not be carried out after power disconnection. For example, SDRAM cannot retain data without power, so a SDRAM hard-drive will lose its content upon power down.

WARNING: on the SAM7X/XC evaluation kit, the project only works in internal flash.

## Usage

1. Build the application.
2. Optionally, connect the DBGU port of the evaluation board to the computer and open it in a terminal. Debug information generated by the application will be visibled that way.

- Settings: 115200 bauds, 8 bits, 1 stop bit, no parity, no flow control.

3. Download and run the program inside the evaluation board. Remember that the application will not work properly if run in a memory used to create a drive. Please refer to the SAM-BA User Guide, the GNU-Based Software Development application note or to the IAR EWARM User Guide, depending on your chosen solution.
4. In the terminal window, the following text should appear:

> `-- USB Device Mass Storage Project 1.4 --`

5. Connect the USB cable to the board. Traces should start to appear on the terminal. If this is the first time the device is connected to the PC, the operating system may take some time to install it.
6. Once the device is connected and configured, new drives should appear on the host machine. They will have to be formatted when used for the first time.

###### Atmel Corporation ©2008