CP3BT26

18.0 USB Controller

The CR16 USB node is an integrated USB node controller that features enhanced DMA support with many automatic data handling features. It is compatible with USB specifica- tion versions 1.0 and 1.1.

It integrates the required USB transceiver, a Serial Interface Engine (SIE), and USB endpoint (EP) FIFOs. Seven end- point pipes are supported: one for the mandatory control endpoint and six to support interrupt, bulk, and isochronous endpoints. Each endpoint pipe has a dedicated FIFO, 8 bytes for the control endpoint and 64 bytes for the other end- points.

18.1FUNCTIONAL STATES

18.1.1Line Condition Detection

At any given time, the CR16 USB node is in one of the fol- lowing states

Table 38 State Descriptions

State

Descriptions

 

 

 

 

NodeOperational

Normal operation

 

 

NodeSuspend

Device operation suspend due to

 

USB inactivity

 

 

NodeResume

Device wake-up from suspended

 

state

 

 

NodeReset

Device reset

 

 

The NodeSuspend, NodeResume, or NodeReset line con- dition causes a transition from one operating state to anoth- er. These conditions are detected by specialized hardware and reported in the Alternate Event (ALTEV) register. If in- terrupts are enabled, an interrupt is generated on the occur- rence of any of the specified conditions.

In addition to the dedicated input to the ICU for generating interrupts on these USB state changes, a wake-up signal is sent to the MIWU (see Section 13.0) when any activity is de- tected on the USB, if the bus was in the Idle state and the USB node is in the NodeSuspend state. The MIWU can be programmed to generate an edge-triggered interrupt when this occurs.

NodeOperational

This is the normal operating state of the node. In this state, the node is configured for operation on the USB.

NodeSuspend

A USB node is expected to enter NodeSuspend state when 3 ms have elapsed without any detectable bus activity. The CR16 USB node looks for this event and signals it by setting the SD3 bit in the ALTEV register, which causes an inter- rupt, to be generated (if enabled). Software should respond by putting the CR16 USB node in the NodeSuspend state.

The CR16 USB node can resume normal operation under software control in response to a local event in the device. It can wake up the USB bus via a NodeResume, or when de- tecting a resume command on the USB bus, which signals an interrupt to the CPU.

NodeResume

If the host has enabled remote wake-ups from the node, the CR16 USB node can initiate a remote wake-up.

Once software detects the event, which wakes up the bus, it releases the CR16 USB node from NodeSuspend state by initiating a NodeResume on the USB using the NFSR reg- ister. The node software must ensure at least 5 ms of Idle on the USB. While in NodeResume state, a constant “K” is signalled on the USB. This should last for at least 1 ms and no more than 5 ms, after which the USB host should contin- ue sending the NodeResume signal for at least an addition- al 20 ms, and then completes the NodeResume operation by issuing the End Of Packet (EOP) sequence.

To successfully detect the EOP, software must enter the USB NodeOperational state by setting the NFSR register.

If no EOP is received from the host within 100 ms, software must re-initiate NodeResume.

NodeReset

When detecting a NodeResume or NodeReset signal while in NodeSuspend state, the CR16 USB node can signal this to the CPU by generating an interrupt.

USB specifications require that a device must be ready to respond to USB tokens within 10 ms after wake-up or reset.

www.national.com

90

Page 90
Image 90
National CP3BT26 manual USB Controller, Functional States