Getting Started..................2-1 Electrostatic Warning ................2-1 Unpacking the System ................2-1 System Requirements................2-1 Connecting the Hardware .................2-2 Installing AT43DK380 and Starting Up the USB Clinic ......2-2 Testing the Hardware................2-3 Section 3 Hardware Description ................3-1 Description of the Main Development Platform.........3-1 3.1.1...
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 AT43DK380 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
9.1.3 AT43DK380-PDC2 Schematic ............9-7 AT43DK380 Bill of Materials (BOM)............9-8 9.2.1 AT43DK380 Main Development Platform BOM .........9-8 9.2.2 AT43DK380-PDC1 BOM ..............9-11 9.2.3 AT43DK380-PDC2 BOM ..............9-12 AT43DK380 Main Development Platform CPLD VHDL Code Ref..9-13 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 6
Table of Contents AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
AT43DK380 Main Development Platform is the AT43USB380 Host/Function/OTG Pro- cessor Development Platform to be used with a user target processor board or the AT43DK380 Processor Daughter Cards (PDCs). It is designed to allow real-time firm- ware development and evaluation of the AT43USB380 USB Host/Function/OTG Processor.
Page 8
Card. The pre-programmed flash set and the software tools are functional only for the complete development kit. We recommend purchasing a bundled set for initial development. The AT43DK380 Main Development Platform consists of the following features: – AT43USB380 USB Host/Function/OTG Processor – 1M Bytes Flash ROM –...
98/2000/ME/XP RS-232 Port (COM port) In order to use the AT43DK380 Development Platform with the tools provided, one of the Processor Daughter Cards (PDC) needs to be properly configured and plugged in. The hardware test will only work if the PDC is plugged in.
Installing To install the AT43DK380: AT43DK380 and 1. Insert the “Atmel AT43DK380” CD into the CD-ROM drive of the PC or notebook, Starting Up the double-click on the MSI file and follow the instructions. USB Clinic 2. After installation, the AT43USB380 documents, firmware, and software should be installed on the C:\Program Files\ATMEL USB\AT43DK380_Date, if the default installation directory is used.
Hardware AT43DK380 Development Platform connection. Prior to going to the Connection menu, please make sure that the AT43DK380 is physically connected to the PC with the sup- plied serial cable or any standard serial cable. Figure 2-3. USB Clinic - Connection AT43DK380 USB Host/Function Dev.
Page 12
AT43DK380 Development Platform, 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 AT43DK380 firmware revision to see if it sup- ports the current USB Clinic version.
Section 3 Hardware Description The AT43DK380 Development Platform comes pre-configured as a USB Host in Flash (Standalone) mode. Alternative settings are available through jumper configurations. This section gives the basic description about the hardware components and the jumper settings of the AT43DK380 Development Platforms.
ROM 0 Processor Interface Connector (JP9) 3.1.1 AT43DK380 The AT43DK380 Main Development Platform provides a generic processor interface to Processor Interface allow a wide variety of processors to communicate with the on-board RAM, ROM and Connector the AT43USB380 USB Host. The pin assignments and descriptions for the connectors are as follows: Table 3-1.
Page 15
Interrupt Request AT43DK380 NRESET System Reset, Active Low (Main Development Platform and PDCs) NWAKEUP System Processor AT43USB380 Wake-Up request from Suspend Mode 11, 12, 21, 22, Power: Ground 31, 32, 41, 42 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 16
Chip Select 1. Active Low nCS2 System Processor Chip Select 2. Active Low nCS3 System Processor Chip Select 3. Active Low PCLK System Processor Processor Clock EXTRA3 CPLD Unused signal to/from CPLD No Connect AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
3.1.2 Jumper Settings The AT43DK380 Main Development Platform supports two modes of operation, Host Mode or On-The-Go (OTG) Mode. Host Mode is the default setting. In Host Mode, the AT43USB380 USB root port is directly connected to a 4-Port USB Hub (AT43301).
Page 18
For 32-bit mode, the upper 16 data bits are connected to the system. The AT43DK380 Main Development Platform's JP2 and JP3 can be used to connect the upper 16 bits to the system or left floating to match the bus width requirements of the system processor.
GPIOs are tied to JP6 for monitoring the ARM processor. In addition, the AT43DC380-PDC1 Processor Daughter Card provides the footprint for a MII connector (J2) if a network connection is required. Communication to the AT43DK380 Main Devel- opment Platform is established through a proprietary interface. Section 9 of this User Guide contains the complete AT43DK380-PDC1 schematics and bill of material.
® processor, with JTAG accessibility (J1). Six GPIO pins from the AT91R40008 processor are tied to a connection header for interfacing with the AT43DK380 Main Development Platform, and sixteen GPIO pins (with some overlap to the six GPIO pins mentioned) are tied to JP4 for monitoring the AT91R40008 processor. Communication to the AT43DK380 Main Development Platform is established through a proprietary interface.
Connection 1. Take all safety and electrostatic precautions. 2. Mate together the connectors with labels JP1 and JP2 on the AT43DK380- PDCx-xx to JP9 and JP10 on the AT43DK380 Main Development Platform respectively. If proper connection is established, the Atmel logos on both the AT43DK380-PDCx-xx and the AT43DK380 Main Development Platform have the same orientation.
Page 22
Hardware Description 3-10 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
2.0 in order to obtain the correct response from the USB Clinic and the AT43USB380 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.
From the Main Menu, the Connection button allows testing of the RS-232 serial port and the AT43DK380 Development Platform connection. Prior to go to the Connection menu, please make sure that the AT43DK380 is physically connected to the PC with the supplied serial cable.
COM port. To verify connectivity between the selected COM port and the AT43DK380 Development Platform, click on Test Connectivity with Target and look for Connection verified in the Output Window. The Test Connectivity with Target also checks the AT43DK380 firmware revision and its USB Clinic application code revision. 4.3.2...
Page 26
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 AT43DK380 Development Platform will not erase the firm- ware from the ARM's memory space.
(left to right, and top to bottom). Please note that the available memory address in the AT43DK380 Development Platform ranges up to 0x3FFFFFFF. The user will not be able to read or write to memory addresses beyond this limit.
USB device. A target USB device is defined as one of the USB devices connected to the AT43DK380 Development Platform. 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 AT43DK380 Host.
Address stage to Configured state. The enumeration is done by the AT43DK380 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’...
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. AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
“USBP_H_CustomTransfer() API” of the “AT43USB380 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 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
7, and is assigned by the enumeration timing order in which a device is connected to the AT43DK380 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 “AT43USB380 Software Development Guide for Host Mode”.
Page 34
USB Clinic connection between the AT43DK380 Development Platform 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.
Intel 32-bit Hex file that is used by the USB Clinic that downloads the firmware to run on the AT43DK380 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.
Building Firmware for the AT43DK380 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 37
Building Firmware for the AT43DK380 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.
Building Firmware for the AT43DK380 Development Kit c. 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.
Building Firmware for the AT43DK380 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 40
Building Firmware for the AT43DK380 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 41
Building Firmware for the AT43DK380 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.
Building Firmware for the AT43DK380 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 an EG.c file.
Page 43
Building Firmware for the AT43DK380 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 44
Building Firmware for the AT43DK380 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 45
Building Firmware for the AT43DK380 Development Kit Figure 5-11. User Program Output Directory AT43DK380 USB Host/Function Dev. Kit User Guide 5-11 3485A–USB–7/04...
Page 46
Building Firmware for the AT43DK380 Development Kit 5-12 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
5. Once the hex file is created, open the hex file in a text editor. In the hex file there is a 16-bit address that can Max address 16-KB space. Since we're splitting this AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 48
Click on the [Split 4] button Figure 6-2. Hex2Vcx GUI 8. There is a bug on the AT43DK380 Main Development such that the Flash data bits are reversed. As a workaround, the user would need to reverse the hex file bits before programing them onto Flash.
1. In ADS go to DebugRel > Linker > ARM Linker > Options Flash Mode from 2. Under Image entry point specify address 0x0 (see Figure 7-1) ICE Mode Figure 7-1. DebugRel Settings Window AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 50
6. Add assembly constant: FLASH and click Apply (see Figure 7-2) Figure 7-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 7-3) AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
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. AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
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. AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
F o r t e c h n i c a l s u p p o r t , p l e a s e f i l l o u t t h e C u s t o m e r S u p p o r t F o r m a t http://www.atmel.com/products/USB/Forms/USB-support.asp. AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 54
Technical Support AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Section 9 Appendices AT43DK380 Schematics 9.1.1 AT43DK380 Main Development Platform Schematics AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 56
Appendices AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 57
Appendices AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 58
Appendices AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 59
Appendices AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Appendices AT43DK380 Main Development Platform CPLD VHDL Code Ref. LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; --USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY AT43USB380 is PORT(-- PCLK: IN STD_LOGIC; --not used. nRD: IN STD_LOGIC; -- nRESET: IN STD_LOGIC; --not used. -- nCS3: IN STD_LOGIC; --not used. nCS2: IN STD_LOGIC;...
Page 68
WHEN BWIDTH1 = '1' ELSE '1'; -- 32 Bit nCWE2 <= nWBE0 WHEN (BWIDTH1 = '0' AND BWIDTH0 = '0' AND A1 = '1' AND A0 = '0') ELSE -- 8 Bit 9-14 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 69
AND A1 = '0') ELSE -- 16 Bit nRD WHEN BWIDTH1 = '1' ELSE -- 32 Bit nRD WHEN nCS2 = '0' ELSE '1'; nH380_CS <= nCS2; nSRAM_CS <= nCS1; nFLASH_CS <= nCS0; BEHAVIOR; AT43DK380 USB Host/Function Dev. Kit User Guide 9-15 3485A–USB–7/04...
Page 70
Appendices 9-16 AT43DK380 USB Host/Function Dev. Kit User Guide 3485A–USB–7/04...
Page 71
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.