English
Language : 

MC68HC908JW32_09 Datasheet, PDF (151/232 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
USB Module Architecture
11.3.4.1 Configuration Process
All USB devices must be configured before used. The host will configure the device according to the
configuration process defined by the USB specification 2.0 Chapter 9. During the process most of the
USB commands issued by the host are responded automatically except GET_DESCRIPTOR,
SYNC_FRAME, vendor specific and class specific commands where user interaction is required. These
are known as the user commands. The number of configurations and interfaces supported is limited by
the module. This module can support a single configuration and maximum of two interfaces. No alternate
setting is allowed.
Upon the reception of the user commands, no module level decoding is done instead user is notified by
the SETUP flag and TFRC_OUT flag. User can then decode the command through the dedicated 8-byte
endpoint 0 buffer. For instance, when a valid GET_DESCRIPTOR command is detected, user is notified
by the SETUP, TFRC_OUT flag and DVALID_OUT flag. User should decode the command via the 8-byte
endpoint 0 OUT buffer. Corresponding return descriptor is written to the endpoint 0 IN buffer 8 bytes at a
time. By setting the DVALID_IN bit, the data is sent to the host in the next IN packet. Otherwise, the
module will return NAK to all IN packet. If ACK is not returned from the host, the data is re-sent
automatically in the next IN packet until ACK is returned from the host, then transfer complete flag
TFRC_IN is set, the next 8 bytes of data can be written to the endpoint 0 IN buffer. The process continues
until the requested descriptor is sent completely.
NOTE
Please note the module will return ACK to all valid SETUP packet. No
software attention is required.
Endpoint 0 buffer and endpoint 0 data size register (DSIZE) will be updated
on every incoming SETUP packet. However, SETUP or TFRC_OUT will
not be set unless the SETUP packet is a valid GET_DESCRIPTOR,
SYNC_FRAME or class/vendor specific SETUP command.
11.3.4.2 Control Endpoint 0
Endpoint 0 is always treated as control endpoint. It has eight bytes dedicated buffer for device transmit
(IN packet) and eight bytes dedicated buffer for device receive (OUT packet). Most of the host requests
is handled by the requestor processor excepts the class/vendor specified request, GET_DESCRIPTOR
request and the SYNC_FRAME request. If the user is notified by the module about the arrival of such
requests, user can decode the request command by reading the endpoint 0 data register.
The SETUP flag will be set if the 8-byte setup packet is received without CRC/Token/EOP error for
Vendor/Class/SetDescriptor/SynchFrame commands only.
NOTE
For any OUT data received in the 8-byte endpoint OUT buffer, they are only
valid until the start of any SETUP packet addressed to the device, even if
the packet is corrupted the 8-byte OUT buffer may still be overwritten by
this new SETUP packet. There is no indication of the corruption built into
this module.
11.3.5 Endpoint Controller
The module has four independent endpoint controllers that managed the data transfer between CPU and
the USB host. Each of these endpoint can be configured to either one of the two modes - bulk or interrupt.
MC68HC908JW32 Data Sheet, Rev. 6
Freescale Semiconductor
151