Oki JOB60851 user manual Sample USB Firmware, Setup, Sample Firmware Specifications

Page 45

Chapter 4 Software Development

4-2. Sample USB Firmware

The JOB60851 Starter Kit includes the complete source code for use as the starting point for the user USB firmware. To see the effects of user modifications on behavior, edit the source code, compile it, link it into an executable .HEX file, and then download and execute this file with the procedure in Section 2.3 "Running User Programs."

This Section outlines the entire cycle.

4-2-1. Setup

Copy the file M851xxxx.exe from the \Usb_firm directory on the CD-ROM to a work directory-- c:\work in our example. This file is a self-expanding archive that automatically extracts the sample source code to the appropriate subdirectories shown in Table 4.2.1.

After executing this file in the work directory, open Readme.txt. This text file lists the contents of the archive. Be sure to read the disclaimer section about rights to the source code.

Table 4.2.1. Sample USB Firmware

\Work

Compiler work directory

 

 

\Include

Include files

 

 

 

 

\Src

Source files (shared files)

 

 

\66573

cc665s source code for 16-bit MSM66573 microcontrollers

 

 

 

 

 

 

 

\Arm

ARM-SDT source code for 32-bit ARM microcontrollers

 

 

 

 

 

 

\Err

cc665s assembler error output directory

 

 

 

 

\Lst

cc665s assembler listing file output directory

 

 

 

 

\Debug

ARM-SDT debugging code output directory

 

 

 

 

\Release

ARM-SDT release code output directory

 

 

 

 

\traffic

Sample data for use with the Computer Access Technology

 

 

 

 

 

Corporation (CATC) USB evaluation system.

 

 

 

 

 

 

4-2-2. Sample Firmware Specifications

The source code on the CD-ROM produces the sample USB firmware shipped in the MSM66Q573 Flash memory. This firmware is perfectly general code that provides the standard device request support and standard descriptors required by the USB core specifications. It does not assume any particular application. It supports the three data flow types (control, bulk, and interrupt) offered by ML60851 USB controllers.

For the detailed specifications of this sample USB firmware, refer to the text file M852.txt accompanying it in the work directory. Note that the source code supports both ML60851 and ML60852 USB controllers and that M852.txt covers the 32-bit ARM microcontroller as well as these two devices. Read only the sections applicable to the ML60851C USB controller and the 16- bit MSM66Q573 microcontroller.

n Note n

As of August 1999, operation has been confirmed only for the MSM66Q573 plus ML60851C combination. The ARM code is a preliminary version that does not compile.

page 4-10

Image 45
Contents JOB60851 Starter Kit Page OKI Contents Software Development Port 7 LED2 Control Introduction Checking Packing List Introduction1. Packing List Host Environment Precaution for Safe and Proper Use LabelsIcons Do not pile objects on top of the product Use only the specified voltageUse only the cables and other accessories provided Notation Putting Board through Its Paces Setup Configuring JOB60851 BoardPutting Board through its Paces Installing Development Software Connecting Board Running Default ProgramInstalling USB Driver Running Flash Memory ProgramUse the -u command line option to view the USB pipe numbers Running User Programs Loading Terminal Emulator Connecting Serial CableDownloading and Executing Synchronizing LinkOverwriting Flash Memory Contents System Specifications System Components System SpecificationsSystem Objective System ComponentsHardware Specification Connectors and SwitchesUse only the AC adapter included with the product System Specifications 2. Circuit Diagram 1/2 Circuit DiagramSystem Specifications 1. Parts List 1/2 Parts ListMemory Maps 4. Memory Map for Download Mode5. Memory Map for Flash Execution Mode 6. Memory Map for Application Mode 7. Memory Map for Flash Rewrite Mode System Limitations Resources Uses1. MSM66Q573 Pin Assignments 1/2 P11-3/XTOUT System Specifications 1. MSM66Q573 Pin Assignments 2/2Software Development USB Basics Bus Topology, Addresses, and Hot PluggingSoftware Development Core Specifications Specification DocumentsData Flow Types Bus Transactions2. USB Data Flow Types Packets Endpoints3. lists the USB packet types 5. USB Device Class Specifications Device Class SpecificationsData Rates 4. Maximum Payload SizesStandard Device Requests Device Requests6. Device Request Types 7. Control Transfer Data PacketDevice Descriptor for Bidirectional Printer Device DescriptorsString descriptor Sample Firmware Specifications SetupSample USB Firmware 1. Sample USB FirmwareSample USB Host Software Compiling and Executing Sample USB FirmwareConfirming USB Compliance with Usbcheck.exe Software Development Creating USB Mouse Demo Modifying Application Layer Receive Only Skeleton Evaluating USB Equipment Simple Debugging1. ML60851C Specifications Device Controller SpecificationsUSB Bits and Pieces Overview of ML60851C Operation1. ML60851C Block Diagram Connecting Microcontroller to USB Controller2. Microcontroller with 16- or 32-Bit Bus Special USB ConsiderationsBuilding a Product Vendor and Product IDsOther Tools Necessary Products Limitations Port 7 Registers Port 7 LED2 ControlChanging LED2 Color Sample Port 7 Control Program JOB60851 Board Standard I/O Standard I/O over Serial Link2. Serial Port Structure Serial PortSerial port SIO0 Chapter Internal timer 9 and following 3. read Operation Read and write Functions4. write Operation Standard I/O Examples Sample Program Using Standard OutputDebugging with Standard I/O Sample Program Using Standard Input