USBN9603/USBN9604 Universal Serial Bus
Full Speed Node Controller with Enhanced DMA Support
USBN9603/USBN9604 Universal Serial Bus Full Speed Node Controller with Enhanced DMA Support
General Description
The USBN9603/4 are integrated, USB Node controllers.
Other than the reset mechanism for the clock generation circuit, these two devices are identical. All references to “the
device” in this document refer to both devices, unless otherwise noted.
The device provides enhanced DMA support with many automatic data handling features. It is compatible with USB
specification versions 1.0 and 1.1, and is an advanced version of the USBN9602.
The device integrates the required USB transceiver with a
3.3V regulator, a Serial Interface Engine (SIE), USB endpoint (EP) FIFOs, a versatile 8-bit parallel interface, a clock
generator and a MICROWIRE/PLUS™ interface. Seven
endpoint 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
endpoints. The 8-bit parallel interface supports multiplexed
and non-multiplexed style CPU address/data buses. A programmable interrupt output scheme allows device configuration for different interrupt signaling requirements.
Block Diagram
CS RDWR
A0/ALE D7-0/AD7-0
Outstanding Features
●
Low EMI, low standby current, 24 MHz oscillator
●
Advanced DMA mechanism
●
Fully static HALT mode with asynchronous wake-up
for bus powered operation
●
5V or 3.3V operation
●
Improved input range 3.3V signal voltage regulator
●
All unidirectional FIFOs are 64 bytes
●
Power-up reset and startup delay counter simplify system design
●
Simple programming model controlled by external controller
●
Available in two packages
— USBN9603/4SLB: small footprint for new designs
and portable applications
— USBN9603/4-28M: standard package, pin-to-pin
compatible with USBN9602-28M
INTR
MODE1-0
Microcontroller Interface
Endpoint/Control FIFOs
Serial Interface Engine (SIE)
Media Access Controller (MAC)
Physical Layer Interface (PHY)
Transceiver
D+D-
National Semiconductor is a registered trademark of National Semiconductor Corporation.
All other brand or product names are trademarks or registered trademarks of their respective holders.
1.0 Signal/Pin Connection and Description (Continued)
1.2 DETAILED SIGNAL/PIN DESCRIPTIONS
1.2.1Power Supply
I/ONameDescription
NAVccDigital Power Supply (V
level as GND and then raised to the required V
to be set to their reset values, the clock generator to be reset and stalls the CLKOUT output for
14
2
XIN clock cycles. During this time, no internal register is accessible.
NAGNDDigital Power Supply (GND)
NAAGND Analog Power Supply (AGND)
). Power-on reset is detected when the input voltage is at the same
CC
level. The power-on reset causes all registers
cc
USBN9603/USBN9604
NAV3.3Transceiver 3.3V Voltage Supply. This pin can be used as the internal 3.3V voltage regulator
output. The regulator is intended to power only the internal transceiver and one external pull-up.
An external 1 µF de-coupling capacitor is required on this pin. The voltage regulator output is disabled upon reset. When the internal voltage regulator is left disabled, this pin must be used as a
3.3V supply input for the internal transceiver. This is the case during 3.3V operation.
1.2.2Oscillator, Clock and Reset
I/ONameDescription
NAXINCrystal Oscillator Input. Input for internal 24 MHz crystal oscillator circuit. A 24 MHz funda-
mental crystal may be used.
NAXOUTCrystal Oscillator Output
OCLKOUT Clock Output. This programmable clock output may be disabled and configured for different
speeds via the Clock Configuration register. After a power-on reset and hardware reset (assertion of
In the USBN9604, a hardware reset causes CLKOUT to stall for 2
RESET), a4 MHz clock signal is output (there may be an initial phase discontinuity).
14
XIN clock cycles while the
internal DLL is synchronized to the external reference clock.
IRESETReset. Activelow, assertion of RESETindicates a hardware reset, which causes all registers
in the device to revert to their reset values.
In the USBN9604, the hardware reset action is identical to a power-on reset. Signalconditioning is provided on this input to allow use of a simple, RC power-on reset circuit.
Oscillator Circuit
The XIN and XOUT pins may be connected to make a 24 MHz closed-loop, crystal-controlled oscillator. Alternately, an external 24 MHz clock source may be used as the input clock for the device. The internal crystal oscillator uses a 24 MHz
fundamental crystal. See Table 1 for typical component values and Figure 1 for the crystal circuit. For a specific crystal,
please consult the manufacturer for recommended component values.
If an external clock source is used, it is connected to XIN. XOUT should remain unconnected. Stray capacitance and inductance should be kept as low as possible in the oscillator circuit. Trace lengths should be minimized by positioning the crystal
and external components as close as possible to the XIN and XOUT pins.
Maximum Serial Resistance50 Ω
Maximum Shunt Capacitance10 pF
Load Capacitance20 pF
Resistor R1
1MΩ±5%
7
www.national.com
1.0 Signal/Pin Connection and Description (Continued)
ComponentParametersValuesTolerance
Resistor R2
Capacitor C1
Capacitor C2
USBN9603/USBN9604
External Elements
0ΝΑ
15 pF±20%
15 pF±20%
Choose C1 and C2 capacitors (see Figure 1) to match the crystal’s load capacitance. The load capacitance C
the crystal is comprised of C1 in series with C2, and in parallel with the parasitic capacitance of the circuit. The parasitic
capacitance is caused by the chip package, board layout and socket (if any), and can vary from 0 to 8 pF. The rule of thumb
in choosing these capacitors is:
= (C1*C2)/(C1+C2)+C Parasitic
C
L
XIN
XTAL
C1
R1
XOUT
C2
R2
Figure 1. Typical Oscillator Circuit
“seen” by
L
1.2.3USB Port
I/ONameDescription
I/OD+USB D+ Upstream Port. This pin requires an external 1.5k pull-up to 3.3V to signal full speed
operation.
I/OD–USB D– Upstream Port
1.2.4Microprocessor Interface
I/ONameDescription
IMODE1-0 Interface Mode. Each of these pins should be hard-wired to V
Note: Mode 3 also selects the MICROWIRE interface mode in the USBN9602, but this mode
should be reserved to preserve compatibility with future devices.
I
DACKDMAAcknowledge. This active low signal is only used if DMA is enabled. If DMA is not used,
this pin must be tied to V
CC
.
ODRQDMA Request. This pin is used for DMA request only if DMA is enabled.
OINTRInterrupt. The interrupt signal modes (active high, active low or open drain) can be config-
ured via the Main Control register. During reset, this signal is TRI-STATE
I
I
CSChip Select. Active low chip select
RDRead. Active low read strobe, parallel interface
.
www.national.com
8
1.0 Signal/Pin Connection and Description (Continued)
IWRWrite. Active low write strobe, parallel interface
SKMICROWIRE Shift Clock. Mode 2
IA0A0 Address Bus Line. Mode 0, parallel interface
The device is a Universal Serial Bus (USB) Node controller compatible with USB Specification, 1.0 and 1.1. It integrates onto
a single IC the required USB transceiver with a 3.3V regulator, the Serial Interface Engine (SIE), USB endpoint FIFOs, a
versatile (8-bit parallel or serial) interface and a clock generator. A total of seven endpoint pipes are supported: one bidirectional for the mandatory control EP0 and an additional six for unidirectional endpoints to support USB interrupt, bulk and
isochronous data transfers. The 8-bit parallel interface supports multiplexed and non-multiplexed style CPU address/data
buses. The synchronous serial MICROWIRE interface allows adapting to CPUs without external address/data buses. A programmable interrupt output scheme allows adapting to different interrupt signaling requirements.
Refer to Figure 2 for the major functional blocks, described in the following sections.
2.1 TRANSCEIVER
USBN9603/USBN9604
The device contains a high-speed transceiver which consists of three main functional blocks:
— Differential receiver
— Single-ended receiver with on-chip voltage reference
— Transmitter with on-chip current source.
This transceiver meets the performance requirements described in Chapter 7 of the USB Specification, Version 1.1.
To minimize signal skew, the differential output swings of the transmitter are well balanced. Slew-rate control is used on the
driver to minimize radiated noise and crosstalk. The drivers support TRI-STATE operation to allow bidirectional, half-duplex
operation of the transceiver.
The differential receiver operates over the complete common mode range, and has a delay guaranteed to be larger than
that of the single-ended receivers. This avoids potential glitches in the Serial Interface Engine (SIE) after single-ended zeros.
Single-ended receivers are present on each of the two data lines. These are required, in addition to the differential receiver, to
detect an absolute voltage with a switching threshold between 0.8V and 2.0V (TTL inputs). To increase V
glitching, a voltage reference sets the single-ended switching reference. An external 1.5 ± 5% KΩ resistor is required on D+ to
indicate that this is a high-speed node. This resistor should be tied to a voltage source between 3.0V and 3.6V, and referenced
to the local ground, such as the output provided on pin V3.3.
rejection, without
cc
2.2 VOLTAGE REGULATOR (VREG)
The voltage regulator provides 3.3V for the integrated transceiver from 5.0V device power or USB bus power. This output
can be used to supply power to the 1.5 KΩ pull-up resistor. This output must be decoupled with a 1 µF tantalum capacitor
to ground. It can be disabled under software control to allow using the device in a 3.3V system.
2.3 SERIAL INTERFACE ENGINE (SIE)
The SIE is comprised of physical (PHY) and Media Access Controller (MAC) modules. The PHY module includes the digitalclock recovery circuit, a digital glitch filter, End Of Packet (EOP) detection circuitry, and bit stuffing and unstuffing logic. The
MAC module includes packet formatting, CRC generation and checking, and endpoint address detection. It provides the
necessary control to give the NAK, ACK and STALL responses as determined by the Endpoint Pipe Controller (EPC) for the
specified endpoint pipe. The SIE is also responsible for detecting and reporting USB-specific events, such as NodeReset,
NodeSuspend and NodeResume. The module output signals to the transceiver are well matched (under 1 nS) to minimize
skew on the USB signals.
The USB specifications assign bit stuffing and unstuffing as the method to ensure adequate electrical transitions on the line
to enable clock recovery at the receiving end. The bit stuffing block ensures that whenever a string of consecutive 1’s is
encountered, a 0 is inserted after every sixth 1 in the data stream. The bit unstuffing logic reverses this process.
The clock recovery block uses the incoming NRZI data to extract a data clock (12 MHz) from a 48 MHz input clock. This
input clock is derived from a 24 MHz oscillator in conjunction with PLL circuitry (clock doubler). This clock is used in the data
recovery circuit. The output of this block is binary data (decoded from the NRZI stream) which can be appropriately sampled
using the extracted 12 MHz clock. The jitter performance and timing characteristics meet the requirements set forth in Chapter 7 of the USB Specification.
www.national.com
10
2.0 Functional Overview (Continued)
USBN9603/USBN9604
D7-0/AD7-0/SO
A0/ALE/SI
CSRD WR/SK
Microcontroller Interface
(Parallel and Serial)
Endpoint/Control FIFOs
EP2
Endpoint0
EP1
DACK
EP6EP5
StatusControl
DRQ
RX
TX
INTR
MODE1-0
24 MHz
Oscillator
PLL
x 2
Clock
Generator
RESET
V
CC
GND
XIN
XOUT
CLKOUT
SIE
Media Access Controller (MAC)
Physical Layer Interface (PHY)
Transceiver
D+D-
Figure 2. USBN9603/4 Block Diagram
Upstream Port
VReg
Clock
Recovery
USB Event
Detect
V3.3
AGND
11
www.national.com
2.0 Functional Overview (Continued)
2.4 ENDPOINT PIPE CONTROLLER (EPC)
The EPC provides the interface for USB function endpoints. An endpoint is the ultimate source or sink of data. An endpoint
pipe facilitates the movement of data between USB and memory, and completes the path between the USB host and the
function endpoint. According to the USB specification, up to 31 such endpoints are supported at any given time. USB allows
a total of 16 unidirectional endpoints for receive and 16 for transmit. As the control endpoint 0 is always bidirectional, the
total number is 31. Seven endpoint pipes with the same function address are supported. See Figure 3 for a schematic diagram of EPC operation.
A USB function is a USB device that is able to transmit and receive information on the bus. A function may have one or more
configurations, each of which defines the interfaces that make up the device. Each interface, in turn, is composed of one or
USBN9603/USBN9604
more endpoints.
Each endpoint is an addressable entity on USB and is required to respond to IN and OUT tokens from the USB host (typically
a PC). IN tokens indicate that the host has requested to receive information from an endpoint, and OUT tokens indicate that
it is about to send information to an endpoint.
On detection of an IN token addressed to an endpoint, the endpoint pipe should respond with a data packet. If the endpoint
pipe is currently stalled, a STALL handshake packet is sent under software control. If the endpoint pipe is enabled but no
data is present, a NAK (Negative Acknowledgment) handshake packet is sent automatically. If the endpoint pipe is isochronous and enabled but no data is present, a bit stuff error followed by an end of packet is sent on the bus.
Similarly, on detection of an OUT token addressed to an endpoint, the endpoint pipe should receive a data packet sent by
the host and load it into the appropriate FIFO. If the endpoint pipe is stalled, a STALL handshake packet is sent. If the endpoint pipe is enabled but no buffer is present for data storage, a NAK handshake packet is sent. If the endpoint is isochronous and enabled but cannot handle the data, no handshake packet is sent.
A disabled endpoint does not respond to IN, OUT, or SETUP tokens.
The EPC maintains separate status and control information for each endpoint pipe.
For IN tokens, the EPC transfers data from the associated FIFO to the host. For OUT tokens, the EPC transfers data in the
opposite direction.
USB
USB SIE
Function
Address
Compare
EP0
EPB
EPC.
EPY
EPZ
Control Registers
FIFOs
Control Endpoint Pipe
EPA
Control Registers
FIFO
Receive Endpoint Pipes
EPX
Control Registers
FIFO
Transmit Endpoint Pipes
DMA
Controller
Microcontroller
Interface
Figure 3. EPC Operation
2.5 MICROCONTROLLER INTERFACE
The device can be connected to a CPU or microcontroller via the 8-bit parallel or MICROWIRE interface. The interface type
is selected by the input mode pins MODE0 and MODE1. In addition, a configurable interrupt output is provided. The interrupt
type can be configured to be either open-drain active-low or push-pull active high or low.
www.national.com
12
3.0Parallel Interface
The parallel interface allows the device to function as a CPU or microcontroller peripheral. This interface type and its addressing mode (multiplexed or non-multiplexed) is determined via device input pins MODE0 and MODE1.
3.1 NON-MULTIPLEXED MODE
Non-multiplexed mode uses the control pins
in Figure 4. This mode is selected by tying both the MODE1 and MODE0 pins to GND.
CS, RD, WR, the address pin A0 and the bidirectional data bus D7-0 as shown
USBN9603/USBN9604
CS
A0
WR
RD
D7-0
Figure 4. Non-Multiplexed Mode Block Diagram
The CPU has direct access to the DATA_IN, DATA_OUT and ADDR registers. Reading and writing data to the device can
be done either in standard access or burst mode. See Figure 5 for timing information.
DATA_IN
DATA_OUT
ADDR
0x00
Data In
Data Out
Address
0x3F
Register File
CS
A0
RD
WR
D7-0
OutInput
Write Address
Figure 5. Non-Multiplexed Mode Timing Diagram
Read DataBurst Read Data
13
Out
www.national.com
3.0 Parallel Interface (Continued)
3.1.1Standard Access Mode
The standard access sequence for non-multiplexed mode is to write the address to the ADDR register and then read or write
the data from/to the DATA_OUT/DATA_IN register. The DATA_OUT register is updated after writing to the ADDR register.
The ADDR register or the DATA_OUT/DATA_IN register is selected with the A0 input.
3.1.2Burst Mode
In burst mode, the ADDR register is written once with the desired memory address of any of the on-chip registers. Then
consecutive reads/writes are performed to the DATA_IN/DATA_OUT register without previously writing a new address. The
content of the DATA_OUT register for read operations is updated once after every read or write.
USBN9603/USBN9604
3.1.3User Registers
The following table gives an overview of the parallel interface registers in non-multiplexed mode.
The reserved bits return undefined data on read and should be written with 0.
The ADDR register acts as a pointer to the internal memory. This register is write only and is cleared on reset.
Data Output Register (DATA_OUT)
The DATA_OUT register is updated with the contents of the memory register to which the ADDR register is pointing. Update
occurs under the following conditions:
1. After the ADDR register is written.
2. After a read from the DATA_OUT register.
3. After a write to the DATA_IN register.
This register is read only and holds undefined data after reset.
Data Input Register (DATA_IN)
The DATA_IN register holds the data written to the device address to which ADDR points. This register is write only and is
cleared on reset.
www.national.com
14
3.0 Parallel Interface (Continued)
3.2 MULTIPLEXED MODE
Multiplexed mode uses the control pins
bus AD7-0 as shown in Figure 6. This mode is selected by tying MODE1 to GND and MODE0 to V
into the ADDR register when ALE is high. Data is output/input with the next active
accessible in this interface mode.
Figure 7 shows basic timing of the interface in Multiplexed mode.
CS, RD, WR, the address latch enable signal ALE and the bidirectional address data
The device supports DMA transfers with an external DMA controller from/to endpoints 1 to 6. This mode uses the device
pins DRQ and
with parallel interface mode (MODE1 must be grounded). The read or write address is generated internally and the state of
the A0/ALE pin is ignored during a DMA cycle.
The DMA support logic has a lower priority than the parallel interface.
comes active,
given time to issue a DMA request when data is received or transmitted.
Two different DMA modes are supported: standard and automatic.
4.1 STANDARD DMA MODE (DMA)
USBN9603/USBN9604
To enable DMA transfers in standard DMA mode, the following steps must be performed:
1. The local CPU programs the DMA controller for fly-by demand mode transfers. In this mode, transfers occur only when
the device requests them via the DRQ pin. The data is read/written from/to the device receive/transmit FIFO and written/read into/from local memory during the same bus transaction.
2. The DMA address counter is programmed to point to the destination memory block in the local shared memory, and the
Byte Count register is programmed with the number of bytes in the block to be transferred. If required the automatic error
handling should be enabled at this point along with the error handling counter. In addition the user needs to set the respective Endpoint enable bit.
3. The DMA Enable bit and DMA Source bits are set in the DMACNTRL register.
4. The USB host can now perform USB bulk or isochronous data transfers over the USB bus to the receive FIFO or from
the transmit FIFO in the device.
5. If the FIFOs warning limit is reached or the transmission/reception is completed, a DMA request/acknowledge sequence
is initiated for the predetermined number of bytes. The time at which a DMA request is issued depends on the selected
DMA mode (controlled by the DMOD bit in the DMACNTRL register), the current status of the endpoint FIFO, and the
FIFO warning enable bits. A DMA request can be issued immediately.
6. After the DMA controller has granted control of the bus, it drives a valid memory address and asserts
WR, thus transferring a byte from the receiveFIFO to memory, or from memory to the transmit FIFO. This process continues until the DMA byte count, within the DMA controller, reaches zero.
7. After the programmed amount of data is transferred, the firmware must do one of the following (depending on the transfer
direction and mode):
— Queue the new data for transmission by setting the TX_EN bit in the TXCx register.
— Set the End Of Packet marker by setting the TX_LAST bit in the TXCx register. Re-enable reception by setting the
RX_EN bit in the RXCx register.
— Check if the last byte of the packet was received (RX_LAST bit in the RXSx register).
The DMA transfer can be halted at any time by resetting the DMA Request Enable bit. If the DMA Request Enable bit is
cleared during the middle of a DMA cycle, the current cycle is completed before the DMA request is terminated.
See Figures 8 and 9 for the transmit and receive sequences using standard DMA mode.
DACK in addition to the parallel interface pins RD or WR and D7-0 data pins. DMA mode can only be used
CS must stay inactive during a DMA cycle. If CS be-
DACK is ignored and a regular read/write operation is performed. Only one endpoint can be enabled at any
DACK and RD or
www.national.com
MIcrocontroller
Set up DMA
Figure 8. Transmit Operation in Standard DMA Mode
Microcontroller
Set up DMA
Transaction
Read FIFO
16
USB
DMA
DMA
Fill FIFO
Microcontroller
Enable RX
DMA
Fill FIFO
Microcontroller
Enable RX
Figure 9. Receive Operation in Standard DMA Mode
Microcontroller
Enable TX
USB
Transaction
time
time
4.0 Direct Memory Access (DMA) Support (Continued)
4.2 AUTOMATIC DMA MODE (ADMA)
The ADMA mode allows the CPU to transfer independently large bulk or isochronous data streams to or from the USB bus.
The application’s DMA controller, together with the ADMA logic, have the capability to split a large amount of data and transfer it in (FIFO size) packets via the USB. In addition, automatic error handling is performed in order to minimize firmware
intervention. The number of transferred data stream bytes must be of a modulo 64 size. The maximum amount of data is
restricted to 256*64 bytes = 16 Kbytes.
To enable an ADMA transfer, the following steps must be performed:
1. The local CPU programs the DMA controller for fly-by demand mode transfers. In this mode, transfers occur only in response to DMA request via the DRQ pin. The data is read/written from/to the receive/transmit FIFO and written/read into/from local memory during the same bus transaction.
2. The DMA address counter is programmed to point to the destination memory block in the local shared memory, and the
Byte Count register is programmed with the number of bytes in the block to be transferred. The DMA Count register must
be configured with the number of packets to be received or transmitted. Ifrequired, the Automatic Error Handling register
must also be configured at this time.
3. The ADMA enable bit must be set prior to, or at the same time as the DMA enable bit. The DMA enable bit must be
cleared before enabling ADMA mode.
4. The DMA Request Enable bit and DMA Source bits are set in the device.The respective endpoint Enable bit must also
be set.
5. The USB host can now perform USB bulk or isochronous data transfers over the USB bus to the receive FIFO or from
the transmit FIFO. Steps 5 to 7 of the normal DMA mode are perfromed automatically. The ADMA is stopped either when
the last packet is received or when the DMA Count register has reached the value zero.
See Figures 10 and 11 for the transmit and receive sequences using ADMA mode. See Figures 12 and 13 for the basic
DMA write timing and read timing.
USBN9603/USBN9604
Microcontroller
Set up ADMA
Microcontroller
Set up ADMA
DMA
Fill FIFO
Figure 10. Transmit Operation Using ADMA Mode
USB
Transaction
Figure 11. Receive Operation Using ADMA Mode
USB
Transaction
DMA
Read FIFO
DMA
Fill FIFO
USB
Transaction
USB
Transaction
DMA
Read FIFO
USB
Last
Transaction
DMA
Last
Read FIFO
time
time
17
www.national.com
4.0 Direct Memory Access (DMA) Support (Continued)
DRQ
DACK
USBN9603/USBN9604
WR
D7-0
DRQ
DACK
RD
D7-0
Input
Figure 12. DMA Write to USBN9603/4
Output
Figure 13. DMA Read from USBN9603/4
www.national.com
18
Loading...
+ 42 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.