Oki JOB60851 USB Basics, Bus Topology, Addresses, and Hot Plugging, Software Development

Page 37

Chapter 4 Software Development

Section 4-1. "USB Basics" provides an overview of the Universal Serial Bus (USB) specifications as well as URLs for obtaining detailed specifications.

Section 4-2. "Sample USB Firmware" provides a functional overview of the sample device firmware shipped with the JOB60851 Starter Kit and procedures for modifying the source code and evaluating the result.

Section 4-3. "USB Bits and Pieces" covers device controller specifications, device controller operational overview, notes to device developers. etc.

Sections 4-4. "Port 7 LED2 Control" and 4.5 "Standard I/O over Serial Link" give procedures for modifying the sample source code for simple debugging with the JOB60851 board. They cover both procedures controlling the onboard LED2 and those using standard I/O library functions (printf(), scanf(), etc.) over the serial link to a terminal emulator.

4-1. USB Basics

4-1-1. Bus Topology, Addresses, and Hot Plugging

The Universal Serial Bus (USB) features a tiered star topology with a single host controller (a.k.a. root or Tier 0 hub) at the top of a device tree consisting of functions branching off hubs(a.k.a. repeaters).

A tree has up to 127 such devices (hubs and functions) with addresses 1 to 127. The address 0 is reserved for use as the default control address that USB devices use when they are first powered on or reset. Requests from the host controller use this default address to determine the structure of this new device and assign it an address. This highly flexible arrangement holds the key to hot plugging (a.k.a. dynamic insertion and removal).

HOST

HOST

CONTROLLER

CONTROLLER

ROOT HUB

ROOT HUB

HUB

HUB

DEVICE

HUB

DEVICE

 

HUB

HUB

HUB

DEVICE

DEVICE

DEVICE

DEVICE

DEVICE

DEVICE

DEVICE

DEVICE

Figure 4.1.1. Bus Topology

The tree can chain hubs to produce up to five tiers. Cables between hubs or between a hub and a device can be up to five meters long. To prevent the formation of illegal loopback connections at hubs, the downstream ports on the root and other hubs use a connector (Series A) mechanically different from those on the upstream ports on devices (Series B).

The JOB60851 board is for developing devices, not hubs, so features a Series B connector for connection to the Series A one on the root or other hub.

page 4-2

Image 37
Contents JOB60851 Starter Kit Page OKI Contents Software Development Port 7 LED2 Control Introduction Introduction Checking Packing List1. Packing List Host Environment Labels Precaution for Safe and Proper UseIcons 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 Configuring JOB60851 Board SetupPutting 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 ComponentsConnectors and Switches Hardware SpecificationUse 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 Resources Uses System Limitations1. MSM66Q573 Pin Assignments 1/2 P11-3/XTOUT System Specifications 1. MSM66Q573 Pin Assignments 2/2Software Development Bus Topology, Addresses, and Hot Plugging USB BasicsSoftware Development Core Specifications Specification DocumentsBus Transactions Data Flow Types2. USB Data Flow Types Endpoints Packets3. 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 FirmwareCompiling and Executing Sample USB Firmware Sample USB Host SoftwareConfirming 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 ConsiderationsVendor and Product IDs Building a ProductOther 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