Oki JOB60851 user manual Packets, Endpoints, lists the USB packet types

Page 40

Chapter 4 Software Development

Figure 4.1.2. Two USB Transactions

All bus transactions begin with a token packet from the host. Devices never initiate data transfers on their own.

The host controller is in charge of scheduling all traffic on the bus. It schedules the appropriate transactions for the four data flow types at 1-ms intervals, which the USB documentation calls frames.

Token packet types include data request (IN), data transfer notification (OUT), and command transfer notification (SETUP).

4-1-6. Packets

A packet is a continuous bit stream starting with the synchronization pattern and flowing in one direction.

Table 4.1.3. lists the USB packet types.

PID Type

PID Name

Transmitter

Description

Token

OUT

Host

Data transfer notification

 

IN

Host

Data request

 

SOF

Host

Start of frame

 

SETUP

Host

Data transfer notification for control pipe

 

 

 

 

Data

DATA0

Host/Device

Data packet PID even

 

DATA1

Host/Device

Data packet PID odd

 

 

 

 

Handshake

ACK

Host/Device

Receiver accepts error-free packet

 

NAK

Device

Transmitter cannot send data

 

 

 

Receiver cannot accept data

 

STALL

Device

Control pipe request not supported

 

 

 

Endpoint halted

 

 

 

 

Special

PRE

Host

Preamble enabling downstream bus traffic to low-speed devices

 

 

 

 

4-1-7. Endpoints

The USB provides separate logical communication flows, called pipes, between the host and a USB function. The function end of a pipe is called the endpoint. This endpoint must provide buffer space (FIFO) capable of holding at least one data packet (a.k.a. the maximum payload size).

Endpoints and pipes are characterized, at creation, by the direction (from or to host) and by the data flow type (control, bulk, interrupt, or isochronous). There are provisions for up to 16 pipes in each direction, for a total of 32 endpoints per function. The token packet that the host transmits to initiate a transaction specifies the endpoint buffer with the endpoint address made up of the device address and the endpoint number.

USB device controller capacity is expressed by the number of endpoints it has and such endpoint specifications as supported data flow types and endpoint buffer sizes. Examining these endpoint specifications thus reveals whether the USB device controller is suitable for the intended application.

page 4-5

Image 40
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 Use only the specified voltage Do not pile objects on top of the productUse only the cables and other accessories provided Notation Putting Board through Its Paces Configuring JOB60851 Board SetupPutting Board through its Paces Installing Development Software Running Default Program Connecting BoardInstalling USB Driver Running Flash Memory ProgramUse the -u command line option to view the USB pipe numbers Running User Programs Connecting Serial Cable Loading Terminal EmulatorSynchronizing Link Downloading and ExecutingOverwriting Flash Memory Contents System Specifications System Specifications System ComponentsSystem Objective System ComponentsConnectors and Switches Hardware SpecificationUse only the AC adapter included with the product System Specifications Circuit Diagram 2. Circuit Diagram 1/2System Specifications Parts List 1. Parts List 1/24. Memory Map for Download Mode Memory Maps5. 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 System Specifications 1. MSM66Q573 Pin Assignments 2/2 P11-3/XTOUTSoftware Development Bus Topology, Addresses, and Hot Plugging USB Basics Software Development Specification Documents Core SpecificationsBus Transactions Data Flow Types2. USB Data Flow Types Endpoints Packets3. lists the USB packet types Device Class Specifications 5. USB Device Class SpecificationsData Rates 4. Maximum Payload SizesDevice Requests Standard Device Requests6. Device Request Types 7. Control Transfer Data PacketDevice Descriptors Device Descriptor for Bidirectional PrinterString descriptor Setup Sample Firmware SpecificationsSample 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 Simple Debugging Evaluating USB EquipmentDevice Controller Specifications 1. ML60851C SpecificationsUSB Bits and Pieces Overview of ML60851C OperationConnecting Microcontroller to USB Controller 1. ML60851C Block DiagramSpecial USB Considerations 2. Microcontroller with 16- or 32-Bit BusVendor and Product IDs Building a ProductOther Tools Necessary Products Limitations Port 7 LED2 Control Port 7 RegistersChanging LED2 Color Sample Port 7 Control Program Standard I/O over Serial Link JOB60851 Board Standard I/OSerial Port 2. Serial Port StructureSerial port SIO0 Chapter Internal timer 9 and following Read and write Functions 3. read Operation4. write Operation Sample Program Using Standard Output Standard I/O ExamplesSample Program Using Standard Input Debugging with Standard I/O