Renesas Host USB Mass Storage Application Note
The Renesas Synergy™ Platform USBX™ Mass Storage Host is a USB mass storage class host that allows you to access data on a common USB flash drive. This application note describes how to implement a USB Host on different Renesas Synergy Kits through an example demo application. You can use this application to access data on a USB flash drive, such as reading and writing files.
Advertisement
Advertisement
Application Note
Renesas Synergy™ Platform
USBX
™
Mass Storage (Host)
R30AN0239EU0122
Rev.1.22
Feb 23, 2017
Introduction
This project illustrates the use of a USB mass storage class host to access data on a common USB flash +. The application also includes key elements to demonstrate how they work together in a typical design, including ThreadX ®
RTOS, USBX host stack, USBX mass storage class driver, USBX host controller driver for the Renesas Synergy
Platform, FileX ® , and a sample application that reads and writes files on the drive.
Target Device
• Renesas Synergy
™ DK-S3A7 v2.0 Development Kit
• Renesas Synergy
™ DK-S7G2 v3.0 Development Kit
• Renesas Synergy
™ PE-HM1 v2.0 Product Example Kit
• Renesas Synergy
™ SK-S7G2 v3.1 Starter Kit
• Renesas Synergy
™ PK-S5D9 v1.0 Performance Kit.
Minimum PC Recommendation
• Microsoft
® Windows ® 7
• Intel
® Core ™ family processor running at 2.0 GHz or higher (or equivalent processor)
• 8 GB memory
• 250 GB hard disk or SSD
• USB 2.0
• Internet connection.
Installed Software
• e
2 studio ISDE v5.3.1 or greater or IAR EW for Synergy v7.71.1 or greater
• Synergy Software Platform (SSP) v1.2.0
• Synergy Standalone Configurator (SSC) v5.3.1.002.
If you do not have one of these software applications you should install it before continuing.
Goals and Objectives
This document shows how to implement a USB Host on different Renesas Synergy Kits through an example demo application.
Target Audience
This document is intended for users who want to develop applications using USB Host using the S3A7, S7G2, or S5D9
Synergy MCUs.
Contents
1.
Connect to the Board ............................................................................................................... 2
2.
Import the Project into e2 studio .............................................................................................. 3
3.
Application Features ................................................................................................................ 3
4.
Run the Demo ......................................................................................................................... 3
5.
References .............................................................................................................................. 3
R30AN0239EU0122 Rev.1.22
Feb 23, 2017
Page 1 of 4
Renesas Synergy™ Platform USBX™ Mass Storage (Host)
1. Connect to the Board
information on the selected kit.
Table 1.1 J-Link connect ports and USB host ports for different kits
Kits
DK-S3A7
DK-S7G2
SK-S7G2
PE-HMI
PK-S5D9
J-Link connect USB host port
J15
J17
J19
J12
J19
J101 on the base board
J3
J6
J3
J6
In addition, you also have to enable the USB host on the base board of the DK-S3A7 with a proper switch setting on the
Figure 1.1 Enable the USB host port with S6 on the DK-S3A7
Note: If your flash stick does not work, that is the light does not turn on or demo fails, check to make sure that it is formatted as FAT32. You may need to reformat the stick to get it to work, however, do not use quick format.
Some flash sticks do not seem to work possibly because of quality issues with the drives. They may still work with a personal computer but not with the embedded software.
R30AN0239EU0122 Rev.1.22
Feb 23, 2017
Figure 1.2 USB flash stick connected
Page 2 of 4
Renesas Synergy™ Platform USBX™ Mass Storage (Host)
2. Import the Project into e
2
studio
To import the project:
• Refer to the "Synergy Project Import Guide" (Renesas, 2017) for instructions on importing the project into e
2 studio and building/running the project.
Note: In the above procedure, when asked to select the Debug Configuration select USBX_Mass_Storage_Host
Debug under Renesas GDB Hardware Debugging.
3. Application Features
This section describes the key features of the USB Mass Storage Class (Host) demonstration application and the steps needed to run the application.
The demonstration application illustrates USB connectivity through these two functions where:
• The board mounts the USB stick as FileX storage media
• The application opens a file on the stick, increments the first character in the file, and writes it back to the storage media.
4. Run the Demo
To run the demo:
1. After programming the MCUs, press the Reset button to make a power-on reset. For example, press the S7 on the
DK-S3A7 v2.0.
2. Insert a USB flash stick into the USB host receptacle on the board.
3. Observe that the LED on the USB stick lights up. This indicates that the USB flash stick has been powered and the file system has been mounted.
The demo looks for the file counter.txt on the flash drive. If the file is on the flash drive, the software opens it, reads the first character, increments it, and saves it back into the file. If the file is not on the flash drive, the software creates it and stores a 1 into the file. Then, the demo closes the file.
4. Remove the USB flash stick from the board and plug it into a PC. Open the file counter.txt in the root of the
USB flash stick and note the number in the file, which counts the time of plugging the USB flash stick into the boards.
5. Repeat steps 2-4 and observe the number incremented each time.
5. References
Renesas. (2017). Synergy Project Import Guide, r11an0023eu0116-synergy-ssp-import-guide.pdf.
R30AN0239EU0122 Rev.1.22
Feb 23, 2017
Page 3 of 4
Renesas Synergy™ Platform USBX™ Mass Storage (Host)
Website and Support
Support: https://synergygallery.renesas.com/support
Technical Contact Details:
• America: https://renesas.zendesk.com/anonymous_requests/new
• Europe: https://www.renesas.com/en-eu/support/contact.html
• Japan: https://www.renesas.com/ja-jp/support/contact.html
All trademarks and registered trademarks are the property of their respective owners.
R30AN0239EU0122 Rev.1.22
Feb 23, 2017
Page 4 of 4
Rev.
1.00
1.01
1.02
1.03
1.10
1.20
1.2.1
1.2.2
Revision History
Date
Dec 11, 2015
Jan 7, 2016
Jan 22, 2016
Feb 12, 2016
Jun 24, 2016
Oct 27, 2016
Nov 30, 2016
Feb 23, 2017
-
-
-
-
-
-
-
Description
Page
-
Summary
Initial version
Changed from template to import
Connected to boards before import
PE-HMI1 and SK-S7G2 code samples updated
Updated to SSP1.1.0, improved demo description, added note for drive format
Migrated to SSP 1.2.0-b.1
Added IAR EW support
Updated for SSP 1.2.0
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving patents, copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information described in this document, including but not limited to, the product data, drawing, chart, program, algorithm, application examples.
3.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others.
4.
You shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended applications for each Renesas Electronics product depends on the product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key financial terminal systems; safety control equipment; etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (space and undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas
Electronics disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas
Electronics.
6.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident arising out of the use of Renesas Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please ensure to implement safety measures to guard them against the possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics products, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures by your own responsibility as warranty for your products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, please evaluate the safety of the final products or systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please investigate applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You shall not use Renesas Electronics products or technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction, such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
(Rev.3.0-1 November 2016)
SALES OFFICES
Refer to "http://www.renesas.com/" for the latest and detailed information.
Renesas Electronics America Inc.
2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333
Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949
Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HAL II Stage, Indiranagar, Bangalore, India
Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141 http://www.renesas.com
© 2017 Renesas Electronics Corporation. All rights reserved.
Colophon 6.0

Public link updated
The public link to your chat has been updated.
Advertisement
Key features
- USB mass storage class host
- Access data on a USB flash drive
- Renesas Synergy Platform
- ThreadX RTOS
- USBX host stack
- USBX mass storage class driver
- USBX host controller driver
- FileX
- Example demo application