Universal Serial Bus (USB)
18-28
Am186™CC/CH/CU Microcontrollers User’s Manual
18.5.10
Command Protocol
As a slave device, the Am186CC or Am186CU microcontroller must always be prepared
to let the USB master send a new SETUP packet. In other words, software could be
processing a command, and the host could send a new command without warning. The
software should stop working on the old command and deal with the new one immediately.
In practice, it is impossible to arbitrarily stop a program at any point like this. For example,
the software could have been writing out a response to the previous command, and stopping
it at a precise moment is very difficult.
The NEW_COMMAND interlock bit allows the hardware to ignore the software during time
periods when the software is still in the middle of processing a previous command.
During processing of a command, the ACT_REQ bit is “politely” bounced back and forth
between hardware and software. For setup and control write packets (data from the host),
hardware sets the ACT_REQ bit to indicate that the host has filled the FIFO. software then
clears the ACT_REQ bit to indicate that it has drained the FIFO. For control read packets,
Table 18-6
USB Commands Handled by USB Peripheral Controller Hardware
Command
Parameters and
Data Passed
Data
Direction
Results
SET_ADDRESS
Device’s USB address
OUT
Device stores the address assigned to it by the
USB host.
SET_FEATURE
Device Remote Wake-up,
or Endpoint Stall
OUT
The device’s remote wake up feature is enabled
(or)
A particular endpoint is forced to be stalled. If
the specified endpoint is not configured, the
device returns the stalled handshake to the host
during the status stage.
CLEAR_FEATURE
Device Remote Wake-up,
or Endpoint Stall
OUT
The device’s remote wake-up feature is
disabled (or)
A particular endpoint is forced to be un-stalled.
If the specified endpoint is not configured, the
device returns the stalled handshake to the host
during the status stage.
GET_STATUS
Device Self Powered,
Device Remote Wake-up,
or Endpoint Stall Status
IN
The device’s programmable Self Powered bit is
returned to the USB host as a value of 1 or 0,
indicating that the device is self-powered or
bus-powered.
The Remote Wake up bit is returned with a
value that depends on whether the remote
wake up feature was last set or cleared.
A particular endpoint’s stall status is returned
to the USB host. If the specified endpoint is not
configured, the device returns the stalled
handshake to the host during the status stage.
GET_CONFIGURATION
Device’s current
configuration
IN
The current device configuration number is
returned to the USB host.
GET_INTERFACE
Interface’s current
selected alternate setting
IN
The currently selected alternate setting for the
interface number that is specified in this
command is returned to the USB host. If the
specified interface is not present, the device
returns the stalled handshake to the host during
the status stage.
Summary of Contents for Am186 CC
Page 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Page 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Page 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Page 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Page 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Page 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Page 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Page 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Page 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Page 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Page 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Page 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Page 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...