Atmel AT43DK370 User Manual
Atmel AT43DK370 User Manual

Atmel AT43DK370 User Manual

Usb host/function

Advertisement

Quick Links

AT43DK370 USB Host/Function
Development Kit
.......................................................................................................
User Guide for Revision 1.3

Advertisement

Table of Contents
loading

Summary of Contents for Atmel AT43DK370

  • Page 1 AT43DK370 USB Host/Function Development Kit ....................... User Guide for Revision 1.3...
  • Page 3: Table Of Contents

    Section 2 Getting Started..................2-1 Electrostatic Warning ................2-1 Unpacking the System ................2-1 System Requirements................2-1 Connecting the Hardware .................2-2 Installing AT43DK370 and Starting Up the USB Clinic ......2-2 Testing the Hardware................2-3 Section 3 Hardware Description ................3-1 Jumper Settings ..................3-2 Section 4 USB Clinic.....................
  • Page 4 4.9.2 Suspend Device ................4-11 4.9.3 Resume Device ................4-11 4.10 Miscellaneous Notes ................4-11 Section 5 Building Firmware for the AT43DK370 Development Kit ...... 5-1 Sample Directory and File Structure ............5-1 5.1.1 USBP ARM Project Guide ..............5-2 5.1.2 “Make” Project ..................5-4 ADS Settings.....................5-5 Modifying a Sample Application ..............5-8...
  • Page 5 Table of Contents Section 9 Appendices ................... 9-1 AT43USB370 Bill of Materials (BOM) ............9-1 AT43DK370 Schematics ................9-3 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 6 Table of Contents AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 7: Introduction

    High Level APIs in C USB Clinic In-circuit Emulation Tool The latest version of the USB Clinic can be found in the USB section of the Atmel web site at http://www.atmel.com/ad/plugplayhost. Please refer to the same section for up- to-date information on new USB software, documentation releases and tool upgrades.
  • Page 8 Introduction AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 9: Getting Started

    5V Regulated Power Supply Atmel USB CD-ROM with Software and Documentation Atmel Products CD-ROM Please contact your local Atmel distribution or E-mail usb@atmel.com if any of the aforementioned items is missing from the package. System The minimum hardware and software requirements are: Requirements ®...
  • Page 10: Connecting The Hardware

    Installing To install the AT43DK370: AT43DK370 and 1. Insert the “Atmel AT43DK370” CD into the CD-ROM drive of the PC or notebook Starting Up the and follow the instructions. USB Clinic 2. After installation, the AT43USB370 documents, firmware, and software should be installed on the C:\Program Files\ATMEL USB\AT43DK370 , if the default installation directory is used.
  • Page 11: Testing The Hardware

    The Connection button allows testing of the RS-232 serial port and the AT43DK370 development board connection. Prior to going to the Connection menu, please make sure that the AT43DK370 is physically connected to the PC with the sup- plied serial cable or any standard serial cable.
  • Page 12 AT43DK370 development board, click on Test Connectivity with Target and look for Connection verified in the Output Window (see Figure 2-5). The Test Connectivity with Target also checks the AT43DK370 firmware revision to see if it sup- ports the current USB Clinic version.
  • Page 13: Hardware Description

    Section 3 Hardware Description The AT43DK370 development board comes pre-configured as a USB Host in StandAl- one (Flash) mode. Alternative settings are available through jumper configurations. Complete descriptions of the jumper settings are explained in Section 3.1. Figure 3-1. AT43USB370 Development Board Components Layout...
  • Page 14: Jumper Settings

    The AT43DK370 Development Board supports two modes of operation, the default Standalone (or Flash) Mode and the ICE (In-Circuit Emulator) mode. In Standalone Mode, the AT43DK370 Development Board executes code from its on board flash ROM. While in ICE Mode, an In-Circuit Emulator for the ARM processor can be con- nected through J4 to further facilitate code development.
  • Page 15: Usb Clinic

    2.0 in order to obtain the correct response from the USB Clinic and the AT43USB370 Library. Atmel will continue to extend the capability of the USB Clinic. The following section is intended for USB Clinic Rev. 1.2. For software upgrades, please refer to the USB sec- tion of the Atmel web site at http://www.atmel.com/ad/plugplayhost.
  • Page 16: Output Window

    From the Main Menu, the Connection button allows testing of the RS-232 serial port and the AT43DK370 Development Board connection. Prior to go to the Connection menu, please make sure that the AT43DK370 is physically connected to the PC with the supplied serial cable.
  • Page 17: Test Connectivity

    AT43DK370 Development Board, click on Test Connectivity with Target and look for Connection verified in the Output Window. The Test Connectivity with Tar- get also checks the AT43DK370 firmware revision and its USB Clinic application code revision. 4.3.2...
  • Page 18 Once code download is complete, the user has the option of downloading the firmware again without executing the code or executing the downloaded firmware by clicking on Execute Now. Resetting the AT43DK370 Development Board will not erase the firm- ware from the ARM's memory space.
  • Page 19: Memory

    (left to right, and top to bottom). Please note that the available memory address in the AT43DK370 Development Board ranges up to 0x3FFFFFFF. The user will not be able to read or write to memory addresses beyond this limit.
  • Page 20: Get Device Descriptor

    USB device. A target USB device is defined as one of the USB devices connected to the AT43DK370 development board. To retrieve the target device's descriptor, the user needs to assign its device address as input. The device address ranges from 1 to 7, and is assigned by the enumeration timing order in which a device is connected to the AT43DK370 Host.
  • Page 21: Set Configuration

    Address stage to Configured state. The enumeration is done by the AT43DK370 firmware upon device connection, therefore the user will not need to exe- cute this command through the USB Clinic manually. Please refer to “USB Processor Library Software Development Guide for Host Mode’...
  • Page 22: Data Transfer

    Interrupt, Bulk and Control. The user has to enter the Device Address of the device, the Endpoint intended, the number of Retries allowed, the number of NAKs allowed, and the Buffer Size allocated for the operation. AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 23: Control Transfer

    “USBP_H_CustomTransfer() API” of the “AT43USB370 Software Development Guide for Host Mode”. Table 4-3. Packet Types Packet Type Value PACKET_OUT 0x00 PACKET_IN 0x01 PACKET_SETUP 0x02 Table 4-4. Data Toggle Data Toggle Value DATA_TOGGLE_0 0x00 DATA_TOGGLE_1 0x01 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 24: Port Features

    Specification Rev 2.0”, and to the “AT43USB370 Software Development Guide for Host Mode”. Table 4-5. Feature Selector Values Feature Selector Value PORT_CONNECTION PORT_ENABLE PORT_SUSPEND PORT_OVER_CURRENT PORT_RESET PORT_POWER PORT_LOW_SPEED C_PORT_CONNECTION C_PORT_ENABLE C_PORT_SUSPEND C_PORT_OVER_CURRENT C_PORT_RESET PORT_TEST PORT_INDICATOR 4-10 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 25: Device State Control

    7, and is assigned by the enumeration timing order in which a device is connected to the AT43DK370 Host. For details about how to set the DEVICE_REMOTE_WAKEUP fea- ture, please refer to the “USB Specification Rev 2.0”, and to the “AT43USB370 Software Development Guide for Host Mode”.
  • Page 26 USB Clinic connection between the AT43DK370 Development Board and the PC. This serial connection is NOT active until the Connect to Target button is clicked. – There is a 1000-character limitation on a single transmission. The user will need to break the text to fit the limitation.
  • Page 27: Building Firmware For The At43Dk370 Development Kit

    Intel 32-bit Hex file that is used by the USB Clinic that downloads the firmware to run on the AT43DK370 board's SRAM. The sample template included in the DK is the Download mode version. For details on how to convert between the firmware modes, please refer to Section 6.
  • Page 28: Usbp Arm Project Guide

    Building Firmware for the AT43DK370 Development Kit ® ™ Figure 5-1. USBP_Library.mcp with Metrowerks CodeWarrior for ADS v1.2 The project file contains the build information for the sample source code and the required ARM library. 5.1.1 USBP ARM Project Guide 5.1.1.1...
  • Page 29 Building Firmware for the AT43DK370 Development Kit USBP_lib_port_asm.s |-- USBP_lib_port_c.c |-- ks32c50100_port ks32c50100_start.s ks32c50100_config.h ks32c50100_config.s ks32c50100_init.c ks32c50100_scat_l.scf |-- Application |-- MSD |-- msdlib.h |-- USBP_MSD_Library.a |-- MSD_Application |-- Application.h |-- IdeCmds.h |-- HEAP.c |-- Clinic.c |-- main.c |-- Eg.c A brief description of the folders and files is given below.
  • Page 30: Make" Project

    Building Firmware for the AT43DK370 Development Kit ks32c50100_config.s: This file contains the system manager initialization routine for the ks32c50100 processor. d. ks32c50100_init.c: This file contains various peripheral initialization func- tions for the ks32c50100 processor. e. ks32c50100_scat_l.scf: This is the scatter loading file. It defines the various mapped regions of the DK board.
  • Page 31: Ads Settings

    Building Firmware for the AT43DK370 Development Kit Figure 5-2. Project Make ADS Settings To Make a project, the ADS requires to know the format to compile code and how to link its object. Those information are stored in a scatter file. To assign a scatter file, click on the DebugRel Setting icon on the top right corner of the ADS IDE as shown in Figure 5- Figure 5-3.
  • Page 32 Building Firmware for the AT43DK370 Development Kit The following window appears on the screen. Figure 5-4. DebugRel Settings Window The left-hand side of the DebugRel Settings window contains available options includ- ing Target, Language Settings and Linker. Go to Linker > ARM Linker > Output.
  • Page 33 Building Firmware for the AT43DK370 Development Kit Figure 5-5. Output Format/Name Selection Secondly, for the ICE mode, the firmware entry point needs to be 0x1000. Go to Linker > ARM Linker > Options and look for the Image entry point prompt. At the prompt enter 0x1000 to set the proper entry point.
  • Page 34: Modifying A Sample Application

    Building Firmware for the AT43DK370 Development Kit Figure 5-6. Image Map file and Symbol file selection. Note: The entry point 0x1000 is for ICE (In-Circuit Emulation) mode. Modifying a Go back to the project files (see Figure 5-1 on page 2). In USBP_Library.mcp, there is Sample an EG.c file.
  • Page 35 Building Firmware for the AT43DK370 Development Kit The ARM firmware can print messages to the Output Window of the USB Clinic during execution. This is accomplished by calling the UART0XmitStr() function with a \n at the end of the text string.
  • Page 36 Building Firmware for the AT43DK370 Development Kit There is a 1000-character limitation in the length of the text string. If string length exceeds 1000, simple break up the string into two or more short string and repeat the UART0XmitStr(). After editing the source files, if the user choose to re-compile only a single or a few selected files, right-click on the down-arrow icon at the right-most end of each of the files, and then select Touch (Figure 5-10).
  • Page 37 Building Firmware for the AT43DK370 Development Kit Figure 5-11. User Program Output Directory AT43DK370 USB Host/Function Dev. Kit User Guide 5-11 3423C–USB–1/04...
  • Page 38 Building Firmware for the AT43DK370 Development Kit 5-12 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 39: Converting Between Flash And Ice Mode

    1. In ADS go to DebugRel > Linker > ARM Linker > Options Flash Mode from 2. Under Image entry point specify address 0x0 (see Figure 6-1) ICE Mode Figure 6-1. DebugRel Settings Window AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 40 6. Add assembly constant: FLASH and click Apply (see Figure 6-2) Figure 6-2. DebugRel Settings Window - Predefines Tab 7. Go to Language Settings > ARM C Compiler > Preprocessor. 8. Add C constant: FLASH and click OK (see Figure 6-3) AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 41: Converting To Flash Mode From Download Mode

    5. Click on the Predefines tab. 6. Add assembly constants: FLASH, DOWNLOAD and click Apply. 7. Go to Language Settings > ARM C Compiler > Preprocessor. 8. Add C constants: FLASH, DOWNLOAD and click OK. AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 42: Converting To Download Mode From Flash Mode

    Flash Mode: Entry point = 0x0, ks32c50100_scat_l file use Flash mode portion, has “FLASH” as predefine constant. Download Mode: Entry point = 0x108000, ks32c50100_scat_l file use Download mode portion, has both “FLASH” and “DOWNLOAD” as predefine constants. AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 43: Generating Hex Files For Flash Mode In The At43Usb370 Development

    0x0. 3. Add the Predefine constant FLASH in the ARM Assembler and Compiler (see Section 6) 4. To create a Hex file do the following: Figure 7-1. Post-linker Setting: ARM fromELF AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 44 Note: For the DOWNLOAD mode hex file, taking out the “:02000…” lines is not required. 5. Use Hex2Vcx.exe to split this file into 4 hex files for each flash. The Hex2Vcx.exe can be found at the C:\Program Files\Atmel USB\AT43DK370\Software\USBP_Library_Rev_x.x_Template\ USBP_Library_Data\DebugRel directory.
  • Page 45: Technical Support

    For technical support, please fill out the Customer Problem Report html form in the C:\Program Files\ATMEL USB\AT43DK370 directory. Alternatively, fill out an online support form available in the Product Section of the Atmel web site at http://www.atmel.com. Please make sure the following information is...
  • Page 46 Technical Support AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 47 33 pF Ceramic 0805 Panasonic ECJ-2VC1H330J Digikey PCC330CGCT-ND Resistor R1, R14, R15, 470 5% 0805 Panasonic ERJ-6GEYJ471V Digikey P470ACT-ND R2, R27, R28, 10K 5% 0805 Panasonic ERJ-6GEYJ103V Digikey P10KACT-ND R29, R30, R31 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 48 JP3, JP8, JP9, HEADER 2x1 Straight Male Jameco 108337 JP10, JP11 JP12, JP13 HEADER 17x2 Straight Male Jameco 53516 Power Jack 3 Terminals Digikey CP-202A-ND Serial Port DB9 Male 747840-5 Digikey A23278-ND AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 49 SG-8002JC-PCC Digikey SG-8002JC-PCC-ND 48MHz Miscellaneous Adhesive Rubber Feet 100/Pk SJ5018BLKC Jameco 142682 AT43DK370 Schematics Figure 9-1 on page 4 through Figure 9-6 on page 9 cover the schematic diagrams for this system. AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 50 Appendices Figure 9-1. ARM Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 51 Appendices Figure 9-2. AT43USB370 Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 52 Appendices Figure 9-3. SRAM Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 53 Appendices Figure 9-4. FLASH Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 54 Appendices Figure 9-5. Serial Port, Connectors and USB Power Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 55 Appendices Figure 9-6. Power Supply Schematic AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 56 Appendices 9-10 AT43DK370 USB Host/Function Dev. Kit User Guide 3423C–USB–1/04...
  • Page 57 No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products are not authorized for use as critical components in life support devices or systems.

Table of Contents