Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty . Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty . Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. T o minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party , or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and is
an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265
The TAS1020A integrated circuit (IC) is a universal serial bus (USB) peripheral interface device designed specifically
for applications that require isochronous data streaming. Applications include digital speakers, which require the
streaming of digital audio data between the host PC and the speaker system via the USB connection. The T AS1020A
device is fully compatible with the USB Specification Version 1.1 and the USB Audio Class Specification.
The TAS1020A uses a standard 8052 microcontroller unit (MCU) core with on-chip memory. The MCU memory
includes 8K bytes of program memory ROM that contains a boot loader program. At initialization, the boot loader
program downloads the application program code to a 6,016-byte RAM from either the host PC or a nonvolatile
memory on the printed-circuit board (PCB). The MCU handles all USB control, interrupt and bulk endpoint
transactions. DMA channels are provided to handle isochronous endpoint transactions.
The USB interface includes an integrated transceiver that supports 12 Mb/s (full speed) data transfers. In addition
to the USB control endpoint, support is provided for up to seven IN endpoints and seven OUT endpoints. The USB
endpoints are fully configurable by the MCU application code using a set of endpoint configuration blocks that reside
in on-chip RAM. All USB data transfer types are supported.
The T AS1020A device also includes a codec port interface (C-Port) that can be configured to support several industry
standard serial interface protocols. These protocols include the audio codec (AC) ’97 Revision 1.X, the audio codec
(AC) ’97 Revision 2.X and several inter-IC sound (I
A direct memory access (DMA) controller with two channels is provided for streaming the USB isochronous data
packets to/from the codec port interface. Each DMA channel can support one USB isochronous endpoint.
An on-chip phase lock loop (PLL) and adaptive clock generator (ACG) provide support for the USB synchronization
modes, which include asynchronous, synchronous and adaptive.
Other on-chip MCU peripherals include an inter-IC control (I
input/output (GPIO) ports.
2
S) modes.
2
C) serial interface, and two 8-bit general-purpose
The T AS1020A device is implemented in a 3.3-V 0.25 µm CMOS technology.
1.1Features
•Universal Serial Bus (USB)
•USB specification version 1.1 compatible
•USB audio class specification 1.0 compatible
•Integrated USB transceiver
•Supports 12 Mb/s data rate (full speed)
•Supports suspend/resume and remote wake-up
•Supports control, interrupt, bulk, and isochronous data transfer types
•Supports up to a total of seven IN endpoints and seven OUT endpoints in addition to the control endpoint
•Data transfer type, data buffer size, single or double buffering is programmable for each endpoint
•On-chip adaptive clock generator (ACG) supports asynchronous, synchronous and adaptive
synchronization modes for isochronous endpoints
•T o support synchronization for streaming USB audio data, the ACG can be used to generate the master
clock for the codec
1–1
Page 8
•Micro-Controller Unit (MCU)
•Standard 8052 8-bit core
•8K bytes of program memory ROM that contains a boot loader program and a library of commonly used
USB functions
•6016 bytes of program memory RAM which is loaded by the boot loader program
•256 bytes of internal data memory RAM
•Two GPIO ports
•MCU handles all USB control, interrupt, and bulk endpoint transfers
•DMA Controller
•Two DMA channels to support streaming USB audio data to/from the codec port interface
•Each channel can support a single USB isochronous endpoint
2
•In the I
S mode the device can support DAC/ADCs at different sampling frequencies
•A circular programmable FIFO used for isochronous audio data streaming
•Codec Port Interface
2
•Configurable to support AC’97 1.X, AC’97 2.X, AIC or I
2
S modes can support a combination of one DAC and/or two ADCs
•I
S serial interface formats
•Can be configured as a general-purpose serial interface
•Can support bulk data transfer using DMA for higher throughput
2
C Interface
•I
•Master only interface
•Does not support a multimaster bus environment
•Programmable to 100 kb/s or 400 kb/s data transfer speeds
•Supports wait states to accommodate slow slaves
•General Characteristics
•High performance 48-pin TQFP Package
•On-chip phase-locked loop (PLL) with internal oscillator is used to generate internal clocks from a 6 MHz
crystal input
•Reset output available which is asserted for both system and USB reset
•External MCU mode supports application firmware development
•8K ROM with boot loader program and commonly used USB functions library
•3.3 V core and I/O buffers
1–2
Page 9
1.2Functional Block Diagram
USB
6 MHz
USB Serial
SOF
OSC
PLL
ACG
Interface
Engine
8K ROM
6016 Byte RAM
UBMDMA
Suspend
/Resume
Logic
1520 Byte
SRAM
Port–3Port–1
1.3Terminal Assignments—Normal Mode
PFB PACKAGE (Normal Mode)
CDATI
CSYNC
(TOP VIEW)
DD
DV
CRESET
CSCHNE
8052 Core
P1.7
P1.6
P1.5
SS
DV
P1.4
P1.3
P1.2
CODEC
Interface
Global
Control/Status
Registers
2
I
C
Control
C–Port
I2C Bus
CSCLK
CDATO
MCLKO1
MCLKO2
RESET
VREN
SDA
SCL
AV
SS
XTALO
XTALI
PLLFILI
35 34 33 32 313630
37
38
39
40
41
42
43
44
45
46
47
48
23
1
DD
AV
PLLFILO
TAS1020A
5678
4
SS
DV
MCLKI
PUR
DP
DM
DD
DV
28 27 2629
9 10 11 12
TEST
EXTEN
MRESET
25
24
23
22
21
20
19
18
17
16
15
14
13
RSTO
P1.1
P1.0
NC
DV
DD
NC
P3.5
P3.4
P3.3
DV
SS
P3.2/XINT
P3.1
P3.0
1–3
Page 10
1.4Terminal Assignments—External MCU Mode
CSCLK
CDATO
MCLKO1
MCLKO2
RESET
VREN
SDA
SCL
AV
SS
XTALO
XTALI
PLLFILI
PFB PACKAGE (External Mode)
(TOP VIEW)
DD
CDATI
CSYNC
35 34 33 32 313630
37
38
39
40
41
42
43
44
45
46
47
48
23
1
DD
AV
CRESET
4
MCLKI
MCUAD7
DV
CSCHNE
TAS1020A
5678
SS
DP
PUR
DV
PLLFILO
SS
MCUAD5
MCUAD6
DV
28 27 2629
9
DD
DM
DV
MRESET
MCUAD4
MCUAD3
10 11 12
TEST
EXTEN
MCUAD2
25
24
23
22
21
20
19
18
17
16
15
14
13
RSTO
MCUAD1
MCUAD0
MCURD
DV
DD
MCUWR
MCUINTO
MCUALE
MCUA10
DV
SS
XINT
MCUA9
MCUA8
1.5Ordering Information
Texas Instruments
Audio Solutions
Peripheral Device
Package Type
TQFP
48 pinsPFB
TPFB1020AAS
1–4
Page 11
1.6Terminal Functions—Normal Mode
TERMINAL
NAME
AV
DD
AV
SS
CSCLKCMOS37I/OCodec port interface serial clock: CSCLK is the serial clock for the codec port interface used to clock
CSYNCCMOS35I/OCodec port interface frame sync: CSYNC is the frame synchronization signal for the codec port
CDATOCMOS38I/OCodec port interface serial data out
CDATICMOS36I/OCodec port interface serial data in
CRESETCMOS34I/OCodec port interface reset output
CSCHNECMOS32I/OCodec port interface secondary channel enable
DPCMOS6I/OUSB differential pair data signal plus. DP is the positive signal of the bidirectional USB differential
DMCMOS7I/OUSB differential pair data signal minus. DM is the negative signal of the bidirectional USB differential
DV
DD
DV
SS
EXTENCMOS11IExternal MCU mode enable: Input used to enable the device for the external MCU mode
MCLKICMOS3IMaster clock input. An input that can be used as the master clock for the codec port interface or the
MCLKO1CMOS39OMaster clock output 1: The output of the ACG that can be used as the master clock for the codec port
MCLKO2CMOS40OMaster clock output 2: An output that can be used as the master clock for the codec port interface and
MRESETCMOS9IMaster reset: An active low asynchronous reset for the device that resets all logic to the default state
NC20,22Not used
P1.[0:7]CMOS23, 24,
P3.[0:6]CMOS13, 14,
PLLFILICMOS48IPLL loop filter input: Input to on-chip PLL from external filter components
PLLFILOCMOS1OPLL loop filter output: Output from on-chip PLL to external filter components
PURCMOS5OUSB data signal plus pullup resistor connect. PUR is used to connect the pullup resistor on the DP
RESETCMOS41OGeneral-purpose active-low output which is memory mapped
RSTOCMOS12OReset output: An output that is active while the master reset input or the USB reset is active
SCLCMOS44OI2C interface serial clock
SDACMOS43I/OI2C interface serial data
TESTCMOS10ITest mode enable: Factory test mode
VRENCMOS42OGeneral-purpose active-low output which is memory mapped
XINTCMOS15IExternal interrupt: An active low input used by external circuitry to interrupt the on-chip 8052 MCU
XTALICMOS47ICrystal input: Input to the on-chip oscillator from an external 6-MHz crystal
XTALOCMOS46OCrystal Output: Output from the on-chip oscillator to an external 6-MHz crystal
PIN
TYPE
Power23.3-V analog supply voltage
Power45Analog ground
Power8, 21, 333.3-V digital supply voltage
Power4, 16, 28Digital ground
NO.
25, 26,
27, 29,
30, 31
15, 17,
18, 19
I/ODESCRIPTION
the CSYNC, CDATO, CDATI, CRESET,
interface.
pair used to connect the TAS1020A device to the universal serial bus.
pair used to connect the TAS1020A device to the universal serial bus.
source for MCLKO2.
interface and the codec.
the codec used in I2S modes for receive. This clock signal can also be used as a miscellaneous
clock.
I/OGeneral-purpose I/O port [bits 0 through 1]: A bidirectional 8-bit I/O port with an internal 100 µA
active pullup
I/OGeneral-purpose I/O port [bits 0 through 1]: A bidirectional I/O port with an internal 100 µA active
pullup
signal from a high-impedance state to 3.3 V . When the DP signal is connected to 3.3-V the host PC
detects the connection of the TAS1020A device to the universal serial bus.
AND CSCHNE signals.
1–5
Page 12
1.7Terminal Functions—External MCU Mode
TERMINAL
NAME
AV
DD
AV
SS
CSCLKCMOS37I/OCodec port interface serial clock: CSCLK is the serial clock for the codec port interface used to
CSYNCCMOS35I/OCodec port interface frame sync: CSYNC is the frame synchronization signal for the codec port
CDATOCMOS38I/OCodec port interface serial data output
CDATICMOS36I/OCodec port interface serial data input
CRESETCMOS34I/OCodec port interface reset output
CSCHNECMOS32I/OCodec port interface secondary channel enable
DPCMOS6I/OUSB differential pair data signal plus: DP is the positive signal of the bidirectional USB differential
DMCMOS7I/OUSB differential pair data signal minus. DM is the negative signal of the bidirectional USB differen-
DV
DD
DV
SS
EXTENCMOS11IExternal MCU mode enable: Input used to enable the device for the external MCU mode. This sig-
MCLKICMOS3IMaster clock input: An input that can be used as the master clock for the codec port interface or the
MCLKO1CMOS39OMaster clock output 1: The output of the ACG that can be used as the master clock for the codec
MCLKO2CMOS40OMaster clock output 2: An output that can be used as the master clock for the codec port interface
MRESETCMOS9IMaster reset: An active low asynchronous reset for the device that resets all logic to the default
MCUAD
[0:7]
MCUA
[8:10]
MCUALECMOS18IMCU address latch enable: Address latch enable for external MCU access to the TAS1020A exter-
MCUINTOCMOS19OMCU interrupt output: Interrupt output to be used for external MCU INTO input signal. All internal
MCUWRCMOS20IMCU write strobe: Write strobe for external MCU write access to the TAS1020A external data
MCURDCMOS22IMCU read strobe: Read strobe for external MCU read access to the TAS1020A external data
PLLFILICMOS48IPLL loop filter input: Input to on-chip PLL from external filter components.
PLLFILOCMOS1OPLL loop filter output: Output to on-chip PLL from external filter components.
PURCMOS5OUSB data signal plus pullup resistor connect. PUR is used to connect the pullup resistor on the DP
RESETCMOS41OGeneral-purpose active-low output which is memory mapped
RSTOCMOS12OReset output: An output that is active while the master reset input or the USB reset is active.
SCLCMOS44OI2C interface serial clock
SDACMOS43I/OI2C interface serial data input/output
TESTCMOS10ITest mode enable: Factory text mode
PIN
TYPE
Power2–3.3-V Analog supply voltage
Power45–Analog ground
Power8, 21, 33–3.3-V Digital supply voltage
Power4, 16, 28–Digital ground
CMOS23, 24, 25,
CMOS13, 14, 17I/OMCU address bus: Multiplexed address bus bits[8:10] for external MCU access to the TAS1020A
NO.
26, 27, 29,
30, 31
I/ODESCRIPTION
clock the CSYNC, CDATO, CDATI, CRESET
interface.
pair used to connect the TAS1020A device to the universal serial bus.
tial pair used to connect the TAS1020A device to the universal serial bus.
nal uses a 3.3 V TTL/LVCMOS input buffer.
source for MCLKO2.
port interface and the codec.
and the codec. This clock signal can also be used as a miscellaneous clock.
TAS1020A interrupt sources are read together to generate this output signal.
memory space.
memory space.
signal to 3.3V from a high-impedance state. When the DP signal is connected in a 3.3-V state, the
host PC should detect the connection of the TAS1020A device to the universal serial bus.
VRENCMOS42OGeneral-purpose active-low output which is memory mapped.
XINTCMOS15IExternal interrupt: An active low input used by external circuitry to interrupt the on-chip 8052 MCU.
XTALICMOS47ICrystal input: Input to the on-chip oscillator from an external 6-MHz crystal.
XTALOCMOS46OCrystal output: Output from the on-chip oscillator to an external 6-MHz crystal.
PIN
TYPE
NO.
I/ODESCRIPTION
1.8Device Operation Modes
The EXTEN and TEST pins define the mode that the TAS1020A is in after reset.
1.9Terminal Assignments for Codec Port Interface Modes
The codec port interface has five modes of operation that support AC97, I2S, and AIC codecs. There is also a
general-purpose mode that is not specific to a serial interface. The mode is programmed by writing to the mode select
field of the codec port interface configuration register 1 (CPTCNF1). The codec port interface terminals CSYNC,
CSCLK, CDATO, CDATI, CRESET
shown in the following table.
, and CSCHNE take on functionality appropriate to the mode programmed as
NOTES: 1. Signal names and I/O direction are with respect to the TAS1020A device. The signal names used for the TAS1020A terminals for
the various codec port interface modes reflect the nomenclature used by the codec devices.
2. NC indicates no connection for the terminal in a particular mode. The TAS1020A device drives the signal as an output for these
cases.
3. The CSYNC and CSCLK signals can be programmed as either an input or an output in the general-purpose mode.
GPAICAC ’97 v1.XAC ’97 v2.X
Mode 0
Mode 1
Mode 2
Mode 3
I2SI2S
Mode 4
Mode 5
1–7
Page 14
1–8
Page 15
2 Description
2.1Architectural Overview
2.1.1Oscillator and PLL
Using an external 6-MHz crystal, the TAS1020A derives the fundamental 48-MHz internal clock signal using an
on-chip oscillator and PLL. Using the PLL output, the other required clock signals are generated by the clock
generator and adaptive clock generator.
2.1.2Clock Generator and Sequencer Logic
Utilizing the 48-MHz output from the PLL, the clock generator logic generates all internal clock signals, except for the
codec port interface master clock (MCLK) and serial clock (CSCLK) signals. The T AS1020A internal clocks include
the 48-MHz clock, a 24-MHz clock, and a 12-MHz clock. A 12 MHz USB clock is also generated. The USB clock is
the same as the internal 12-MHz clock when the T AS1020A is transmitting data, but is derived from the data when
the T AS1020A is receiving data. T o derive the USB clock when receiving USB data, the T AS1020A utilizes an internal
digital PLL (DPLL) driven from the 48-MHz clock.
The sequencer logic controls the access to the SRAM used for the USB endpoint configuration blocks and the USB
endpoint buffer space. The SRAM can be accessed by the MCU, the USB buffer manager (UBM), or the DMA
channels. The sequencer controls the access to the memory using a round-robin fixed priority arbitration scheme.
This means that the sequencer logic generates grant signals for the MCU, UBM, and DMA channels at a
predetermined fixed frequency.
2.1.3Adaptive Clock Generator (ACG)
The adaptive clock generator is used to generate a master clock output signal (MCLKO) to be used by the codec port
interface and the codec device. To synchronize data sent to or received from the codec to the USB frame rate, the
MCLKO signal generated by the adaptive clock generator must be used. The synchronization of the MCLKO signal
to the USB frame rate is achieved by the ACG, which, in turn, is controlled by a soft PLL, implemented in the MCU.
One of the tasks performed by the ACG is to maintain count of the number of MCLKO clocks between USB Start of
Frame (SOF) events. This count is monitored by the soft PLL in the MCU. Based on this count, the soft PLL outputs
corrections to the ACG to adjust MCLKO to obtain the correct number of MCLKO clocks between USB SOF events.
MCLKI, the master clock input, can also be selected to source the clocks used by the codec port interface. When
MCLKI is selected, it is used to derive the TAS1020A-sourced versions of the clocks CSCLK and CSYNC. In this
scenario, the codec device would also use the same master clock signal (MCLKI).
2.1.4USB Transceiver
The TAS1020A provides an integrated transceiver for the USB port. The transceiver includes a differential output
driver, a dif ferential input receiver , and two single ended input buf fers. The transceiver connects to the USB DP and
DM signal terminals.
2.1.5USB Serial Interface Engine (SIE)
The serial interface engine logic manages the USB packet protocol for packets being received and transmitted by
the T AS1020A. For packets being received, the SIE decodes the packet identifier field (PID) to determine the type
of packet being received and to ensure the PID is valid. The SIE then calculates the cycle redundancy check (CRC)
of the received token and data packets and compares the value to the CRC contained in the packet to verify that the
packet was not corrupted during transmission. For transmitted token and data packets, the SIE generates the CRC
that is transmitted with the packet. The SIE also generates the synchronization field (SYNC) and the correct PID for
all transmitted packets. Another major function of the SIE is the serial-to-parallel conversion of received data packets
and the parallel-to-serial conversion of transmitted data packets.
2–1
Page 16
2.1.6USB Buffer Manager (UBM)
The USB buffer manager provides the control logic that interfaces the SIE to the USB endpoint buffers. One of the
major functions of the UBM is to decode the USB function address to determine if the host PC is addressing the
T AS1020A device USB peripheral function. In addition, the endpoint address field and direction signal are decoded
to determine which particular USB endpoint is being addressed. Based on the direction of the USB transaction and
the endpoint number, the UBM will either write or read the data packet to or from the appropriate USB endpoint data
buffer.
2.1.7USB Frame Timer
The USB frame timer logic receives the start of frame (SOF) packet from the host PC each USB frame. Each frame,
the logic stores the 1 1-bit frame number value from the SOF packet in a register and asserts the internal SOF signal.
The frame number register can be read by the MCU and the value can be used as a time stamp. For USB frames
in which the SOF packet is corrupted or not received, the frame timer logic will generate a pseudo start of frame
(PSOF) signal and increment the frame number register.
2.1.8USB Suspend and Resume Logic
The USB suspend and resume logic detects suspend and resume conditions on the USB. This logic also provides
the internal signals used to control the TAS1020A device when these conditions occur. The capability to resume
operation from a suspend condition with a locally generated remote wake-up event is also provided.
2.1.9MCU Core
The T AS1020A uses an 8-bit microcontroller core that is based on the industry standard 8052. The MCU is software
compatible with the 8052, 8032, 80C52, 80C53, and 87C52 MCUs. The 8052 MCU is the processing core of the
T AS1020A and handles all USB control, interrupt and bulk endpoint transfers. Bulk out end-point transfers can also
be handled by one of the two DMA channels.
2.1.10 MCU Memory
In accordance with the industry standard 8052, the TAS1020A MCU memory is organized into program memory,
external data memory and internal data memory . A boot ROM program is used to download the application code to
a 6K byte RAM that is mapped to the program memory space. The external data memory includes the USB endpoint
configuration blocks, USB data buffers, and memory mapped registers. The total external data memory space
available is 1.5K bytes. A total of 256 bytes are provided for the internal data memory.
2.1.11 USB Endpoint Configuration Blocks and Buffer Space
The USB endpoint configuration blocks are used by the MCU to configure and operate the required USB endpoints
for a particular application. In addition to the control end-point, the T AS1020A supports a total of seven IN endpoints
and seven OUT endpoints. A set of six bytes is provided for each endpoint to specify the endpoint type, buffer address,
buffer size, and data packet byte count.
The USB endpoint buffer configuration blocks and buffer space provided totals 1440 bytes. The buffer space to be
used by a particular endpoint is fully configurable by the MCU for a particular application. Therefore, the MCU can
configure each buffer based on the total number of endpoints to be used, the maximum packet size to be used for
each endpoint, and the selection of single or double buffering.
2.1.12 DMA Controller
Two DMA channels are provided to support the streaming of data for USB isochronous IN endpoints, isochronous
OUT endpoints, and bulk OUT endpoints. Each DMA channel can support one USB isochronous IN endpoint, or one
isochronous OUT endpoint, or one bulk OUT endpoint. The DMA channels are used to stream data between the USB
2–2
Page 17
endpoint data buffers and the codec port interface. The USB endpoint number and direction can be programmed for
each DMA channel. Also, the codec port interface time slots to be serviced by each DMA channel can be
programmed.
2.1.13 Codec Port Interface
The T AS1020A provides a configurable full duplex bidirectional serial interface that can be used to connect to a codec
or other external device types for streaming USB isochronous data. The interface can be configured to support
several different industry standard protocols, including AC ’97 1.X, AC ’97 2.X, AIC, and I
a general-purpose mode to support other protocols.
2
S. The T AS1020A also has
2.1.14 I2C Interface
The I2C interface logic provides a two-wire serial interface that the 8052 MCU can use to access other ICs. The
TAS1020A is an I
interface can be programmed to operate at either 100 kbps or 400 kbps. In addition, the protocol supports 8-bit or
16-bit addressing for accessing the I
means slaves can assert wait state on the I
2
C master device only and supports single byte or multiple byte read and write operations. The
2
C slave device memory locations. The T AS1020A supports I2C wait states. This
2
C bus by pulling the SCL line low.
2.1.15 General-Purpose IO Ports (GPIO)
The T AS1020A provides two general-purpose IO ports that are controlled by the internal 8052 MCU. The two ports
are port 1 and port 3. Port 1 provides true GPIO capability. Each bit of port 1 can be independently used as either
an input or output, and consists of an output buffer , an input buffer, and a pullup resistor. Some of the bits of port 3
also provide true GPIO capability , but, in addition, some of the bits of port 3 also provide alternate input and output
uses. An example of this is P3.2, which is used as the external interrupt (XINT
description of the alternate uses of some of the port 3 bits is presented in Section 2.2.11.
The pullup resistors for port 1 and port 3 can be disabled by bits P1PUDIS and P3PUDIS respectively in the on-chip
register GLOBCTL. In addition, any port 3 pin can be used to wake up the host PC from a low-power suspend mode.
) input to the TAS1020A. A detailed
2.1.16 Interrupt Logic
The interrupt logic monitors the various conditions that can cause an interrupt and asserts the interrupt 0 (INTO) input
on the 8052 MCU core accordingly . All of the TAS1020A internal interrupt sources and the external interrupt (XINT
input are ORed together to generate the INT0 signal. An interrupt vector register is used by the MCU to identify the
interrupt source.
2.1.17 Reset Logic
)
An external master reset (MRESET) input signal that is asynchronous to the internal clocks can be used to reset the
T AS1020A logic. In addition to this master reset, the T AS1020A logic can also be reset by a USB reset from the host
PC if bit FRSTE in the on-chip register USBCTL is set to 1. The T AS1020A also provides a reset output (RSTO
that can be used by external devices. This signal is asserted when either a master reset occurs or when a USB reset
occurs and FRSTE is set to 1.
) signal
2.2Device Operation
The operation of the T AS1020A is explained in the following sections. For additional information on USB, refer to the
Universal Serial Bus Specification, Version 1.1.
2–3
Page 18
2.2.1Clock Generation
The T AS1020A requires an external 6-MHz crystal with load capacitors and PLL loop filter components to derive all
the clocks needed for both USB and codec operation. Figure 4–1 shows the connection of these components to the
T AS1020A. Figure 4–1 also shows a ground shield residing on the top layer of the PCB and underneath the crystal
and its load capacitors and the PLL components. The PLL is an analog PLL, and noise pickup in these components
can translate to phase jitter at the output of the PLL, which in turn can translate to distortion at the codec. A ground
shield is recommended to attenuate the digital noise components on the board as seen at the PLL.
The A V
the digital noise residing on a board, A V
and A VDD pins on the T AS1020A are used exclusively to power the analog PLL. T o maintain isolation from
SS
should be a separate ground plane that connects to the primary ground
SS
plane (DGND) at a single point via a ferrite bead. The ferrite bead should exhibit around 9 Ω of impedance at 100 MHz.
AV
should also be distinct from DVDD. A recommended architecture is to generate DVDD and A VDD from the same
DD
regulator line, with each derived from a RC filter in series with the regulator output. It is finally recommended that the
ground shield for the crystal and its load capacitors and the PLL loop filter components be connected to A V
SS
at a
single point via a ferrite bead of the same type as above.
Using the low frequency 6-MHz crystal and generating the required higher frequency clocks internally in the
TAS1020A is a major advantage with regard to EMI.
2.2.2Boot Process
The T AS1020A can boot from EEPROM or execute a host boot. Host boot will be used in the following circumstances:
•No EEPROM is present.
•An EEPROM is present, but does not contain a valid header.
•An EEPROM is present, but is a device EEPROM (contains header information only).
2.2.2.1 EEPROM Boot Process
If the target device has an application EEPROM (an EEPROM that contains both header and application data), and
if the header portion of the EEPROM content is valid, the EEPROM application code is downloaded to on-chip RAM.
During the download process, the RAM is mapped to data space, and the boot code that orchestrates the download
is part of the on-chip firmware housed in on-chip ROM. Also, while the application code is being downloaded, the
TAS1020A remains disconnected from the USB bus.
When the download is complete, the firmware sets the ROM disable bit SDW. The setting of this bit maps the RAM
from data space to program space, starting address 0x0000. Having set bit SDW, the firmware then branches to
address 0x0000, which is the reset entry point for the application code. The application code is now running.
The application code then switches on the PUR output. The PUR output pin is connected, through a resistor, to the
positive (DP) line of the differential USB bus. Switching PUR on informs the host that a full speed (12 Mb/s) device
is present on the bus. In the enumeration procedure that follows, the application code reports its run-time device
descriptor set. Following enumeration, the device is actively running its application.
2.2.2.2 Host Boot Process
The DFU code in the TAS1020A fully adheres to the USB Device Class Specification for DFU 1.0. In addition, the
T AS1020A utilizes the communication protocols from the DFU specification to implement a host boot capability for
those applications that do not have an EEPROM resource. In such cases, the TAS1020A, at power-up, reports its
DFU mode descriptor set rather than its run-time descriptor set and directly enters what the DFU specification terms
the DFU Program Mode. The host processor must be cognizant of the fact that the device under enumeration does
not have an EEPROM resource with valid code, and is already in the DFU mode awaiting a download per the DFU
protocol. All of this capability is provided by the ROM-based code (firmware) that resides on the TAS1020A.
Specifically, the host boot process addresses three cases—an EPROM is not present, an EEPROM is present but
the data in the EEPROM is invalid, or an EEPROM is present but the EEPROM is a device EEPROM (contains only
2–4
Page 19
header data). In all three of these cases, the T AS1020A firmware comes up in the DFU Program Mode. A host boot
ensues, but the final destination of the download depends on the status of the onboard EEPROM.
•If the firmware determines that no EEPROM is present (by noting, when addressing the EEPROM, the
absence of an acknowledge from the EEPROM), a Vendor ID of 0xFFFF and a Product ID of 0xFFFE is
reported during enumeration. The download that follows enumeration is written to the on-chip RAM. The
download from the host must include a header (see Section 2.2.2.3.1), and the header overwrite bit in the
header downloaded must be set to 0. (The header overwrite bit is used to instruct the T AS1020A firmware
as to whether or not the header portion of the download is to be written into the EEPROM. Since, in this case,
no EEPROM is present, this header overwrite bit must be set to 0). It is noted that the host must have prior
knowledge that the target will initialize in the DFU program mode and will require a download of application
code (and header) to RAM.
•If the firmware determines that an EEPROM is present (acknowledges are received from the EEPROM),
but that the header data in the EEPROM is invalid, a Vendor ID of 0xFFFF and a Product ID of 0xFFFE is
reported during enumeration. The download that follows enumeration is written to EEPROM. Since the
EEPROM data was invalid, the host has to set the header overwrite bit in the header portion of the download
to a 1 to ensure that the header is written to the EEPROM. It is noted that the host must have prior knowledge
that the target does have an EEPROM, but that the data in the EEPROM is invalid. This could be a situation
such as the initial download of the application on a production line.
•If the firmware determines that an EEPROM is present, that the header data in the EEPROM is valid, but
that the header data in the EEPROM indicates that the EEPROM is a device EEPROM, the Vendor ID and
Product ID settings in the EEPROM-resident header is reported during enumeration. In addition, the strings
in the header, if applicable, are reported. The EEPROM download that follows enumeration will be written
to the on-chip RAM facility . In addition to downloading the application code to RAM, an option also exists
to download the header portion of the download image to the EEPROM. If the host does not wish to
overwrite the valid header data in the EEPROM, it must set the header overwrite bit in its download header
to a 0. It is noted that the host must have knowledge that the target contains an EEPROM, and that the
EEPROM is a device EEPROM.
2.2.2.3 EEPROM Data Organization
Two types of data can be stored in the EEPROM—header data, which contains USB device information, and
application code. The presence of header data in the EEPROM is mandatory , but the presence of application code
is optional.
2–5
Page 20
2.2.2.3.1 EEPROM Header
Table 2–1 shows the format and information contained it the header data. As seen from Table 2–1, the header data
begins at address 0x0000 in the EEPROM and precedes the application code.
Table 2–1. EEPROM Header
OFFSETTYPESIZEVALUE
0headerChksum1Header check sum—derived by adding the header data, excluding the header checksum, in bytes, and
1HeaderSize1Size, in units of bytes, of the header including strings if applied
2Signature2Signature: 0x1234
4VendorID2USB Vendor ID
6ProductID2USB Product ID
8ProductVersion1Product version
9FirmwareVersion1Firmware version
10UsbAttributes1USB attributes:
11MaxPower1Maximum power the device needs in units of 2 mA.
12Attributes1Device attributes:
13WPageSize1Maximum I2C write page size, in units of bytes
14DataType1This value defines if the device is an application EEPROM or a device EEPROM.
15RpageSize1Maximum I2C read page size, in units of bytes. If the value is zero, the whole payLoadSize is read in one
16payLoadSize2Size, in units of bytes, of the application, if using EEPROM as an application EEPROM, otherwise the
xxxxLanguage string4Language string in standard USB string format if applied. If this attribute is applied, the two attributes
xxxxManufacture string...Manufacture string in standard USB string format if applied.
xxxxProduct string...Product string in standard USB string format if applied.
xxxxApplication Code...Application code if applied
retaining the lower byte of the sum as the checksum.
Bit 0: If set to 1, the header includes all three strings: language, manufacture, and product strings, if set
to 0, the header does not include any string. The strings, if present, must conform to the USB
string format per USB spec 1.0 or later.
Bit 1 : Not used.
Bit 2: If set to 1, the device can be self powered, if set to 0, cannot be self powered.
Bit 3: If set to 1, the device can be bus powered, if set to 0, cannot be bus powered.
Bit 4 ... 7: Reserved
Bit 0: If set to 1, the CPU clock is 24 MHz, if set to 0, the CPU clock is 12 MHz.
Bit 1: If set to 1, the download version of the header will be written into the EEPROM (download target
has to be EEPROM). If the header is not to be overwritten, or if the target is RAM, this bit must be
cleared to 0.
Bit 2: Not used.
Bit 3: If set to 1, the EEPROM can support a 400 kHz I2C bus, if set to 0, the EEPROM cannot support
a 400 MHz I2C bus.
Bit 4 ... 7: Reserved
0x01: Application EEPROM—contains header and application code.
0x02: Device EEPROM—contains only header.
All other values are invalid.
I2C read setup.
value is 0.
that follow must also be applied. If this attribute is not applied, the following two attributes cannot be
applied.
The header checksum is used by the firmware to detect the presence of a valid header in the EEPROM. The header
size field supports future updates of the header.
2.2.2.3.2 Application Code
Application code is stored as a binary image in the EEPROM following the header information. The binary image must
always be mapped to MCU program space starting at address 0x0000, and must be stored in the EEPROM as a
continuous linear block of data.
2–6
Page 21
2.2.2.4 I2C Serial EEPROM
The TAS1020A accesses the EEPROM via an I2C serial bus. Thus the EEPROM must be an I2C serial EEPROM.
The ROM boot loader assumes the EEPROM device uses the full 7-bit I
of the address (control code) set to 1010 and the three least significant bits (chip select bits) set to 000.
2
C device address with the upper four bits
2.2.2.5 DFU Upgrade Process
DFU compliance provides a host the capability of upgrading application code currently residing in a target’s onboard
EEPROM memory. The DFU upgrade process provided by the TAS1020A fully conforms to the requirements
specified in USB Device Class Specification For DFU 1.0.
The download must consist of both header and application code. The destination of the download must be defined
by the on-chip application code (as opposed to the application code being downloaded). Under normal
circumstances, the download destination would be EEPROM, but it is possible for the application code to specify
on-chip RAM as the download destination.
If the download destination is to be EEPROM, bit 1 of the Attribute field in the header data being downloaded
determines whether or not the header data in the download image is to be written to the EEPROM. A bit value of 1
results in the header in the EEPROM being overwritten by the header content in the download image. It is important
to note that if the application code targets RAM as the download destination, bit 1 in the Attribute field of the download
image must be 0.
2.2.2.6 Download Error Recovery
Safeguards are incorporated on the T AS1020A ROM to allow recovery from a host download that does not complete
due to a loss of power. Before downloading the application code, the TAS1020A saves the value of the Data Type
field in the EEPROM header and modify the Data Type field to indicate that a download is in progress. After successful
completion of the download, the TAS1020A restores the saved value in the Data Type field. If the download is
terminated prior to successful completion, the Data Type field still indicates that a download is in progress. In the case
of an unsuccessful download the T AS1020A reboots as a DFU device in DFU Program mode and uses the Vendor
and Product ID from the EEPROM header as the vendor and product ID in its USB device descriptor.
The download process consists of the following task flow.
•Header portion of download is written to EEPROM, if applicable.
•Header Data Type is retrieved and stored in RAM.
•Head Data Type is overwritten with a value indicating that a download is in progress.
•Application portion of download is written to EEPROM (or to RAM).
•Header Data Type is overwritten with the previously recorded legal value.
If the download should terminate during the downloading of the header to EEPROM, the header checksum results
in the EEPROM being declared invalid on the next boot of the T AS1020A. If the download should terminate during
the downloading of the application code, the Data Type field indicates that a download was in progress and the
TAS1020A enters the DFU program mode on the next boot.
If the T AS1020A remains powered when a premature termination of a download occurs, the TAS1020A remains in
the DFU program mode. In this case, the host can again attempt a download; the TAS1020A does not have to be
rebooted.
2–7
Page 22
2.2.2.7 ROM Support Functions
In order to conserve RAM memory resources on the T AS1020A, several USB-specific routines have been included
in the firmware resident in the on-chip ROM. The inclusion of these routines frees the application code from having
to implement USB-specific code.
The tasks provided by the ROM code include:
•A USB engine for handling USB control endpoint data transactions and states
•USB protocol handlers to support USB Chapter 9
•USB protocol handlers to support USB HID Class
•USB protocol handlers to support USB DFU Class
•USB protocol handlers to support the common features of USB Audio Class commands
•Feature Unit:
–Set/get volume control
–Set/get mute control
–Set/get bass control
–Set/get treble control
•Mixer unit: set/get input/output gain control
•End point: set/get the audio streaming endpoint sampling frequency
•For unsupported case, the ROM code passes the requests to the application code for processing.
2.2.3USB Enumeration
USB enumeration is accomplished by interaction between the host PC and the T AS1020A. As described in Section
2.2.2, the TAS1020A can identify itself as an application device by reporting its application Vendor ID and Product
ID, or it can identify itself as a DFU device by reporting a Vendor ID of 0xFFFF and a Product ID of 0xFFFE. If the
TAS1020A fails to detect the presence of an EEPROM, or if an EEPROM is present but does not contain a valid
header, the Vendor ID of 0xFFFF and Product ID of 0xFFFE are reported. If an EEPROM is present, but contains
only valid header data, the Vendor ID and Product ID settings in the EEPROM header are reported, but the T AS1020A
firmware comes up as a DFU device in the DFU program mode. If an EEPROM is present, and contains both a valid
header and application code, the TAS1020A comes up as an application specific device.
For all cases where the TAS1020A comes up in the DFU program mode, once application code has been
downloaded, the TAS1020A is reset by a host-issued USB reset. After this reset, the TAS1020A comes up as an
application device. When the T AS1020A comes up as an application device, the ROM-resident boot loader retrieves
the application code from the EEPROM, if the EEPROM is not a device EEPROM, and then runs the application code.
It is the application code that connects the TAS1020A to the USB. During the enumeration that follows connection
to the USB, the application code identifies the device as an application specific device and the host loads the
appropriate host driver(s).
The boot loader and application code both use the CONT , SDW and FRSTE bits to control the enumeration process.
•The function connect (CONT) bit is set to a 1 by the MCU to connect the T AS1020A device to the USB. When
this bit is set to a 1, the USB DP line pullup resistor (PUR) output signal is enabled. Enabling PUR connects
the pullup on the PCB to the T AS1020A 3.3-V digital supply voltage. (When the T AS1020A powers up, this
bit is cleared to a 0 and the PUR output is in the high-impedance state.) This bit is not affected by subsequent
USB resets.
•The shadow the boot ROM (SDW) bit is set to 1 by the MCU to switch the MCU memory configuration from
boot loader mode to normal operating mode. Once set to 1, this bit is not affected by subsequent USB resets.
•The function reset enable (FRSTE) bit is set to a 1 by the MCU to enable the USB reset to reset all internal
logic including the MCU. However, the shadow the ROM (SDW) and the USB function connect (CONT) bits
are not reset. In addition, when the FRSTE bit is set, the reset output (RSTO
device is active whenever a USB reset occurs. This bit, once set, is not affected by subsequent USB resets.
) signal from the TAS1020A
2–8
Page 23
2.2.4TAS1020A USB Reset Logic
There are two mechanisms provided by the T AS1020A—an external reset MRESET and a USB reset. The reset logic
used in the TAS1020A is presented in Figure 2–2.
MRESET is a global reset that results in all the TAS1020A logic and the 8052 MCU core being reset. This input to
the TAS1020A is typically used to implement a power-on reset at the application of power, but it can also be used
with reset pushbutton switches and external circuits to implement global resets at any time. MRESET
asynchronous reset that must be active for a minimum time period of one microsecond.
The T AS1020A can also detect a USB reset condition. When this reset occurs, the TAS1020A responds by setting
the function reset (RSTR) bit in the USB status register (USBSTA). However, the extent to which the internal logic
is reset depends on the setting of the function reset enable bit (FRSTE) in the USB control register (USBCTL).
If the MCU has set FRSTE to 1, incoming USB resets are treated as global resets, with all T AS1020A logic and the
8052 MCU core being reset. However, the shadow the ROM (SDW) and the USB function connect (CONT) bits are
not reset. Also, if the USB reset results in a global reset being issued, an interrupt to the 8052 MCU is not generated.
But if the MCU has cleared FRSTE, incoming USB resets is treated as interrupts to the MCU (via INT0
corresponding function reset bit RSTR in the USB interrupt mask register USBMSK has been set by the MCU. If
neither FRSTE or RSTR has been set by the MCU, USB resets have no effect on the T AS1020A, other than resetting
the USB serial interface engine (SIE) and the USB buffer manager (UBM) in the TAS1020A.
Regardless of the status of FRSTE and bit RSTR in the USB interrupt mask register USBMSK, the function reset bit
RSTR in the USB status register USBST A is always set whenever a USB reset condition is detected. If the USB reset
results in the generation of a global reset, the global reset clears the function reset bit RSTR in USBST A. If, instead,
the USB reset results in an interrupt being generated, RSTR in register USBST A is cleared when the MCU writes to
the interrupt vector register VECINT while in the USB reset interrupt service routine (VECINT = 0x17).
is an
) if the
The TAS1020A has two reset outputs—RSTO
every time a USB reset occurs and bit FRSTE in the USB control register USBCTL is set. CRESET
as a codec reset. Although labeled a reset line, it has no direct relationship to MRESET
and CRESET. RSTO is activated every time MRESET is active, and
is typically used
or detected USB resets.
Instead, it is activated and deactivated when the on-chip 8052 MCU core writes a 0 and a 1, respectively , to the CRST
bit in the codec port interface control and status register CPTCTL.
2–9
Page 24
2.2.5USB Suspend and Resume Modes
The TAS1020A can recognize a suspend state. Figure 2–2 shows the logical implementation of the suspend and
resume modes in the T AS1020A. The T AS1020A enters a suspend mode if a constant idle state (j state) is observed
on the USB bus for a period of 5 ms. USB compliance also requires that a device enter a suspend state, drawing only
suspend current from the bus, after no more than 10 ms of bus inactivity , The TAS1020A supports this requirement
by creating a suspend interrupt to the on-chip MCU after a suspend condition has been present for 5 ms. Upon
receiving this interrupt, the MCU firmware can then take the steps necessary to assure that the device enters a
suspend state within the next 5 ms.
There are two ways for the T AS1020A device to exit the suspend mode: 1) detection of USB resume signaling and
2) proactively performing a local remote wake-up event.
2.2.5.1 USB Suspend Mode
When a suspend condition is detected on the USB, the suspend/resume logic sets the function suspend request bit
(SUSR) in the USB status register, resulting in the generation of the function suspend request interrupt SUSR. To
enter the low-power suspend state and disable all T AS1020A device clocks, the MCU firmware, upon receiving the
SUSR interrupt, must set the idle mode bit (IDL), which is bit 0 in the MCU power control (PCON) register. Setting
the IDL bit results in the T AS1020A suspending all internal clocks, including the clocks to the MCU. The MCU thus
suspends instruction execution while in the idle mode.
The MCU must not set the IDL bit while in the SUSR interrupt service routine (ISR), or while in any other ISR. As
described in Section 2.2.5.3, it is intended that the receipt of an INT0
state. But if the MCU has suspended instruction execution while in an ISR, subsequent INT0
as the MCU is still servicing an interrupt. For this reason then, it is necessary that IDL not be set while processing
an ISR. (As described in Section 2.2.5.3, an external wake-up event will resume clocks within the TAS1020A. But
even if the clocks to the MCU resume, if the MCU does not recognize INT0
core itself remains in the suspend state).
interrupt at the MCU result in exiting the suspend
activity is not recognized,
, the IDL bit remains set and thus the MCU
The SUSR bit is cleared while in the SUSR ISR by writing to the interrupt vector register VECINT . While servicing the
SUSR ISR, the VECINT output is 0x16 – the USB function suspend interrupt vector. As shown in Figure 2–2, the
occurrence of a write to VECINT, while the USB function suspend interrupt vector is being output, results in clearing
bit SUSR of the USB status register. (The data written to VECINT is of no consequence; the clearing action takes place
upon decoding the write transaction to VECINT).
2.2.5.2 USB Resume Mode
When the TAS1020A is in a suspend state, any non-idle signaling on the USB is detected by the suspend/resume
logic and device operation resumes. When the resume signal is detected, the T AS1020A clocks are enabled and the
function resume request bit (RESR) is set, resulting in the generation of the function resume request interrupt. The
function resume request interrupt to the MCU automatically clears the idle mode bit IDL in the PCON register, and
as a result the MCU exits the suspend state and becomes fully functional, with all internal clocks active. After the RETI
from the ISR, the next instruction to be executed is the one following the instruction that set the IDL bit. The RESR
bit is cleared while in the RESR ISR by writing to the interrupt vector register VECINT.
2.2.5.3 USB Remote Wake-Up Mode
The TAS1020A device has the capability to remotely wake up the USB by generating resume signaling upstream,
providing the host has granted permission to generate remote wake-ups via a SET_FEATURE
DEVICE_REMOTE_W AKEUP control transaction. If remote wakeup capability has been granted, the MCU firmware,
upon awakening from a suspend state, has to activate the remote wake-up request bit RWUP in the USB control
register USBCTL. Activation of RWUP consists of the MCU firmware writing a 1 followed by a 0 to RWUP. This action
creates a pulse, which results in the T AS1020A generating resume signaling upstream by driving a k state (non-idle)
onto the USB bus. The USB specification requires that remote wake-up resume signaling not be generated until the
2–10
Page 25
suspend state has been active for at least 5 ms. In addition, the specification requires that the remote wake-up resume
signaling be generated for at least 1ms but for no more than 15 ms. The 5 ms requirement is met by not entering the
suspend mode until an idle state, or j state, is detected, uninterrupted, for 5 ms. The RWUP pulse results in driving
a k state onto the USB bus for 1 to 2 ms, and thus the 15 ms requirement is also met. Moreover, if an application wishes
to extend the duration of the k state on the USB bus, it need only extend the pulse width of RWUP. The resulting
duration of the resume signaling is the duration of the RWUP pulse plus 1 to 2 ms.
The condition that activates a remote wake-up is a transition from 1 to 0 on one of the P3 port bits whose
corresponding mask bit has been set to zero. (When in the suspend mode, the XINT
input is treated as port bit P3.2).
As seen in Figure 2–2, the P3 mask register bits are gated with the P3 port input lines from the I/O port cells. The
gated P3 port bits are then all ORed together and the output is ANDed with the suspend signal. The output of this
logic drives the clock input of a flip-flop, and when the output of this logic transitions from 0 to 1, the flip-flop is set
to 1. The setting of this flip-flop to 1 results in the TAS1020A exiting the suspend state and resuming all clocks,
including those to the MCU core. The output of this flip-flop is also gated with bit XINTEN in the global control register
GLOBCTL, and the output of this gate drives the INT0
an INT0
interrupt to the MCU only if bit XINTEN has been set. Therefore, before entering a suspend state, the firmware
interrupt logic. This means that a remote wake-up generates
must set XINTEN if remote wake-up capability is to be enabled.
The wake-up interrupt is seen by the firmware as an XINT
an output value of 0x1F. If the XINT
pin is to be used as an event marker during normal operation, and if one of the
interrupt; that is, the interrupt vector register VECINT has
P3 port bits is to be used for a wake-up interrupt, the firmware must be able to distinguish between a wake-up interrupt
and a normal XINT
register. If this bit is set, the interrupt event is a wake-up interrupt; otherwise, the interrupt is a normal XINT
If an XINT
event should occur during a suspend mode, the event is ignored if the mask bit for P3.2 is set. (During a
suspend mode the TAS1020A clocks are disabled, and thus an incoming XINT
through the synchronization logic and activate the MCU INT0
interrupt. One technique would be to examine the state of the IDL bit in the MCU power control
interrupt.
interrupt event does not propagate
input).
2.2.6Adaptive Clock Generator (ACG)
The adaptive clock generator is used to generate two programmable master clock output signals (MCLKO and
MCLKO2) that can be used by the codec port interface and the codec device. Two separate and programmable
frequency synthesizers provide the two master clocks. This allows the TAS1020A to support different record and
playback rates for those devices that require separate master clocks to implement different rates. For isochronous
transactions, the ACG can also support USB asynchronous, synchronous, and adaptive modes of operation. The
ACG keeps count of the number of master clock events between USB SOF time marks, and the DCNTX/Y field of
the endpoint register IEPDCNTX/Y keeps track of the number of samples received between USB SOF time marks.
Synchronous isochronous operation can be accomplished by adjusting one of the two frequency synthesizers until
the correct number of master clock events is obtained between USB SOF time marks. Similarly, monitoring the
number of samples received between USB SOF events can accommodate adaptive isochronous operation. Here the
frequency synthesizer is adjusted to obtain the proper codec output rate for the number of samples received. The
TAS1020A can also accommodate asynchronous isochronous operation, and the input MCLKI is provided for this
case. For asynchronous isochronous operation, the external clock pin MCLKI is used to derive the data and sync
signal to the codec. However, the external clock that provides the input to pin MCLKI, instead of the master clock
output (MCLKO or MCLKO2) from the ACG, must also source the codec’s MCLK.
A block diagram of the adaptive clock generator is shown in Figure 2–1. Each frequency synthesizer circuit generates
a programmable clock with a frequency range of 12–25 MHz, and each frequency synthesizer output feeds a
divide-by-M-circuit, which can be programmed to divide by 1 to 16. As a result, the frequency range of each master
clock is 750 kHz to 25 MHz. Also, the duty cycle of each master clock is 50% for all programmable frequencies.
As indicated in Figure 2–1, multiplexers precede the master clocks MCLKO and MCLKO2. These multiplexers
provide the option of using the output of either frequency synthesizer (after division by the divide-by-M circuit) or the
MCLKI input (after division by the divide-by-I circuit) to source each master clock. Each master clock is also assigned
its own divide circuit to generate its associated CSCLK. The C-port serial clock (CSCLK) is derived by setting the
divide by B value in codec port interface configuration register CPTNCF4 [2:0] and the C-port serial clock2 (CSCLK2)
is derived by setting the divide by B2 value in codec port receive interface configuration register 4 CPTRXCNF4 [2:0].
2–11
Page 26
In addition, although not shown in Figure 2–1, each master clock is assigned its own CSYNC generator, with the
length and polarity of each CSYNC separately programmable.
6 MHz
Oscillator
PLL
MCLKI
Frequency
Synthesizer
Frequency
Synthesizer
ACG1DCTL[7:4]
Divide
1
by M1
ACG2DCTL[7:4]
Divide
2
by M2
ACG1DCTL[2:0]
Divide
by I
SOF
PSOF
4
4
3
ACGCTL[4]
ACGCTL[1]
16-Bit Counter
ACGCTL[3]
ACGCTL[6]
ACGCTL[0]
ACGCTL[7]
Figure 2–1. Adaptive Clock Generator
The ACG is controlled by the following registers. Refer to section A.5.3 for details.
FUNCTIONAL REGISTERACTUAL BYTE-WIDE REGISTERS
24-bit frequency register #1ACG1FRQ2ACG1FRQ1ACG1FRQ0
16-bit capture registerACGCAPHACGCAPL
8-bit synthesizer 1 divider control registerACG1DCTL
8-bit ACG control registerACGCTL
24-bit frequency register #2ACG2FRQ2ACG2FRQ1ACG2FRQ0
8-bit synthesizer 2 divider control registerACG2DCTL
ACGCAPH
ACGCAPL
MCLK0
Divide by B
CPTCNF4 [2:0]
MCLK02
Divide by B2
CPTRXCNF4 [2:0]
CSCLK
CSCLK2
The main functional modules of the ACG are described in the following sections.
2.2.6.1 Programmable Frequency Synthesizer
The 24-bit ACG frequency register value is used to program the frequency synthesizer, and the value of the frequency
register can be updated by the MCU while the ACG is running. The high resolution of each frequency value
programmed allows the firmware to adjust the frequency value by +LSB or more to lock onto the USB start-of-frame
(SOF) signal and achieve a synchronous mode of operation, a necessity for streaming audio applications. The 24-bit
frequency register value is updated and used by the frequency synthesizer only when MCU writes to the ACGFRQ0
register. The proper way to update a frequency value then is to write the least significant byte (ACGFRQ0) last.
The frequency resolution of the output master clock depends on the actual frequency being output. In general, the
frequency resolution decreases with increasing output frequencies. The clock frequency of the MCLKO output signal
is calculated by using the formula:
For N q 24 and N < 50, MCLKO frequency = 600/N MHz
For N = 50, MCLKO frequency = 12 MHz
where N is the value in the 24-bit frequency register (ACGFRQ). The value of N can range from 24 to 50. The six most
significant bits of the 24-bit frequency register are used to represent the integer portion of N, and the remaining 18
bits of the frequency register are used to represent the fractional portion of N. An example is shown below.
Example Frequency Register Calculation
Suppose the desired MCLKO frequency is 24.576 MHz. Using the above formula, N = 24.4140625 decimal. To
determine the binary value to be written to the ACGFRQ register, separately convert the integer value (24) to 6-bit
binary and the fractional value (4140625) to 18-bit binary. As a result, the 24-bit binary value is
011000.011010100000000000.
2–12
Page 27
The corresponding values to program into the ACGFRQ registers are:
Keep in mind that writing to register ACGFRQ0 loads the frequency synthesizer with the new 24-bit value in registers
ACGFRQ2, ACGFRQ1, and ACGFRQ0.
Example Frequency Resolution Calculation
To illustrate the frequency resolution capabilities of the ACG, the next possible higher and lower frequencies for
MCLKO can be calculated.
To get the next possible higher frequency of MCLKO (24.57600384 MHz), decrease the value of N by 1 LSB. Thus,
N = 011000.01 – 10100111 – 11111111 binary.
To get the next possible lower frequency of MCLKO (24.57599600 MHz), increase the value of N by 1 LSB. Thus,
N = 011000.01 – 10101000 – 00000001 binary.
For this example with a nominal MCLKO frequency of 24.576 MHz, the frequency resolution is approximately 4 Hz.
Table 2-2 lists typically used frequencies and the corresponding ACG frequency register values.
The capture counter and register circuit consists of a 16-bit free running counter which runs at the capture clock
frequency. The capture clock source can be selected by programming bits MCLK01S0 and MCLK01S1 in the
ACGCTL register. The options are the divided output of frequency synthesizer no. 1, the divided output of frequency
synthesizer no. 2, or the divided input clock MCLKI. At each USB start-of-frame (SOF) event or pseudo-start-of-frame
(PSOF) event, the capture counter value is stored into the 16-bit capture register. This value is valid until the next
SOF or PSOF signal occurs (~1 ms). The MCU can read the 16-bit capture register value by reading the ACGCAPH
and ACGCAPL registers. Because the counter is a free running counter, and because the count range of the counter
extends over several frames before rolling over and beginning the count anew, the capture count values obtained
are correlated over several SOF cycles. This attribute is useful should a case ever arise when the MCU fails to read
the capture counter after a SOF event, and thus skips an SOF cycle.
As shown in Figure 2–1, there is only one capture counter and register, and its capture clock frequency is always the
clock selection for MCLKO. This means that MCLKO2 cannot be synchronized to the incoming USB data stream.
However, MCLKO2 is intended to support record capability for those cases where record and playback are conducted
at different master clock frequencies. Synchronization to the USB bus for record is handled by the handshaking
protocol established between the assigned DMA channel and the USB buffer manager (UBM) (see Section 2.2.7.4.1,
Subsection Circular Buffer Operation for Isochronous IN Transactions for more detail). Thus it is not necessary that
MCLKO2 itself be synchronized to the USB bus.
2–13
Page 28
2.2.7USB Transfers
The T AS1020A device supports all USB data transfer types: control, bulk, interrupt, and isochronous. In accordance
with the USB specification, endpoint zero is reserved for the control endpoint and is bidirectional. In addition to the
control endpoint, the T AS1020A is capable of supporting up to 7 IN endpoints and 7 OUT endpoints. These additional
endpoints can be configured as bulk, interrupt, or isochronous endpoints.
2.2.7.1 Control Transfers
Control transfers are used for configuration, command, and status communication between the host PC and the
T AS1020A device. Control transfers to the T AS1020A device use IN endpoint 0 and OUT endpoint 0. The three types
of control transfers are control write, control write with no data stage, and control reads.
2.2.7.1.1 Control Write Transfer (Out Transfer)
The host PC uses a control write transfer to write data to the USB function. A control write transfer always consists
of a setup stage transaction and an IN status stage, and can optionally contain one or more data stage transactions
between the setup and status transactions. If the data to be transferred can be contained in the two byte value field
of the setup transaction data packet, no data stage transaction is required. If the control information requires the
transfer of more than two bytes of data, a control write transfer with data stage transactions will be required. The steps
followed for a control write transfer are:
Initialization Stage:
1.MCU initializes IN endpoint 0 and OUT endpoint 0 by programming the appropriate USB endpoint
configuration blocks. This entails programming the buffer size and buffer base address, selecting the buffer
mode, enabling the endpoint interrupt, initializing the TOGGLE bit, enabling the endpoint, and clearing the
NACK bit for both IN endpoint 0 and OUT endpoint 0.
Setup Stage Transaction:
1.The host PC sends a setup token followed by the setup data packet addressed to OUT endpoint 0. If the
data is received without an error, the USB Buffer Manager (UBM) writes the data to the setup data packet
buffer, sets the setup stage transaction (SETUP) bit to a 1 in the USB status register, returns an ACK
handshake to the host PC, and asserts the setup stage transaction interrupt. Note that as long as the setup
stage transaction (SETUP) bit is set to a 1, the UBM returns a NACK handshake for any data stage or status
stage transactions regardless of the endpoint 0 NACK or STALL bit values.
2.The MCU services the interrupt, reads the setup data packet from the buf fer, and decodes the command.
If the command is not supported or valid, the MCU should set the STALL bit in the OUT endpoint 0
configuration byte and the IN endpoint 0 configuration byte before clearing the setup stage transaction
(SETUP) bit. This causes the device to return a STALL handshake for any data stage or status stage
transactions. If the command decoded is supported, the MCU clears the interrupt, which automatically
clears the setup stage transaction bit. The MCU also sets the TOGGLE bit in the OUT endpoint 0
configuration byte to a 1. For control write transfers, the PID used by the host for the first OUT data packet
is a DATA1 PID and the TOGGLE bit must match.
Optional Data Stage Transaction:
1.The host PC sends an out token packet followed by a data packet addressed to OUT endpoint 0. If the data
packet is received without errors the UBM writes the data to the endpoint buffer, updates the data count
value, toggles the TOGGLE bit, sets the NACK bit to a 1, returns an ACK handshake to the host PC, and
asserts the endpoint interrupt.
2.The MCU services the interrupt and reads the data packet from the buf fer. T o read the data packet, the MCU
first must obtain the data count value. After reading the data packet, the MCU must clear the interrupt and
clear the NACK bit to allow the reception of the next data packet from the host PC.
2–14
Page 29
3.If the NACK bit is set to 1 when the in token packet is received, the UBM simply returns a NAK handshake
to the host PC. If the ST ALL bit is set to 1 when the in token packet is received, the UBM simply returns a
ST ALL handshake to the host PC. If a CRC or bit stuff error occurs when the data packet is received, then
no handshake is returned to the host PC.
Status Stage Transaction:
1.For IN endpoint 0, the MCU clears the data count value to zero, sets the T OGGLE bit to 1, and clears the
NACK bit to 0 to enable the data packet to be sent to the host PC. Note that for a status stage transaction
a null data packet with a DATA1 PID is sent to the host PC.
2.The host PC sends an IN token packet addressed to IN endpoint 0. After receiving the IN token, the UBM
transmits the null data packet to the host PC. If the data packet is received without errors by the host PC,
an ACK handshake is returned. Upon receiving the ACK handshake, the UBM toggles the TOGGLE bit, sets
the NACK bit to 1, and asserts the endpoint interrupt.
3.If the NACK bit is set to 1 when the IN token packet is received, the UBM simply returns a NAK handshake
to the host PC. If the STALL bit is set to 1 when the IN token packet is received, the UBM simply returns
a STALL handshake to the host PC. If no handshake packet is received from the host PC then the UBM
prepares to retransmit the same data packet again.
2.2.7.1.2 Control Read Transfer (In Transfer)
The host PC uses a control read transfer to read data from the USB function. A control read transfer consists of a
setup stage transaction, at least one in data stage transaction, and an out status stage transaction.
The steps followed for a control read transfer are:
Initialization Stage:
1.MCU initializes IN endpoint 0 and OUT endpoint 0 by programming the appropriate USB endpoint
configuration blocks. This entails programming the buffer size and buffer base address, selecting the buffer
mode, enabling the endpoint interrupt, initializing the TOGGLE bit, enabling the endpoint, and clearing the
NACK bit for both IN endpoint 0 and OUT endpoint 0.
Setup Stage Transaction:
1.The host PC sends a setup token followed by the setup data packet addressed to OUT endpoint 0. If the
data is received without an error, the UBM writes the data to the setup data packet buffer, sets the setup
stage transaction (SETUP) bit to a 1 in the USB status register, returns an ACK handshake to the host PC,
and asserts the setup stage transaction interrupt. Note that as long as the setup stage transaction (SETUP)
bit is set to a 1, the UBM returns a NACK handshake for any data stage or status stage transactions
regardless of the endpoint 0 NACK or STALL bit values.
2.The MCU services the interrupt, reads the setup data packet from the buf fer, and decodes the command.
If the command is not supported or is not valid, the MCU sets the STALL bit in the OUT endpoint 0
configuration byte and the IN endpoint 0 configuration byte before clearing the setup stage transaction
(SETUP) bit. This causes the device to return a STALL handshake for any data stage or status stage
transactions. If the command decoded is valid and is supported, the MCU clears the interrupt, which
automatically clears the setup stage transaction bit. The MCU also sets the TOGGLE bit in the IN endpoint
0 configuration byte to a 1. For control read transfers, the PID used by the host for the first IN data packet
is a DATA1 PID.
2–15
Page 30
Data Stage Transaction:
1.The data packet to be sent to the host PC is written to the IN endpoint 0 buf fer by the MCU. The MCU also
updates the data count value then clears the IN endpoint 0 NACK bit to a 0 to enable the data packet to be
sent to the host PC.
2.The host PC sends an IN token packet addressed to IN endpoint 0. After receiving the IN token, the UBM
transmits the data packet to the host PC. If the data packet is received without an error by the host PC, then
an ACK handshake is returned. The UBM then toggles the TOGGLE bit, sets the NACK bit to 1, and asserts
the endpoint interrupt.
3.The MCU services the interrupt and prepares to send the next data packet to the host PC.
4.If the NACK bit is set to 1 when the IN token packet is received, the UBM simply returns a NAK handshake
to the host PC. If the STALL bit is set to 1 when the IN token packet is received, the UBM simply returns
a STALL handshake to the host PC. If no handshake packet is received from the host PC, then the UBM
prepares to retransmit the same data packet again.
5.MCU continues to send data packets until all data has been sent to the host PC.
Status Stage Transaction:
1.For OUT endpoint 0, the MCU sets the T OGGLE bit to 1, then clears the NACK bit to a 0 to enable a data
packet to be sent by the host PC. Note that for a status stage transaction a null data packet with the DA T A1
PID is sent by the host PC.
2.The host PC sends an OUT token packet and the null data packet to OUT endpoint 0. If the data packet
is received without an error the UBM updates the data count value, toggles to the TOGGLE bit, sets the
NACK bit to a 1, returns an ACK handshake to the host PC, and asserts the endpoint interrupt.
3.The MCU services the interrupt. If the status transaction completed successfully, then the MCU clears the
interrupt and clears the NACK bit.
4.If the NACK bit is set to 1 when the OUT token packet is received, the UBM simply returns a NAK handshake
to the host PC. If the ST ALL bit is set to 1 when the OUT token packet is received, the UBM simply returns
a ST ALL handshake to the host PC. If a CRC or bit stuff error occurs when the data packet is received, no
handshake is returned to the host PC.
2.2.7.2 Interrupt Transfers
The T AS1020A supports interrupt data transfers both to and from the host PC. Devices that need to send or receive
a small amount of data with a specified service period should use the interrupt transfer type. IN endpoints 1 through
7 and OUT endpoints 1 through 7 can all be configured as interrupt endpoints.
2.2.7.2.1 Interrupt Out Transaction
The steps followed for an interrupt out transaction are:
1.MCU initializes one of the OUT endpoints as an out interrupt endpoint by programming the appropriate USB
endpoint configuration block. This entails programming the buffer size and buffer base address, selecting
the buffer mode, enabling the endpoint interrupt, initializing the toggle bit, enabling the endpoint, and
clearing the NACK bit.
2.The host PC sends an OUT token packet followed by a data packet addressed to the OUT endpoint. If the
data is received without an error then the UBM writes the data to the endpoint buffer , updates the data count
value, toggles the toggle bit, sets the NACK bit to a 1, returns an ACK handshake to the host PC, and asserts
the endpoint interrupt.
2–16
3.The MCU services the interrupt and reads the data packet from the buf fer. T o read the data packet, the MCU
must first obtain the data count value. After reading the data packet, the MCU clears the interrupt and clears
the NACK bit to allow the reception of the next data packet from the host PC.
Page 31
4.If the NACK bit is set to a 1 when the data packet is received, the UBM simply returns a NACK handshake
to the host PC. If the ST ALL bit is set to 1 when the data packet is received, the UBM simply returns a STALL
handshake to the host PC. If a CRC or bit stuff error occurs when the data packet is received, no handshake
is returned to the host PC.
NOTE: In double buffer mode for interrupt out transactions, the UBM selects between the X
and Y buffer based on the value of the toggle bit. If the toggle bit is a 0, the UBM writes the data
packet to the X buffer. If the toggle bit is a 1, the UBM writes the data packet to the Y buffer.
When a data packet is received, the MCU determines which buffer contains the data packet
by reading the toggle bit. However, when using double buffer mode, the possibility exists for
data packets to be received and written to both the X and Y buffer before the MCU responds
to the endpoint interrupt. In this case, simply use the toggle bit to determine which buffer
contains the data packet does not work. Hence, in double buffer mode, the MCU reads the X
buffer NACK bit, the Y buffer NACK bit, and the toggle bit to determine the status of the buffers.
2.2.7.2.2 Interrupt In Transaction
The steps followed for an interrupt in transaction are:
1.MCU initializes one of the IN endpoints as an in interrupt endpoint by programming the appropriate USB
endpoint configuration block. This entails programming the buffer size and buffer base address, selecting
the buffer mode, enabling the endpoint interrupt, initializing the toggle bit, enabling the endpoint, and setting
the NACK bit.
2.The data packet to be sent to the host PC is written to the buf fer by the MCU. The MCU also updates the
data count value and clears the NACK bit to 0 to enable the data packet to be sent to the host PC.
3.The host PC sends an IN token packet addressed to the IN endpoint. After receiving the IN token, the UBM
transmits the data packet to the host PC. If the data packet is received without errors by the host PC, an
ACK handshake is returned. The UBM then toggles the toggle bit, sets the NACK bit to a 1, and asserts the
endpoint interrupt.
4.The MCU services the interrupt and prepares to send the next data packet to the host PC.
5.If the NACK bit is set to a 1 when the in token packet is received, the UBM simply returns a NACK handshake
to the host PC. If the ST ALL bit is set to a 1 when the IN token packet is received, the UBM simply returns
a STALL handshake to the host PC. If no handshake packet is received from the host PC, then the UBM
prepares to retransmit the same data packet.
NOTE: In double buffer mode for interrupt IN transactions, the UBM selects between the X and
Y buffer based on the value of the toggle bit. If the toggle bit is a 0, the UBM reads the data
packet from the X buffer . If the toggle bit is 1, the UBM reads the data packet from the Y buffer .
2.2.7.3 Bulk Transfers
The TAS1020A supports bulk data transfers both to and from the host PC. Devices that need to send or receive a
large amount of non time-critical data should use the bulk transfer type. IN endpoints 1 through 7 and OUT endpoints
1 through 7 can be configured as bulk endpoints. T AS1020A supports single and double buffering for bulk transfers.
2.2.7.3.1 Bulk Out Transaction Using MCU
The steps for a bulk out transaction are as follows:
1.MCU initializes one of the OUT endpoints as an OUT bulk endpoint by programming the appropriate USB
endpoint configuration block. This entails programming the buffer size and buffer base address, selecting
the buffer mode, enabling the endpoint interrupt, initializing the toggle bit, enabling the endpoint, and
clearing the NACK bit.
2–17
Page 32
2.The host PC sends an OUT token packet followed by a data packet addressed to the OUT endpoint. If the
data is received without an error, the UBM writes the data to the endpoint buffer, updates the data count
value, toggles the toggle bit, sets the NACK bit to a 1, returns an ACK handshake to the host PC, and asserts
the endpoint interrupt.
3.The MCU services the interrupt and reads the data packet from the buf fer. T o read the data packet, the MCU
must first retrieve the data count value. After reading the data packet, the MCU clears the interrupt and
clears the NACK bit to allow the reception of the next data packet from the host PC.
4.If the NACK bit is set to 1 when the data packet is received, the UBM simply returns a NACK handshake
to the host PC. If the ST ALL bit is set to 1 when the data packet is received, the UBM simply returns a STALL
handshake to the host PC. If a CRC or bit stuff error occurs when the data packet is received, no handshake
is returned to the host PC.
NOTE: In double buffer mode for bulk OUT transactions, the UBM selects between the X and
Y buffer based on the value of the toggle bit. If the toggle bit is a 0, the UBM writes the data
packet to the X buffer. If the toggle bit is a 1, the UBM writes the data packet to the Y buffer.
When a data packet is received, the MCU determines which buffer contains the data packet
by reading the toggle bit. However, when using double buffer mode, data packets may be
received and written to both the X and Y buffer before the MCU responds to the endpoint
interrupt. In this case, simply using the toggle bit to determine which buffer contains the data
packet does not work. Hence, in double buffer mode, the MCU reads the X buffer NACK bit,
the Y buffer NACK bit, and the toggle bit to determine the status of the buffers.
2.2.7.3.2 Bulk In Transaction Using MCU
The steps followed for a bulk in transaction are:
1.MCU initializes one of the IN endpoints as an IN bulk endpoint by programming the appropriate USB
endpoint configuration block. This entails programming the buffer size and buffer base address, selecting
the buffer mode, enabling the endpoint interrupt, initializing the toggle bit, enabling the endpoint and setting
the NACK bit.
2.The data packet to be sent to the host PC is written to the buf fer by the MCU. The MCU also updates the
data count value then clears the NACK bit to a 0 to enable the data packet to be sent to the host PC.
3.The host PC sends an IN token packet addressed to the IN endpoint. After receiving the IN token, the UBM
transmits the data packet to the host PC. If the data packet is received without errors by the host PC, an
ACK handshake is returned. The UBM then toggles the toggle bit, sets the NACK bit to a 1, and asserts the
endpoint interrupt.
4.The MCU services the interrupt and prepares to send the next data packet to the host PC.
5.If the NACK bit is set to 1 when the in token packet is received, the UBM simply returns a NAK handshake
to the host PC. If the STALL bit is set to 1 when the IN token packet is received, the UBM simply returns
a ST ALL handshake to the host PC. If no handshake packet is received from the host PC, the UBM prepares
to retransmit the same data packet again.
NOTE: In double buffer mode for bulk IN transactions, the UBM selects between the X and Y
buffer based on the value of the toggle bit. If the toggle bit is a 0, the UBM reads the data packet
from the X buffer. If the toggle bit is a 1, the UBM reads the data packet from the Y buffer.
2.2.7.3.3 Bulk Out Transaction Through DMA
This transaction is used by mass storage class USB applications to move bulk data to an external device via the
TAS1020A DMA resources. The difference between MCU-supported bulk transactions and DMA-supported bulk
transactions lies in how the data in the assigned out endpoint buffer is distributed to its final destination. T wo modes
of DMA operation are possible. One mode is a software handshake mode utilizing synchronization communication
between the MCU, the USB Buffer Manager (UBM), and an external device. The second mode is a direct exchange
mode that bypasses communication with the MCU and directly outputs USB packets to an external device via the
DMA resources. Higher bandwidth transactions can be achieved in the direct exchange mode.
2–18
Page 33
In both modes, the on-chip C-port is used to output the received bulk data to an external device. To implement
DMA-supported transactions, the C-port must be programmed to operate in either a general-purpose (GP) mode or
an Audio Codec ’97 (AC97) mode. When in the general-purpose mode, SYNC is disabled when there is no valid data
in the buffer to be output; in the AC97 mode, the time slot valid bits in the tag field are disabled when there is no valid
data in the buffer to be output.
Software Handshake Using MCU, UBM, and External Device
Bulk data has the lowest priority of all transfers on the USB bus. But when there is little other activity on the USB bus,
bulk transfers can achieve significant transfer rates. Bulk transfer rates then can fluctuate greatly , and for this reason
it is sometimes necessary to monitor the transfer rate of bulk transfers in order to throttle back the transfer rate when
the rate exceeds the bandwidth of the target device. The software handshake mode is provided to enable the
implementation of just such a throttling of data.
The following steps explain the operation of the software handshake mode.
1.The MCU initializes one of the OUT endpoints as a bulk OUT endpoint by programming the appropriate USB
endpoint configuration block. This entails programming the buffer size and buffer base address, selecting
the buffer mode, enabling the endpoint interrupt, initializing the toggle bit, enabling the endpoint, and
clearing the NACK bit.
2.To configure a given DMA channel to process a given endpoint in a software handshake mode, the MCU
must
•Enable the handshake mode by setting the HSKEN bit in the DMA channel control register (DMACTL0
and DMACTL1) to 1. In this same register the MCU must also program the USB endpoint direction and
endpoint number fields.
•Program the DMA current buffer content register (DMABPCT0 and DMABPCT1) with the number of
bulk out packets to be handled by the DMA process without MCU intervention once the MCU has
invoked the DMA process.
•Program the DMA channel time slot assignment register (DMA TSH0 and DMA TSH1) with the time slot
assignments to be supported by the DMA channel and the number of bytes to be transferred for each
supported time slot.
3.The MCU must also appropriately configure the C-port. (See Section 2.2.7.4 for more detail on initializing
the C-port). Note that if the C-port is placed in mode 0 (general-purpose mode) the CPTBLK bit in the codec
port interface configuration register 4 must be set to 1 to assure that SYNC is disabled when there is no valid
data in the buffer to be output.
4.Data is now ready to be received. The UBM, after receiving the bulk out packet and placing it in the
appropriate buffer , toggles the toggle bit if the double-buffer mode isset, sets the NACK bit to 1, stores the
packet data count in the data count register, and issues an interrupt to the MCU.
5.If the external device indicates that it is ready to receive data, the MCU enables the DMA process by setting
the DMAEN bit the DMA channel control register (DMACTL0 and DMACTL1). (Handshaking between the
MCU and external device will have to have taken place earlier to determine the status of the external
device).
6.Once enabled, the DMA engine proceeds to transfer the contents of the buf fer(s) to the C-port for transmittal
to the external device. Data availability in the buffer(s) is determined by examining the NACK flags – which
are set to 1 when data has been received. For the double buffer case, the buffer to be used to retrieve data
for the C-port is determined by not only examining the NACK flags but also by monitoring the state of the
toggle bit. The NACK bit is cleared by the DMA logic (as opposed to the MCU) each time an entire buffer
content has been transferred to the C-port via DMA.
7.If the number of bulk out packets to be handled by the DMA process without MCU intervention is greater
than one (the number can be as high as 64K packets), multiple buffer writes take place before the DMA
process completes. Every time a data packet is written to a given buffer, the UBM generates the MCU
2–19
Page 34
endpoint interrupt. If the MCU wishes to remain autonomous to the DMA process, the MCU must mask off
the MCU endpoint interrupt (by clearing the OEPIE bit in the USB out configuration register OEPCNFx)
before enabling the DMA process.
8.When the DMA process completes, the DMA channel disables itself and issues a DMA0 or a DMA1 interrupt
to the MCU. Upon receiving the interrupt, the MCU knows that DMABPCT packets have been sent out to
the C-port. The MCU then enables the appropriate endpoint interrupt (if it had been previously masked off).
The process is now complete.
Direct Exchange Mode
This mode offers the highest bandwidth for bulk OUT transactions. The process is almost identical to the software
handshake mode, the only difference being that the Direct Exchange mode, once enabled, runs continuously until
disabled; whereas the Software handshake mode only remains active for the processing of DMABPCT packets. The
Direct Exchange mode is selected by clearing the bit HSKEN in the DMA channel control register (DMACTL0 and
DMACTL1). When the MCU enables the DMA process, after appropriately setting up the endpoint configuration
registers, the C-port configuration registers, and the DMA channel, the DMA process remains active until disabled
by the MCU. While the DMA channel is active, received packets continue to be retrieved from the appropriate endpoint
buffer and transferred to the C-port for transmission to the external device.
2.2.7.3.4 Bulk IN Transaction Using DMA
The T AS1020A does not support BULK IN using the DMA resources.
2.2.7.4 Isochronous Transfers
The TAS1020A supports isochronous data transfers both to and from the host PC. Devices that need to send or
receive data at a constant rate must use the isochronous transfer type rate if the bandwidth of the data exceeds the
USB bandwidth allotted to interrupt type transactions. IN endpoints 1 through 7 and OUT endpoints 1 through 7 can
all be configured as isochronous endpoints.
Isochronous transfers must include the use of a DMA channel; MCU-supported isochronous transfers are not
allowed. Since the TAS1020A has only two DMA channels, at any point in time only two isochronous transactions
can be concurrently supported by the TAS1020A.
To setup an isochronous IN or an isochronous OUT transaction, the MCU must initialize the appropriate IN or OUT
USB endpoint configuration block. For isochronous transactions, this entails programming the buffer size and buffer
base address, enabling the endpoint interrupt, setting the ISO bit (to flag that the endpoint is an isochronous
endpoint), clearing the NACK bit, and enabling the endpoint. When the ISO bit is set, the hardware configures the
buffer to be a single circular buffer (see Section 2.2.7.4.1), using the endpoint buffer size register I/OEPBSIZx and
buffer base address register I/O EPBBAXx. The size of the circular buffer is the size specified in I/OEPSIZx. (This
is not to be confused with the same value in I/OEPSIZx yielding two buffers of that size when the double buffer mode
is selected for control, interrupt, and bulk transactions.)
The T AS1020A DMA engine has two DMA channels. Each channel can be assigned to any IN or OUT endpoint that
has been configured as an isochronous endpoint. (As previously discussed, DMA channels can also be assigned to
bulk out endpoints). If an isochronous OUT endpoint receives data, the DMA channel assigned to the endpoint will
retrieve the data from the endpoint buffer and transfer it to the C-port for outputting to the external device. If a DMA
channel is assigned to an isochronous IN endpoint, the DMA channel transfers external device data received on the
C-port to the IN endpoint buffer.
Each DMA channel can only implement data flow between endpoint buffers and the C-port. The configuration of each
DMA channel includes a 14-bit field that defines which of the up to 14 time slots in the C-port audio frame the DMA
channel supports. Both DMA channels could thus service OUT endpoints, or IN endpoints, with each DMA channel
supporting different time slots in the audio frame.
Each DMA channel also provides a current buffer count register (DMABCNT0/1). For isochronous OUT transactions,
the count in the register represents the number of bytes being transferred from the OUT endpoint buffer to the C-port
2–20
Page 35
during the current USB frame. A new count is derived at each USB SOF event, and is the value of the write pointer
address setting minus the read pointer address setting at the time of the USB SOF event. The MCU can read the
content of this register.
The steps required to service DMA-supported isochronous transfers are:
1.The MCU initializes an IN or OUT USB endpoint configuration block. This entails programming the buf fer
size and buffer base address, setting the ISO bit, setting the number of bytes per isochronous channel,
clearing the NACK bit, and enabling the endpoint. Because the endpoint is configured as an isochronous
endpoint, the buffer configuration parameters are used to implement a circular buffer rather than one or two
linear buffers, and the size specified is the size of the single circular buffer.
2.The MCU configures the selected DMA channel. This entails:
•Programming registers DMA TSH0/1 and DMA TSL0/1, which consists of assigning the time slots to be
used and the number of bytes to be transferred per time slot.
•Programming register DMACTL0/1, which consists of setting the USB endpoint direction, selecting the
endpoint number, and setting the DMA channel enable bit DMAEN.
3.The MCU configures the C-port. This entails:
•Programming register CPTCNF1, which consists of setting the number of time slots per audio frame
and selecting the C-port interface mode (general purpose mode, AIC mode, etc.).
•Programming register CPTCNF2, which consists of setting the length of time slot 0 (number of CSCLK
serial clock cycles), setting the length of the remaining time slots (which are all the same in length), and
setting the number of data bits per time slot.
•Programming register CPTCNF3, which consists of:
•Setting the state of DDL Y . A 1 programs a one CSCLK clock delay on the data output and data input
signals with reference to the leading edge of CSYNC. A 0 removes the delay.
•Setting the state of TRSEN. A 1 sets the C-port output to the high-impedance state for those time
slots that have no valid data.
•Setting the state of CSCLKP . A 1 programs the C-port to be CSCLK falling edge active (CDA TO and
CSYNC transition on falling edge of CSCLK and DATI is sampled on rising edge of CSCLK). A 0
results in activity on the opposite edges of CSCLK.
•Setting the state of CSYNCP. A 1 programs CSYNC to be active high. A 0 programs CSYNC to be
active low.
•Setting the state of CSYNCL. A 1 programs the length of CSYNC to be the same number of CSCLK
cycles as time slot 0. A 0 programs CSYNC to be one CSCLK cycle in length.
•Setting the state of BYOR. A 1 results in the DMA reversing the byte order in moving data to/from the
endpoint buffer.
•Setting the state of CSCLKD. A 1 sets the CSCLK port as an input port (TAS1020A receives
CSCLK). A 0 sets the CSCLK port as an output port (TAS1020A sources CSCLK).
•Setting the state of CSYNCD. A 1 sets the CSYNC port as an input port (TAS1020A receives
CSYNC). A 0 sets the CSYNC port as an output port (TAS1020A sources CSYNC).
•Programming register CPTCNF4, which consists of:
•Specifying the 4-Bit field ATSL. This field defines which time slot is to be used for secondary
communication (command/status) address and data.
•Setting the state of CPTBLK. When DMA is to be used to transport USB bulk transfers to external
devices via the C-port, the C-port must be placed in either a general-purpose mode or an AC97
mode, and CPTBLK must be set to one. When the C-port is placed in the general-purpose mode, a
state of 1 for CPTBLK results in CSYNC only being present when valid data is present in the current
2–21
Page 36
frame. When the C-port is placed in the AC97 mode, a state of 1 for CPTBLK results in CSYNC
always being present, but the tag bits in time slot 0 being set to indicate the presence or absence of
data. When CPTBLK is set to 0, CSYNC and CSCLK are free running once the C-port is enabled.
•Specifying the 3-Bit field DIVB. This defines the divide ratio of MCLK to CSCLK.
•Programming bits 4–7 of register CPTCTL to enable or disable the C-port transmit and receive
interrupts. Bits 1–2 of register CPTCTL are used to select between primary and secondary codecs
when using two codecs in the AC97 mode. Bit 0 of register CPTCTL (CRST), when cleared to 0, is used
to issue resets to external devices via the CRESET
output pin.
NOTE: C-port registers CPTADR, CPTDATL and CPTDATH are accessed during run time
operation to set the address, the data, and the mode (receive (status) or command (write)) for
secondary communications. Registers CPTVSLL and CPTVSLH are only used when the AC97
mode is selected and are used to specify which time slots in the audio frame contain valid data.
Registers CPTRXCNF2, CPTRXCNF3, and CPTRXCNF4 must be initialized when the C-port
is used in the I
2
S mode (mode 5) to support an ADC and a DAC running at different frequencies.
2.2.7.4.1 Circular Memory Buffer Implementation
A significant feature of DMA-supported isochronous transfers is the circular memory structure used to buffer the
incoming data. In most applications, the C-port timing is derived from theUSB frame rate using a soft-PLL provided
in the T AS1020A firmware. However , the USB frame rate can vary within specified boundaries, and the output phase
of the PLL can lag (or lead) the input during such variations. If a linear ping pong buffer implementation is used,
tolerance must be built into switching between buffers to accommodate all possible magnitudes of variation in the
relative timing between the input and output time references. A circular buffer topology greatly simplifies the
implementation of the buffer as the need for decision points on when to switch buffers is eliminated.
The circular buffer implementation used in TAS1020A utilizes the same endpoint start (I/OEPBBAXx) and size
(I/OEPBSIZx) assignment used by the linear buffer implementation, and the size of the circular buffer is the size
specified in I/OEPBSIZx. The circular buffer implementation does require the use of two additional registers – a read
pointer and a write pointer. These two registers are controlled by hardware, but are made available to the MCU for
debug purposes.
Circular Buffer Operation for Isochronous OUT Transactions
The operation of the circular buffer for isochronous OUT transactions is as follows.
•Initially, the read and write pointers are set in hardware to the OUT endpoint start address.
•As the first packet of isochronous data addressed to the endpoint is received, the UBM stores the data into
the circular buffer and updates the value of the write pointer by a count of one for each byte written into the
buffer.
•As soon as the DMA channel detects that the read and write pointers are not the same value (data is
available), the DMA channel could begin immediately retrieving data and outputting it to the C-port.
However, the DMA channel waits until the next USB SOF is received.
•Once the DMA channel has waited until the next SOF is received, the buffer contains a full packet of data.
Upon receiving SOF , the DMA channel further waits until the start of the next C-port frame and then begins
transferring the buffered data to the C-port, updating the read pointer by one count for each byte of data
transferred. At the C-port the data is output to the external device in accordance with the timing
requirements of the external device (8 frames for 8 kHz audio sampling, 48 frames for 48 kHz audio
sampling, etc.). The DMA channel continues to retrieve data from the buffer and output it to the C-port,
update the read pointer, and check the value of the write pointer. Should the DMA-controlled read pointer
value ever equal the value of the UBM-controlled write pointer, the process goes on hold and awaits the
next USB SOF, where the process again resumes.
2–22
When the UBM completes writing a packet of data into the endpoint buffer , it loads the data count value of
that packer (number of data samples, not bytes) into field DCNTX/Y of register OEPDCNTX/Yx. The register
chosen, OEPDCNTX or OEPDCNTY, is determined by the LSB of the frame count register USBFNL. An
Page 37
LSB value of 1 chooses OEPDCNTY ; a value of 0 chooses OEPDCNTX. This count value does not play a
role in implementing the data flow for isochronous out transactions, but is provided for and can be accessed
by the MCU. As is discussed in the next section, the counts do play a role in implementing the data flow for
isochronous in transactions.
•The streaming of audio data via the DMA channel continues indefinitely until the DMA engine is halted by
the MCU.
Circular Buffer Operation for Isochronous IN Transactions
For isochronous out transactions, the handshake implemented between the USB bus and the output device ensures
that at each USB SOF event, the output has access to a complete USBframe of data. For isochronous in transactions,
the mirror condition must be true: the handshake implemented between the USB bus and the input device must
ensure that at each USB SOF event, the UBM has access to one or more complete frames of device data.
Isochronous out transactions also ensure, by definition, that a complete USB frame of data is transmitted between
USB SOF events. But the mirror condition here is not true, there may not be an integer number of device frames
received between USB SOF events.
If, at each USB SOF event, the UBM is to have access to one or more complete frames of data from the input device,
the latest codec frame available to the UBM has to have completed prior to the USB SOF event. But it is not known
when the last input device frame to complete prior to the USB SOF event occurs. Thus a timing mark must be set
up to mark the worse case arrival time of the last complete input device frame prior to the USB SOF event. The slowest
sampling rate supported for an input device is set at 8 kHz (8 kHz audio sampling). At 8 kHz, a frame arrives from
the input device every 0.125 milliseconds, which is 1500 12 MHz USB clock periods. Thus a time mark can be set
to occur 1500 clock periods before the next USB SOF event. When this time mark occurs, the DMA completes the
current input device frame, if a frame is currently being received, and then sets a handshake flag. The DMA also
updates the content of register IEPDCNTX/Y with the total number of samples collected since the previous
handshake flag was set. When the USB SOF event occurs, the UBM looks at the flag to see if data is available. If
data is available, the UBM refers to the count in the register to determine how much data is to be output on the next
isochronous in transaction.
T o accommodate variations in the number of clocks at the output of the soft PLL, with respect to the incoming 12 MHz
USB data rate, the time mark count is actually set to 151 1, rather than 1500. The extra 1 1 clock periods assures that
the last frame prior to the USB SOF event will have completed. The flag used is the NACK bit in the IEPDCNTX/Y
register, and the data count is the 7-bit DCNTX/Y field in the same register. For isochronous in transactions, the
register chosen, IEPDCNTX or IEPDCNTY, is also determined by the LSB of the frame count register USBFNL. But
in the case of isochronous in transactions, an LSB value of 1 chooses IEPDCNTX and a value of 0 chooses
IEPDCNTY. The selection logic for isochronous in transactions then is the reverse of that used for isochronous out
transactions.
The operation of the circular buffer for isochronous in transactions is as follows.
•Initially , the read and write pointers are set in hardware to the IN endpoint start address. At the same time
the NACK flags in the IEPDCNTX and IEPDCNTY registers are set to logic 1 and the DCNTX and DCNTY
counts are cleared.
•As the input device frames are received, they are stored in the circular buffer by the DMA engine. As each
byte is stored in the buffer , the DMA engine updates the write pointer by one count, and also keeps count
of the number of samples being stored.
•When the time mark occurs, marking that there are 1511 USB clock periods remaining until the next USB
SOF event occurs, the DMA engine awaits the completion of the current incoming input device frame (if one
is currently being received). When the incoming input device frame completes, the DMA engine sets the
NACK flag in IEPDCNTX/Y to logic 0 and loads the number of samples received into the DCNTX/Y field
of IEPDCNTX/Y.
•At this time, the DMA engine zeroes its running count of data samples and awaits the next input device
frame. For the DMA engine, the process repeats, and at the next time mark, the DMA engine sets the NACK
flag in IEPDCNTX/Y to logic 0 and loads the number of samples received into the DCNTX/Y field of
IEPDCNTXY.
2–23
Page 38
•At the same time that the DMA engine reinitializes itself to receive the next input device frame, the UBM
has noted the clearing of the NACK flag in IEPDCNTX/Y . When this occurs, the UBM knows that one or more
complete frames reside in the circular buffer , starting at the address pointed to by the read buffer, and that
the integer number of frames comprise a total of DCNTX/Y samples. When the USB SOF event occurs, the
UBM is thus prepared and can respond to the USB isochronous in transaction when it occurs. As the UBM
retrieves data during the isochronous in transaction, it updates the read pointer by one count for each byte
retrieved. When DCNTX/Y samples have been output, the NACK bit in IEPDCNTX/Y is set back to logic
1 and the isochronous transaction is terminated. The UBM now awaits the clearing of the NACK bit in
IEPDCNTX/Y and the occurrence of the next USB SOF event, at which time the process repeats. The UBM
now continues to alternate (ping pong) between the data count and NACK flag value in register IEPDCNTX
and the data count and NACK flag value in register IEPDCNTY until the DMA process is terminated by the
MCU.
•If an isochronous in token is received when there is no new data to be output (the NACK flag bits in both
IEPDCNTX and IEPDCNTY registers are at logic 1), the UBM will respond to the isochronous in request
with a NULL packet.
2.2.8Microcontroller Unit
The T AS1020A chip contains an 8-bit microcontroller core for control and supervisory functions. The microcontroller
core used is based on the industry standard 8052. It is software compatible (including instruction execution times)
with the industry standard 8052AH and 8052BH discrete devices, having all their core features plus the additional
features corresponding to standard 8052 / 8032 / 80C52BH / 80C32BH / 87C52 parts – except the ONCE mode and
program lock are not supported.
The MCU core has three 16-bit timer/counter units and a full-duplex serial port (UART). The timer/counter units and
the UART are made available via the port 3 bits; thus some of the port 3 bits have dual functionality assignments in
accordance with the 80C51 family of microcontrollers (see Section 2.2.1 1 for more detail on the dual functionality of
port 3).
2.2.9External MCU Mode Operation
An external MCU mode of operation is provided for firmware development using an in-circuit emulator (ICE). The
external MCU mode is selected by setting pin EXTEN on the TAS1020A high. When the external MCU mode is
selected, the internal 8052 MCU core of the T AS1020A is disabled. Also in the external MCU mode, the GPIO ports
are used for the external MCU data, address, and control signals. Refer to section 1.7, T erminal Functions – ExternalMCU Mode, for details. When in the external mode of operation, the external MCU or ICE is able to access the memory
mapped IO registers, the USB configuration blocks and the USB buffer space in the TAS1020A.
Texas Instruments has developed a T AS1020A evaluation module (EVM) to allow customers to develop application
firmware and to evaluate device performance. The EVM board provides a 40-pin dip socket for an ICE and headers
to allow expansion of the system in a variety of ways.
2.2.10 Interrupt Logic
The 8052 MCU core used in the TAS1020A supports the five standard 8052 MCU interrupt sources. These five
standard MCU interrupt sources are timer 0, timer 1, serial port, external 1 (INT1
0, timer 1, and serial port interrupts are MCU-internal interrupts, but INT0
and INT1 are external to the MCU core.
Figure 2–2 shows the associated interrupt circuitry external to the MCU core, but within the TAS1020A chip. INT0
is input into the MCU core via port 3 bit P3.2, and INT1 is input into the MCU core via port 3 bit P3.3. P3.3 can also
be configured, under firmware control, to serve as a general-purpose IO (GPIO) port bit. But the input side of P3.2
must be dedicated to servicing the INT0
are ORed together to generate the INT0
function, as all additional interrupt sources from within the T AS1020A device
signal into port 3, bit P3.2. The other interrupt sources are: the eight USB
IN endpoints, the eight USB OUT endpoints, USB function reset, USB function suspend, USB function resume, USB
start-of-frame, USB pseudo start-of-frame, USB setup stage transaction, USB setup stage transaction over-write,
codec port interface transmit data register empty , codec port interface receive data register full, I
data register empty , I
.
XINT
2
C interface receive data register full, DMA channel 0, DMA channel 1, and the external interrupt
), and external 0 (INT0).The timer
2
C interface transmit
2–24
Page 39
P3.7–IN
P3.6–IN
P3.5–IN
P3.4–IN
P3.3–IN
P3.1–IN
P3.0–IN
XINT
(P3.2–IN)
P3MSK0
P3MSK2
P3 Mask Register
(P3MSK)
7 6 3 2 1 0
P3MSK7
48 MHz
Clk
D
Q
Set
Set
RESR SUSR RSTR
Cl Cl Cl
Set
0 4 5 6 7
USB Status
Register (USBSTA)
Decode
Resume Int
Decode
Suspend Int
Decode USB
Reset Int
Turn
’1’
Suspend
Off
Turn
Q
D
On
CL
Suspend
Remote ”Wake–Up Interrupt
USB Reset Interrupt
Function Suspend
Request Interrupt
D
CL
Q
XINT
Synchronized
Function Resume
Request Interrupt
IDL
7 1 0
Q
Q
Q
Q
24 MHz Clk
P3.7–IN
D
D
D
24 MHz Clk
D
XINTEN
7 6 5 0
Global Control Register
(GLOBCTL)
SUSR RSTR
RESR
0 4 5 6 7
USB Interrupt Mask Register
(USBMSK)
Internal Interrupts
(After Masks Applied)
Must be programmed to be
low level triggered (ITO bit
in MCU’s TCON control
register = 0), as multiple
internal TAS1020A events
can occur concurrently. The
internal hardware assures that
each interrupt remains low until
the MCU signals that the interrupt
has been serviced.
P3.2–IN
P3.0–IN
Clear USB Serial Interface Engine (SIE)
and USB Buffer Manager (UBM)
Interrupts
clk
Reset
Decode
> 5 ms
Suspend
Counter
En
Figure 2–2. TAS1020A Interrupt, Reset, Suspend, and Resume Logic
DP
USB Bus
Logic
Suspend
DM
clk
Reset
En
Counter
Interrupt Vector Reg
(VECINT)
MCU write to Interrupt
Decode
> 2.5 us
Decode
/XINT Int
Vector Register ”clears”
current vector to next
vector, or to 24h if no
other interrupt pending
FRSTE
0 3 4 5 7
USB Control Register
(USBCTL)
PLL
SubSystem
MRESET
TAS1020A
Clocks
Power Control
Register (PCON)
WE D[0:7] NX2 NX1
RST
Global Reset
RSTO
8052 MCU
CORE
0 1 7
CRST
CRESET
Codec Port Interface Control
and Status Register (CPTCTL)
configured as an input, or if the device driving the pin cannot guarantee the proper polarity of the input during Suspend, the mask bit P3MSKn must be set to a logic 1 to mask off the pin’s ability to
awaken the TAS1020A.
When in Suspend mode, and when the firmware has set the IDL bit in the MCU’s PCON register, the clock to the MCU is suspended.Activity on /XINT or one of the enabled P3 Port lines
cancels the Suspend mode and resumes the clock.
Logic diagrams represent fuctional operation only. They do not necessarily represent implementation.
NOTES: /MRESET will always reset MCU and TAS1020A logic. USB reset will reset MCU and TAS1020A logic only if the control bit FRSTE is set.
Port 3 GPIO pins can be used to wake up the TAS1020A from the Suspend mode. A high to low transition of duration 2.0 ns or greater during Suspend awakens the TAS1020. However, if the pin is not
For simplicity, I/O Ports are not shown. P3.x–IN pins represent the input lines from the I/O Port that interfaces the internal input and output lineswith the single external bi–directional line. (See Figure 2–4)
2–25
Page 40
The events that trigger the interrupt sources are:
•USB OUT endpoint interrupts: these interrupts are issued by the USB Buffer Manager (UBM) whenever a
complete data packet has been received and stored in an endpoint buffer. Each endpoint is assigned a
dedicated OUT endpoint interrupt. For isochronous transactions, however, OUT endpoint interrupts are not
issued. The firmware must clear OUT endpoint interrupts by writing to the interrupt vector register.
•USB IN endpoint interrupts: these interrupts are issued by the USB buffer manager (UBM) whenever it
receives an ACK handshake packet from the host PC indicating that a data packet sent by the UBM was
received without error. Each endpoint is assigned a dedicated IN endpoint interrupt. For isochronous
transactions, however, IN endpoint interrupts are not issued. The firmware must clear IN endpoint interrupts
by writing to the interrupt vector register.
•USB function reset interrupt: whenever the host PC issues a USB reset, the bit RSTR in the USB status
register USBST A is set. The setting of this bit causes all of the USB-related logic blocks in the TAS1020A
to be reset. If the function reset enable (FRSTE) bit in the USB control register USBCTL is set, the setting
of bit RSTR in the USB status register results in a global reset being issued – which resets the MCU core
and activates the reset output RSTO
. If bit FRSTE is not set, the setting of bit RSTR results in the USB
function reset interrupt being issued. If a global reset is issued, it clears the USB status register USBSTA,
and thus clears bit RSTR. If a USB function reset interrupt is issued, the interrupt and bit RSTR must be
cleared in firmware by writing to the interrupt vector register.
•USB function suspend interrupt: whenever the host PC keeps the USB bus in the idle or j state for more
than 5 ms, bit SUSR in the USB status register USBST A is set. This, in turn, results in the activation of the
USB function suspend interrupt. The interrupt and bit SUSR must be cleared in firmware by writing to the
interrupt vector register.
•USB function resume interrupt: whenever a suspend state is active and the host PC resumes activity on
the USB bus, bit RESR in the USB status register USBST A is set. This, in turn, results in the activation of
the USB function resume interrupt. The interrupt and bit RESR must be cleared in firmware by writing to
the interrupt vector register.
•USB start-of-frame interrupt: whenever the TAS1020A detects the reception of a start-of-frame (SOF)
packet from the host PC, bit SOF in the USB status register USBSTA is set. This, in turn, results in the
activation of the USB start-of-frame interrupt. The interrupt and bit SOF must be cleared in firmware by
writing to the interrupt vector register.
•USB pseudo start-of-frame interrupt: the TAS1020A employs a counter that runs between USB
start-of-frame events, and is cleared upon every reception of a USB SOF event. This counter is included
in the TAS1020A to generate pseudo start-of-frame interrupt in case the SOF packet on the USB bus is
corrupted. This is done to maintain synchronization to the USB bus and maintain the fidelity any on going
streaming audio application. If this count ever reaches a value representative of a time span longer than
the 1 ms period of a USB frame, a USB SOF was not received. In such an event, bit PSOF in the USB status
register USBSTA is set. This, in turn, results in the activation of the USB pseudo start-of-frame interrupt.
The interrupt and bit PSOF must be cleared in firmware by writing to the interrupt vector register.
•USB setup stage transaction interrupt: whenever a control transaction is initiated by the host PC, and the
setup data packet following the setup token packet is received without error, bit SETUP in the USB status
register USBST A is set. This, in turn, results in the activation of the USB setup stage transaction interrupt.
The interrupt and bit SETUP must be cleared in firmware by writing to the interrupt vector register.
•USB setup stage transaction overwrite interrupt: the USB1.1 specification states that should a setup
transaction be received before a previously initiated control transaction is complete, the current control
transaction must be aborted and the new transaction processed. The USB setup stage transaction interrupt
addresses this requirement. The timing conditions under which this interrupt is issued are shown in
Figure 2–3.
In Figure 2–3, the host has sent two control transactions. Having received the setup data packet of the first
2–26
Page 41
transaction without error, the SETUP bit in the USB status register USBST A is set and the USB setup stage
transaction interrupt issued. While the MCU core is still processing the USB setup stage transaction
interrupt (as indicated by the set state of the SETUP bit, which the MCU does not clear until exiting the USB
setup stage transaction interrupt service routine), the host issues another control transaction. Issuing
another USB setup stage transaction interrupt would not be of value, as the MCU is still in the USB setup
stage transaction interrupt service routine processing the first control transaction. Thus the USB setup
stage transaction overwrite interrupt is used to indicate that a second control transaction has been received
while still processing the first control transaction. If a setup data packet is received without error while the
SETUP bit is set, the STPOW bit in the USB status register USBSTA is set and the USB setup stage
transaction overwrite interrupt is issued. The interrupt and STPOW bit must be cleared in firmware by writing
to the interrupt vector register.
USB Setup Stage
Transaction Overwrite Interrupt
USB Setup Stage
Transaction Interrupt
USB Bus Traffic
SETUP Bit In
USB Status Register
STPOW Bit In
USB Status Register
SETUP
TOKEN PACKET
CONTROL TRANSACTION #1
SETUP
DATA PACKET
ACK
PACKET
SETUP
TOKEN PACKET
CONTROL TRANSACTION #2
MCU CORE PROCESSING INTERRUPT
SETUP
DATA PACKET
ACK
PACKET
Figure 2–3. Activation of Setup Stage Transaction Overwrite Interrupt
•Codec port interface transmit data register empty interrupt: codec port modes AC ’97 and AIC, and the
general-purpose codec port mode, all support secondary communication. Both secondary read and
secondary write modes are supported. For the write mode (R/W bit in the codec port interface address
register CPTADR cleared to logic 0), command/status can be sent to the codec port by the MCU for
transmission to the codec. The codec hardware inserts the data into the proper time slot in the codec frame
and transmit the data. The MCU writes the command/status data to the codec port interface data register
CPTDATL (and register CPTDATH for 16-bit data). The data written by the MCU is not output until the
address is written to the codec port interface address register CPTADR. Upon writing the address to
CPT ADR (and clearing bit R/W), the codec clears the transmit data register empty bit TXE in the codec port
interface control and status register CPTCTL to logic 0. The clearing of this bit flags the hardware that new
command/status data has been output. When the command/status data is taken by the codec, bit TXE is
set to 1, and the codec port interface transmit data register empty interrupt is issued. The firmware must
clear this interrupt by writing to the interrupt vector register, but this action does not clear the TXE bit.
•Codec port interface receive data register full interrupt: codec port modes AC ’97 and AIC, and the
general-purpose codec port mode, all support secondary communication. Both secondary read and
secondary write modes are supported. For the read mode (R/W bit in the codec port interface address
register CPT ADR set to logic 1), command/status data received by the codec can be retrieved by the MCU.
Upon receiving secondary command/status data, the codec hardware transfers the data to the codec port
interface data register CPTDA TL (and CPTDATH if 16-bit data is being transferred), sets the receive data
register full bit RXF in codec port interface control and status register CPTCTL to logic 1, and issues the
codec port interface receive data register full interrupt. When the MCU reads the command/status data,
RXF is cleared to 0. The firmware must clear this interrupt by writing to the interrupt vector register, but this
action does not clear bit RXF . (Note that all secondary command/status receive transactions take two codec
frames to complete. First the MCU writes the address of the command/status data to be read to CPT ADR
and sets the R/W bit in register CPTADR to logic 1. On the next codec frame, the address is sent to the
codec. On the following codec frame, the requested data is output by the codec and received at the
TAS1020A codec port.)
2–27
Page 42
•I2C interface transmit data register empty interrupt: whenever the MCU writes to the I2C interface transmit
data register I2CDATO, it results in the hardware clearing the transmit data register empty bit TXE in the
2
I
C interface control and status register I2CCTL. When the data byte is output onto the I2C bus, the
hardware sets TXE back to logic 1 and the I
2
C interface transmit data register empty interrupt is issued. The
firmware must clear this interrupt by writing to the interrupt vector register, but this action does not clear the
TXE bit.
2
•I
C interface receive data register full interrupt: whenever the I2C interface receive data register I2CDA TI
receives a byte of data off the I
interface control and status register I2CCTL and issues the I
2
C bus, the hardware sets the receive data register full bit RXF in the I2C
2
C interface receive data register full interrupt.
The firmware must clear this interrupt by writing to the interrupt vector register, but this action does not clear
the RXF bit. The RXF bit in the I
MCU reads the contents of the I
2
C interface control and status register I2CCTL is cleared whenever the
2
C interface receive data register I2CDATI.
•External interrupt XINT: this interrupt is provided to give a user the ability to issue interrupts from external
sources. XINT
as shown in Figure 2–2. As Figure 2–2 shows, XINT
period of the 24 MHz clock to assure that the interrupt is recognized. Also, XINT
state (logic 1) and then transition back to the active state (logic 0) if another XINT
recognized. If XINT
is logic 0 active. The interrupt is sampled by synchronization logic internal to the T AS1020A,
must be remain in an active-low state for at least one
must transition to an inactive
interrupt is to be
remains in the active low state, it does not result in issuing multiple XINT interrupts. The
firmware must clear this interrupt by writing to the interrupt vector register.
•DMA channel 0 interrupt: this interrupt becomes active only during bulk OUT transactions utilizing DMA
channel 0 when the software handshake mode is selected (see Section 2.2.7.3.3). In this mode of operation
the programmable variable DMABPCT – registers DMABPCT0 and DMABPCT1 – instructs DMA channel
0 as to how many bulk OUT packets it must handle before ceasing operation and issuing the DMA channel
0 interrupt. The firmware must clear this interrupt by writing to the interrupt vector register.
•DMA channel 1 interrupt: this interrupt is identical in operation to the DMA channel 0 interrupt. Note that
the same count variable DMABPCT is used for both DMA interrupts. In fact, as described in Section 2.2.12,
only one of the two DMA channels can be active when supporting a bulk OUT transaction. – thus the need
for only one count variable DMABPCT.
The interrupts for the USB IN endpoints and USB OUT endpoints can be masked. An interrupt for a particular endpoint
occurs at the end of a successful transaction to that endpoint. A status bit for each IN and OUT endpoint also exists.
However, these status bits are read only, and therefore, these bits are intended to be used for diagnostic purposes
only . After a successful transaction to an endpoint, both the interrupt and status bit for an endpoint are asserted until
the interrupt is cleared by the MCU.
The USB function reset, USB function suspend, USB function resume, USB start-of-frame, USB pseudo start-offrame, USB setup stage transaction, and USB setup stage transaction over-write interrupts can all be masked. A
status bit for each of these interrupts also exists. Refer to the USB interrupt mask register and the USB status register
for more details. Note that the status bits for these interrupts are read only. For these interrupts, both the interrupt
and status bit are asserted until the interrupt is cleared by the MCU.
The codec port interface transmit data register empty, codec port interface receive data register full, I
transmit data register empty , and I
2
C interface receive data register full interrupts can all be masked. A status bit for
2
C interface
each of these interrupts also exists. Note that the status bits for these interrupts are read only. However, for these
interrupts, the status bits are not cleared automatically when the interrupt is cleared by the MCU. Refer to the codec
port interface control and status register CPTCTL and the I
2
C interface control and status register I2CCTL for more
details.
The external interrupt input (XINT
) is logically ORed with the on-chip interrupt sources. An enable bit exists for this
interrupt in the global control register GLOBCTL. This interrupt does not have a status bit.
2–28
Page 43
2.2.11 General-Purpose I/O (GPIO) Ports
Figure 2–4 shows the architecture of the MCU port bits in the T AS1020A. There are two GPIO ports visible to external
devices – port 1 and port 3. In examining the functionality of these ports two interfaces must be examined – the I/O
driver interface provided at the I/O pads of the TAS1020A and the interface provided at the M8052 MCU core.
At each I/O pad servicing the GPIO ports, the individual data input (DI) and data output (DO) lines into the pads are
combined into one bidirectional external line. Each I/O pad is also assigned a separate enable line EN. When EN is
a logic 0 the output driver is enabled, and when EN is a logic 1 the input buffer is enabled. This implementation means
that as an output the GPIO pin actively sinks current in the logic 0 state, but drives the logic 1 state through the 100-µa
pullup. However, to obtain an acceptable rise time when the output transitions from a logic 0 to a logic 1, the EN signal
remains active for two clock periods after the output data transitions from a logic 0 to a logic 1. For two clock periods
then the output buffer actively drives the logic 1 output level before yielding to the 100 µa pullup. This implementation
also means that to use a GPIO pin as an input, the DO line for that pin must be set to a logic 1 and the external source
driving the pin must be able of sinking the 100 µa pullup when driving a logic 0. (Some port 3 bits also require that
the alternate output data source be at logic 1 to use the pin as a GPIO input).
The T AS1020A global control register has two bits – P1PUDIS and P3PUDIS – that control the enabling and disabling
of the 100 µa pullups for port 1 and port 3 respectively. If firmware disables the 100-µΑ pullups in one of the ports
– by setting P1PUDIS or P3PUDIS to logic 1 – then when a port bit is configured as an output, a logic 1 output will
transition to a high-impedance state after the two clock delay period has expired. At power-up, and after a global reset,
all GPIO pins are configured as input ports with all 100 µΑ pullups enabled.
The MCU core implements each GPIO bit using three signals – DI, DO, and EN. For both port 1 and port 3, EN is
derived from DO by ANDing DO with a two clock delayed version of DO. This provides a two-clock delay in
transitioning EN from a logic 0 to a logic 1 after DO transitions from a logic 0 to a logic 1. It is this circuitry that results
in the output buffer in the I/O pad actively driving a logic 1 output for two clock periods before yielding to the 100-µA
pullup or transitioning to a high-impedance state.
2–29
Page 44
UART Rx Data
I/O
TAS1020A
Q
D
Delay
Q
D
P3.0
MCU
Bus
Drivers
MCU Clk
100 ua
EN
Alternate
Data Out
ADO
UART
UART Tx Data
(Mode 0)
P3.0
DI
DO
Q
MCU
Data Out
MCU
Data In
MCUDI
MCUDO
Tx Data (Mode 0)
Mode 0
Tx Data
100 ua
MCU Read
Alternate
ADI
Tx Data (Mode 0)
Send
UART Tx Data
Data In
Tx Clk
(Mode 0)
UART Tx Clk
P3.1
ADO
Tx Clk (mode 0)
(Mode 0)
ENDODI
P3.1
MCUDO
100 ua
MCUDI
Rx Data
P3.2 (output only) / XINT
On–Chip
Interrupts
ENDODI
P3.2
ADO
MCUDO
ADI
Not Used
Not Used
TAS1020A
MCUDI
100 ua
Interrupt
Logic
ADI
INT0
ENDODI
P3.3
ADO
Not Used
MCUDO
/ Timer 1 Gate
P3.3 / INT1
MCUDI
ADI
INT1
100 ua
ENDODI
P3.4
ADO
Not Used
MCUDO
P3.4 / Timer 0 Event
MCUDI
ADI
Timer 0 Event Clk
Timer Logic
100 ua
P3.5
ADO
Not Used
Timer 2 Event Clk
ENDODI
MCUDO
MCUDI
Timer 2 Ext. Trigger
P3.5 / Timer 1 Event
ADI
100 ua
TAS1020A
Write Pulse
Mux
P3.6
ADO
WR
Timer 1 Event Clk
Timer 1 Gate
(input only, external MCU mode only)
WRD
WR (output only, internal MCU mode only/
100 ua
TAS1020A
Read Pulse
Not
Used
ENDODI
MCUDO
MCUDI
ADI
Not Used
RD (output only, internal MCU mode only/
Mux
ENDODI
P3.7
ADO
MCUDO
MCUDI
RD
EXTEN
RRD (input only, external MCU mode only)
Not
Used
ADI
Not Used
M8052 MCU CORE
0
1234567
VREN ResetP3PUDIS
GLOBCTL Reg
P1PUDIS
D
Q
D
MCU Clk
Q
Delay
P1.0
Q
EN
DO
100 ua
I/O
Drivers
P1.1
Q
Delay
MCU Read
DI
EN
DO
100 ua
P1.0
P1.1
DI
MCU Read
100 ua
P1.2
Q
Delay
EN
DO
P1.2
DI
P1.3
MCU Read
100 ua
P1.4
Q
Delay
DI
EN
DO
MCU Read
100 ua
Q
Delay
EN
DO
P1.3
P1.4
DI
MCU Read
100 ua
P1.5
Q
Delay
EN
DO
P1.5
DI
MCU Read
100 ua
P1.6
Q
Delay
EN
DO
P1.6
DI
MCU Read
100 ua
P1.7
Q
Delay
MCU Read
DI
EN
DO
P1.7
VREN
RESET
Figure 2–4. GPIO Port 1 and Port 3 Functionality
Also, as shown in Figure 2–4, both ports can service logical units internal to the MCU core, as well as service the
memory-mapped discrete input and output lines assigned to each port.
2.2.11.1 Port 3 GPIO Bits
As illustrated in Figure 2–4, alternative inputs on port 3 are routed directly from the DI input at the MCU core interface
to their destination within the MCU core. It is also noted that when the port bit is used as an alternative input, the value
2–30
Page 45
of the input can still be read by the MCU. If the port bit is to be used as a general-purpose input, the firmware must
make the proper settings so that the alternative logic unit that receives the general-purpose input does not
erroneously respond to the input.
Each alternative output on port 3 is ANDed with the memory-mapped latch (Special Function Register – SFR)
assigned to that port bit, and the result is DO. This means that if the alternate output is to be used, the latch must be
set to logic 1. Similarly, if the latch is to be the source for DO, the alternate output must be logic 1. (The MCU core
assures that if the logical unit supplying the alternate output is not used, its default state is logic 1).
2.2.11.1.1 UART Alternative Functions
Port 3 GPIO bits P3.0 and P3.1, in addition to being able to serve as general-purpose I/O bits, can also serve to
implement UART functionality . The UART implemented offers four modes of operation. In mode 0, UAR T output data
is output on port bit P3.0 and the transmit clock (MCU clock/12) is output on port bit P3.1. In modes 1, 2, and 3 UART
receive data is input on P3.0 and UART transmit data is output on P3.1. Modes 1, 2, and 3 are then full duplex modes;
serial data can be transmitted and received simultaneously.
In all four UART modes, transmission is initiated by any instruction that accesses the MCU-core register SBUF . If this
register is not written to, the alternate output lines for P3.0 and P3.1 are at their default logic 1 state. P3.0 and P3.1
can then be used as general-purpose outputs if no instructions access register SBUF.
The REN bit in the MCU serial port control register SCON enables UART reception if set to logic 1. If REN is cleared
to logic 0, using P3.0 as a general-purpose input does not result in erroneous behavior in the UART logic block. P3.1
has no alternative input function, and thus it can be used as a general-purpose input if the latch assigned to that bit
is set to logic 1 and no instructions access register SBUF. (P3.0 also requires that its latch be set to logic 1 and that
no instructions access register SBUF if it is to be used as a general-purpose input).
2.2.11.1.2 External Interrupts XINT and INT1
The MCU core provides ports for two external interrupts (external to the MCU core) – INT0 and INT1. INT0 is an
alternate input for port 3 bit P3.2 and INT1
Figure 2–4, INT0
services GPIO pin P3.3, and thus can be used as a dedicated interrupt line.
Because INT0
INT0
. Thus P3.2 cannot be used as a general-purpose input. However, if the external interrupt XINT is not required,
P3.2 can be used as a general-purpose output.
Port 3 bit P3.3 can be used as a general-purpose output, a general-purpose input, or as INT1
as a gate for timer 1 (see Section 2.2.11.1.3).
is used to service all T AS1020A internal interrupts as well as the external interrupt XINT. INT1 only
services all internal interrupts, the input DI for P3.2 must be dedicated to its alternative input function
is an alternate input for port 3 bit P3.3. As seen from both Figure 2–2 and
. This bit can also serve
2.2.11.1.3 Timer Alternative Functions
The MCU core has three 26-bit timer/counter registers: timer 0, timer 1, and timer 2. In the timer mode, the
timer/counter register is incremented every MCU machine cycle (MCU clock/12). In the counter mode, the
timer/counter register is incremented in response to a falling edge (logic 1 to logic 0 transition) at its assigned port
bit input – P3.4 for timer 0, P3.5 for timer 1, and P1.0 for timer 2. To qualify as an event clock in the counter mode,
the external source must hold each logic state – logic 1 and logic 0 – for a period of time greater than 12 MCU clock
periods. This means that the maximum count rate in the counter mode is MCU clock/24.
Timer 1 can be gated on and off under external control to facilitate pulse width measurements. The external control
is brought in on port 3 bit P3.3, which is the same input that sources the alternate input function INT1
be thought of as having two alternate input functions.
The MCU core also provides gating for timer 0 via P3.2. However, the input DI for P3.2 must be dedicated to INT0
so that the internal TAS1020A interrupts can be serviced. As a result, gated timing is not allowed on timer 0.
In addition to the external event clock on port 1 bit P1.0, timer 2 has an external trigger input on port 1 bit P1.1 which
can be used to either capture the value in the counter when in the counter mode or reload the timer when in the timer
mode.
. Thus P3.3 can
2–31
Page 46
If the C/NT bit in the appropriate MCU special function register (SFR) for a given timer is cleared to enable a timer
function, or if the timer/counter interrupt is masked off by clearing the appropriate ET bit in the MCU interrupt enable
register IE, the corresponding port bit input providing the external event clock can be used as a general-purpose input.
For the external trigger input for timer 2, it is necessary to clear bit EXEN2 in the MCU timer/counter 2 control register
T2CON if this input is to be used as a general-purpose input.
2.2.11.1.4 MCU Read/Write Pulse Alternate Function
The T AS1020A provides the capability of replacing the internal MCU core with an in-circuit emulator (ICE) for firmware
development. When in the external MCU mode of operation (EXTEN = 1), port 3 bits P3.7 and P3.6 respectively are
used to input the ICE-generated memory read and write pulses so that the ICE can access the memory-mapped
resources internal to the TAS1020A (but not those resources internal to the MCU core itself). When in the internal
MCU mode, P3.6 and P3.7 output the external memory write and read pulses respectively from the MCU core, and
can be used as troubleshooting aids. P3.6 and P3.7 cannot be used as GPIO resources.
2.2.11.2 Port 1 GPIO Bits
Port 1 has two bits that have alternate input functionality – P1.0 and P1.1. The alternate function serviced by these
inputs is timer 2. P1.0 provides the external event clock for timer 2 and P1.1 provides the external trigger. These
alternate functions and the conditions under which these two bits can be used as GPIO bits are discussed in Section
2.2.11.1.3.
Port 1 provides no alternate output functionality.
2.2.12 DMA Controller
The T AS1020A provides two DMA channels for transferring data between the USB endpoint buffers and the codec
port interface. The DMA channels are provided to support the streaming of data for USB isochronous or bulk OUT
endpoints only . Each DMA channel can be programmed to service one isochronous endpoint. The endpoint number
and direction are programmable using the DMA channel control register provided for each DMA channel.
For the two AC ’97 modes supported by the TAS020A, one DMA channel can be assigned to support bulk OUT
transactions and the second DMA channel assigned to support isochronous IN transactions. An example would be
downloading an AC3 file for storage via a bulk OUT transaction while, at the same time, supporting an isochronous
recording session. For all formats and protocols other than AC ’97, however, if a DMA channel is assigned to support
bulk OUT transactions, it can be the only DMA channel active. If, for example, DMA channel 0 is assigned to support
bulk OUT transactions in the General Purpose mode, then DMA channel 1 cannot be assigned to support bulk OUT
or isochronous transactions.
Section 2.2.7.3.3 provides more detail on DMA-supported bulk OUT transactions
The codec port interface time slots to be serviced by a particular DMA channel must also be programmed. For
example, an AC ’97 mode stereo speaker application uses time slots 3 and 4 for audio playback. Therefore, the DMA
channel used to move the audio data to the codec port interface must set time slot assignment bits 3 and 4 to a 1.
Each DMA channel is capable of being programmed to transfer data for time slots 0 through 13 using the two DMA
channel time slot assignment registers provided for each DMA channel.
The number of bytes to be transferred for each time slot is also programmable. The number of bytes used must be
set based on the desired audio data format.
.
2.2.13 Codec Port Interface
The codec port interface is a configurable serial interface used to transfer data between the T AS1020A IC and a codec
device. The serial protocol and formats supported include AC ’97 1.0, AC ’97 2.0, and several I
a general-purpose mode is provided that can be configured to various user defined serial interface formats.
Configuration of the interface is accomplished using the four codec port interface configuration registers: CPTCNF1,
2
S modes. In addition,
2–32
Page 47
CPTCNF2, CPTCNF3, and CPTCNF4. In I2S mode 5, CPTRXCNF2, CPTRXCNF3, and CPTRXCNF4 are used to
configure the C-port in the receive direction. Refer to section A.5.4 for more details on these registers.
The serial interface is a time division multiplexed (TDM) time slot based scheme. The basic format of the serial
interface is determined by setting the number of time slots per codec frame and the number of serial clock cycles (or
2
bits) per time slot. The interface in all modes is bidirectional and full duplex. For all modes except the I
S modes,
command/status data as well as audio data can be transferred via the serial interface. Transfer of the audio data
packets between the USB endpoint data buffers and the codec port interface is controlled by the DMA channels. The
source and/or the destination of the command/status address and data values is controlled by the MCU.
The features of the codec port interface that can be configured are:
•The mode of operation
•The number of time slots per codec frame
•The number of serial clock cycles for slot 0
•The number of serial clock cycles for all slots other than slot 0
•The number of data bits per audio data time slot
•The time slots to be used for command/status address and data
•The serial clock (CSCLK) frequency in relation to the codec master clock (MCLK) frequency
•The source of the serial clock signal (internally generated or an input from the codec device)
•The source of the codec master clock signal used to generate the internal serial clock signal (internally
generated by the ACG or an input to the TAS1020A device)
•The polarity, duration, and direction of the codec frame sync signal
•The relationship between the codec frame sync signal and the serial clock signal
•The relationship between the codec frame sync signal and the serial data signals
•The relationship between the serial clock signal and the serial data signals
•The use of zero padding or a high-impedance state for unused time slots and/or bits
•The byte ordering to be used
2.2.13.1General-Purpose Mode of Operation
In the general-purpose mode the codec port interface can be configured to various user-defined serial interface
formats using the pin assignments shown in T able 2–3. This mode gives the user flexibility to configure the T AS1020A
to connect to various codecs and DSPs that do not use a standard serial interface format.
Table 2–3. Terminal Assignments for Codec Port Interface General-Purpose Mode
Serial bus protocols AC ’97, AIC and I2S are specific settings of the programmable parameters offered in the
general-purpose mode. The general-purpose mode then can be thought of as the primary mode of the codec interface
port, with all other modes being special cases of the general-purpose mode.
Figures 2–5, 2–6, and 2–7 show three general-purpose mode codec configuration examples. Figure 2–5 gives the
settings required to implement AC ’97 1.0, Figure 2–6 gives the settings required to implement AIC, and Figure 2–7
gives the settings required to implement I
2
S. In all three cases the parameters that define these modes are included
AC ’97 VERSION 1.0 MODE 2
2–33
Page 48
in the figures. It should be noted the MODE bits in codec port interface configuration register 1 (CPTCNF1) can be
used to specifically select either AC ’97 1.0, AIC, or I
2
S. However, when using the specific mode selections, the
firmware still must set all parameters in the codec port interface configuration registers. The MODE bits are used
simply to implement mode-specific behavior not covered by the programmable parameters. An example of this would
be setting, when in one of the two AC ’97 modes, those time slot tag bits in the time slot 0 tag word that correspond
to the time slots that have valid data.
2–34
Page 49
CSYNC
Figure 2–5. Codec Port Interface Parameters – AC ’97 1.0
CDATI
CDATO
0
Tag
1
Status Addr
2
Status Data
PCM Left
VTSL(3:7) = 11011b
Tag
Cmd Addr
Cmd Data
PCM Left
Cmd Time Slot = ATSL = 0001b
CSYNCP = 1
CSYNC
CSYNCL = 1
CSCLK
CDATO
DDLY = 1
0
Rdy
TS11TS2
2
TS1212013ID114ID0
CSCLKP = 0
Time Slot 0 Length = TSL0L = 10b (16 CSCLK Periods)
Time Slot Length = TSLL = 011b (20 CSCLK Periods)
Data Bits Per Time Slot = BPTSL = 001b (16)
Number Of Time Slots = NTSL = 01100b (13)
Mode = MODE = 010b (AC’97 1.0 Mode)
3
4
PCM Rt
5
6
PCM Mike
9
10
11
12
VTSL(8:12) = 11000b
PCM Rt
0 . . . 0
PCM Cen
PCM L Surr7PCM R Surr8LFE
0 . . . 0
0 . . . 0
0 . . . 0
TRSEN = 0
CSCLK
15
CDATO
D15
0
D141D13
2
D0150160170180
19
BYOR = 0
MCLKO (XTL_IN)
CSCLK
DIVB = 001b
2–35
Page 50
2–36
Number of Time Slots = NTSL = 011 11b (16)
Figure 2–6. Codec Port Interface Parameters – AIC
FC
CSYNC
CDATO
CDATI
CSCLK
CSYNC
CDATO
or
CDATI
FC
Time Slot 0Time Slot 1
DAC Data
ADC Data
Data Bits / Time Slot = BPTSL = 001b (16)
Time Slot 0 Length = TSL0L = 10b (16)
CSYNCL = 0, CSYNCP = 1
CSCLKP = 0
D15
D14 D13 D12D2D1D0DA2
BYOR = 0
DDLY = 1
Time Slot 7Time Slot 8Time Slot 9Time Slot 14
TRSEN = 1
Register W. Data
/Register R. Addr
Cmd Time Slot = ATSL = 1000b (8)
Register Read
Data
Data Bits / Time Slot = BPTSL = 001b (16)
Time Slot Length = TSLL = 001b (16)
CSCLK
CSYNCL = 0, CSYNCP = 1
CSYNC
CDATO
or
CDATI
CSCLKP = 0
DA1 DA0 RWD2D1D0
DDLY = 1
FC
Time Slot 15
Mode = MODE = 001b (AIC Mode)
NOTE: DA = Device Address
MCLKO
CSCLK
1
2345678
DIVB = 111b
Page 51
2.2.13.1.1Parameter Assignments – AC ’97 1.0
In Figure 2–5, the codec port interface is configured for 13 time slots. The word size for time slot 0 is 16 bits, whereas
the word size for all other time slots is 20 bits. Time slots 1 and 2 are used for secondary communication, and, in the
example of figure 2–5, time slots 3, 4, 6, 7, 8, and 9 have valid audio data. The sync line CSYNC is programmed to
be logic 1 active for the duration of time slot 0. CSYNC and CDA TO are programmed to transition on the rising edge
of CSCLK, which means that CDA TI will be sampled on the falling edge of CSCLK. For the example of Figure 2 –5,
each audio data word is only 16 bits in length, and the 4 LSBs of the 20-bit data word slot are set to logic 0. Byte order
reversal (BYOR) is not set, so the byte ordering of the data as received is preserved – both from the USB bus (OUT
transactions) and from the external codec (IN transactions). To conform with AC ’97 timing requirements, it is
necessary that both transmit and receive data be delayed by one CSCLK clock period with respect to the rising edge
of CSYNC. This is accomplished by setting DDL Y to logic 1. Lastly , DIVB is programmed to set CSCLK to MSCLK/2.
This allows MSCLK to be set at 24.576 MHz and source the oscillator input XTRL_IN on AC ’97 compliant codecs.
Figure 2–5 also points out that time slot assignments in AC ’97 modes need not be the same for input data frames
and output data frames. For output data frames (CDA TO), the settings in bit fields VTSL(3:7) and VTSL(8:12) define
which time slots have valid data. For input data frames (CDA TI) the valid time slots are determined from the settings
of the time slot valid tag bits in the 16-bit tag word received in time slot 0. The hardware uses these bit settings to
extract the valid data from the input data frame and output it, via a DMA channel, to an endpoint buffer resource.
2.2.13.1.2Parameter Assignments – AIC
Figure 2–6 shows the parametric settings for the AIC mode. In Figure 2–6, the codec port interface is configured for
16 time slots. The word size for all time slots, including time slot 0, is 16 bits. Time slot 0 is the only active audio time
slot and time slot 8 is assigned to handle secondary communications. The sync line CSYNC is programmed to be
logic 1 active for one CSCLK period. DDL Y is set to logic 1, and thus transmit data (CDATO) and receive data (CDA TI)
are both delayed by one CSCLK period with respect to the rising edge of CSYNC. CSYNC and CDATO are
programmed to transition on the rising edge of CSCLK, and consequently CDATI is sampled on the falling edge of
CSCLK. Byte order reversal (BYOR) is not set, so the byte ordering of the data as received is preserved – both from
the USB bus (OUT transactions) and from the external codec (IN transactions). The 3-state enable (TRSEN) is set,
and thus CDA T O goes to a high-impedance state during the outputting of non-valid time slots. Lastly, CSCLK is set
to MSCLK/8. (This parameter selection is not part of the AIC standard.)
AIC requires both input (CDA TI) and output (CDA TO) audio data reside in time slot 0 and secondary communication
information reside in time slot 8. Thus, unlike AC ’97, AIC does not require the use of the valid time slot tag bits VTSL
as there is no tag word needed to identify which time slots are valid. A unique feature of AIC is the generation of a
second CSYNC frame sync pulse within a given frame if a secondary transaction is taking place. If the MCU has not
output data requesting a secondary transaction, the second frame sync pulse shown in Figure 2–6 is not generated.
Thus without secondary communication there are 256 CSCLK periods between frame sync pulses, and with
secondary communication there are 128 CSCLK periods between frame sync pulses.
2.2.13.1.3Parameter Assignments – I2S
Figure 2–7 shows the parameter settings for I2S. I2S only uses two time slots. Time slot 0 is used for left channel audio
data and time slot 1 is used for right channel audio data. Secondary communication is not allowed in I
line CSYNC is programmed to be logic 0 active for the duration of time slot 0. CSYNC and CDA TO are programmed
to transition on the falling edge of CSCLK, which means that CDATI will be sampled on the rising edge of CSCLK.
DDL Y is set to logic 1, and thus transmit data (CDAT O) and receive data (CDATI) are both delayed one CSCLK period
with respect to the falling edge of CSYNC.
The time slot length for both time slots is programmed to be 32 bits. I
2
S does allow the use of different word size
lengths, and a word size length of 24 bits is selected for the example in Figure 2–7. Byte order reversal (BYOR) is
not set, so the byte ordering of the data as received is preserved.
CSCLK is set to MSCLK/4, which is a common ratio for I
2
S. For example, if 48 kHz audio sampling is used, CSCLK
would be 64 × 48 kHz = 3.072 MHz. MCLK then would be 4 × 3.072 MHz 12.288 MHz, which is a standard master
clock frequency used by I
For all data transactions managed under DMA control, the T AS1020A provides an option to reverse the ordering of
the bytes within a data word as received. Byte order reversal, if selected, applies to both DMA channels. If, for
example, one DMA channel is used to output audio to a codec and the second DMA channel is used to retrieve record
data from a codec, byte reversal is applied to both audio streams.
When re-ordering the bytes within an audio data word, both time slot length (TSLL/TSL0L) and data bits per time slot
(BPTSL) must be taken into account. As an example consider Figure 2–8. In Figure 2–8 (a) 20-bit data in a 3-byte
word is received either over the USB bus (OUT transaction) or from a codec (IN transaction). The byte order of the
data as received is little endian, where the least significant byte is placed in the right-most byte position of the word.
If BYOR = 1, byte reversal will be performed to yield an output that is big endian in byte order, where the least
significant byte is placed in the left-most byte position of the word. However, in examining the byte-order reversed
data in Figure 2–8 (b), it is noted that the two nibbles of the most significant byte are switched to prevent a gap in the
serial data when output. The TAS1020A automatically performs this nibble reversal based on BPTSL being one nibble
less than the time slot in length.
a. Audio Word Received By TAS1020A
240
0 0 0 0 B19 B16
b. Received Audio Word After Byte Reversal
240
B7 B1 B0
B15 B9 B8 B7 B1 B0
B15 B9 B8 B19 B16 0 0 0 0
Figure 2–8. Byte Reversal Example
2.2.13.2Audio Codec (AC) ’97 1.0 Mode of Operation
In AC ’97 1.0 mode, the codec port interface can be configured as an AC link serial interface to the AC ’97 codec
device. Refer to the audio codec ’97 specification revision 2.2 for additional information. The AC link serial interface
is a time division multiplexed (TDM) slot based serial interface that is used to transfer both audio data and
command/status data between the T AS1020A IC and the codec device. Figure 2–5 shows the structure of the codec
port interface signals for AC ’97 1.0.
Table 2–4. Terminal Assignments for Codec Port Interface AC ’97 1.0 Mode
In this mode, the codec port interface is configured as a bidirectional full duplex serial interface with a fixed rate of
48 kHz. Each 48-kHz frame is divided into 13 time slots, with the use of each time slot predefined by the audio codec
AC ’97 specification. Each time slot is 20 serial clock cycles in length except for time slot 0, which is only 16 serial
clock cycles. The serial clock, which is referred to as the BIT_CLK for AC ’97 modes, is set to 12.288 MHz. Based
on the length of each slot, there is a total of 256 serial clock cycles per frame at a frequency of 12.288 MHz. As a result
the frame frequency is 48 kHz. For the AC ’97 modes, the BIT_CLK is input to the T AS1020A device from the codec.
The BIT_CLK is generated by the codec from the master clock (MCLK) input. The codec MCLK input, which can be
generated by the TAS1020A device, must be a frequency of 24.576 MHz. The start of each 48-kHz frame is
AC ’97 VERSION 2.0 MODE 3
2–39
Page 54
synchronized to the rising edge of the SYNC signal, which is an output of the TAS1020A device. The SYNC signal
is driven high each frame for the duration of slot 0. See Figure 2–9 for details on connecting the T AS1020A to a codec
device in this mode.
TAS1020AC’97 IC
MCLKO1
CSYNC
CSCLK
CDATO
CDATI
CRESET
CSCHNE
AC97CLK
SYNC
BIT_CLK
SD_IN
SD_OUT
CRESET
Figure 2–9. Connection of the TAS1020A to an AC ’97 Codec
The AC link protocol defines slot 0 as a special slot called the tag slot and defines slots 1 through 12 as data slots.
Slot 1 and slot 2 are used to transfer command and status information between the T AS1020A device and the codec.
Slot 1 and slot 2 of the outgoing serial data stream are defined as the command address and command data slots,
respectively. These slots are used for writing to the control registers in the codec. Slot 1 and slot 2 of the incoming
serial data stream are defined as the status address and status data slots, respectively. These slots are used for
reading from the control registers in the codec.
Unused or reserved time slots and unused bit locations within a valid time slot are filled with zeros. Since each data
time slot is 20 bits in length, the protocol supports 8-bit, 16-bit, 18-bit, or 20-bit data transfers.
2.2.13.3Audio Codec (AC) ’97 2.0 Mode of Operation
The basic serial protocol for the AC ’97 2.0 mode is the same as the AC ’97 1.0 mode. The AC ’97 2.0 mode, however,
offers some additional features. In this mode, the TAS1020A provides support for multiple codec devices and also
on-demand sampling.
Table 2–5. Terminal Assignments for Codec Port Interface AC ’97 2.0 Mode
The T AS1020A can connect directly to two AC ’97 codecs. The interconnect for two codecs is shown in Figure 2–10.
As noted in Figure 2–10, the support for two codecs only requires the use of one additional pin – CSCHNE (codec
port interface secondary channel enable), and this additional pin allows record transactions to consist of data from
two codecs. The two serial data lines from the two codecs to the T AS1020A are ORed together inside the T AS1020A
to form one final serial digital data stream. This means that the data output from each codec must reside in different
time slots. This also explains why CSCHNE must be grounded when not used, as a floating input could result in
unpredictable behavior and corrupt the serial data coming in on the other input pin – SDATA_IN1.
AC ’97 mode 2.0 also supports on-demand sampling. On-demand sampling is a codec-to-controller signaling protocol
that is used to accommodate audio sampling rates that differ from the 48-kHz AC-link serial frame rate. An example
would be streaming 44.1 kHz audio across the AC-link. The signaling protocol is implemented using the data request
flags SLOTREQ[0–9] residing in SLOT1[2–11] of slot 1 of the AC ’97 input frame. An active request (bit request
flag = 0) results in data being sent to the codec on the next AC-link frame.
The TAS1020A does not support on-demand sampling when used with two codecs. Only one codec using on-demand
sampling can be supported by the TAS1020A.
2–40
Page 55
TAS1020A
I2S
I2S
Serial Input Data
MCLKO
CSYNC
CSCLK
CDATO
CDATI
CRESET
CSCHNE
Figure 2–10. Connection of the TAS1020A to Multiple AC ’97 Codecs
2.2.13.4Inter-IC Sound (I2S) Modes of Operation
AC’97 IC
AC97CLK
SYNC
BIT_CLK
SDATA_IN
SDATA_OUT
CRESET
Primary
AC97 or MC97
AC97CLK
SYNC
BIT_CLK
SDATA_IN
SDATA_OUT
CRESET
Secondary
The T AS1020A offers two I2S modes of operation, codec port interface mode 4 and codec port interface mode 5. The
difference in the I
2
S modes is the number of serial data outputs and/or serial data inputs supported. For codec port
interface mode 4, there is one serial data output (SDOUT1) and two serial data inputs (SDIN1, SDIN2). Hence, mode
4 can be used to connect the TAS1020A device to a codec with one stereo DAC and two ADCs. For codec port
interface mode 5, one serial data output (SDOUT1) and one serial data input (SDIN2) are supported, but these data
streams can be completely independent as each is assigned its separate sync pulse and bit clock. Mode 5 then can
service applications that require different sampling rates for record and playback. Table 2–6 shows the TAS1020A
codec terminal assignments and the respective signal names for each of the I
waveforms for I
2
S.
Table 2–6. Terminal Assignments for Codec Port Interface I
In all I2S modes, the codec port interface is configured as a bidirectional full duplex serial interface with two time slots
per frame. The frame sync signal is the left/right clock (LRCK) signal. Time slot 0 is used for the left channel audio
data, and time slot 1 is used for the right channel audio data. Both time slots must be set to 32 serial clock (SCLK)
cycles in length giving an SCLK-to-LRCK ratio of 64. The serial clock frequency is based on the audio sample rate.
For example, when using an audio sample rate (FS) of 48 kHz, the SCLK frequency must be set to 3.072 MHz
(64×FS). (Note that the terms codec frame sync, audio sample rate (FS), and LRCK all refer to the same signal.)
The LRCK signal has a 50% duty cycle. The LRCK signal is low for the left channel time slot and is high for the right
channel time slot. In addition, the LRCK signal is synchronous to the falling edge of the SCLK. Serial data is shifted
out on the falling edge of SCLK and shifted in on the rising edge of SCLK. Both for the left channel and the right
channel, there is a one-SCLK cycle delay from the edge of LRCK before the most significant bit of the data is shifted
out.
For the I
2
S modes of the codec port interface, there is a 24-bit transmit and 24-bit receive shift register for each
SDOUT and SDIN signal, respectively. As a result, the interface can actually support 16-bit, 18-bit, 20-bit or 24-bit
transfers. The interface pads the unused bits automatically with zeros.
2–41
Page 56
The I2S protocol does not provide for command/status data transfers. Therefore, when using the T AS1020A device
with a codec that uses an I
2
S serial interface for audio data transfers, the T AS1020A I2C serial interface can be used
for codec command/status data transfers.
2.2.13.4.1Mapping DMA Time Slots to Codec Port Interface Time Slots for I2S Modes
The I2S serial data format uses two time slots (left channel—slot 0, and right channel—slot 1) for each serial data
output or input. Because two serial data streams are input into the T AS1020A in I
2
S mode 4 operation, and since each
input stream has its own unique slot 0 and slot 1 assignments associated with its data, the T AS1020A must contend
with two slots arriving during time slot 0 and two slots arriving during time slot 1. Mapping is then required to transpose
these multiple time slot occurrences to single, unique slot assignments for the DMA channel. Table 2–7 shows the
mapping of the codec port interface time slots for each input to their corresponding DMA time slot assignments.
As an example, suppose that codec port interface mode 4 is to be used with one serial data output and two serial
data inputs. The DMA channel assigned to support the serial data output must have time slot assignment bits 0 and
1 set to 1. The DMA channel assigned to support the two serial data inputs must have time slot assignment bits 0,
1, 2, and 3 set to 1.
Table 2–7. SLOT Assignments for Codec Port Interface I
SERIAL DATA
SDOUT10101
SDIN10102
SDIN20113
CODEC PORT INTERFACE TIME SLOT NUMBERDMA CHANNEL(S) TIME SLOT NUMBER
LEFT CHANNELRIGHT CHANNELLEFT CHANNELRIGHT CHANNEL
2
S Mode 4
Table 2–8. SLOT Assignments for Codec Port Interface I2S Mode 5
SERIAL DATA
SDOUT10101
SDIN20101
CODEC PORT INTERFACE TIME SLOT NUMBERDMA CHANNEL(S) TIME SLOT NUMBER
LEFT CHANNELRIGHT CHANNELLEFT CHANNELRIGHT CHANNEL
2.2.13.5AIC Mode of Operation
AIC – audio interface circuit – is a standard adopted by Texas Instruments for interfacing digitized analog data to a
TI DSP. The bus is specifically tailored to be compatible with the serial ports supplied with most TI DSP offerings. In
later DSP offerings, these ports are referred to as McBSP ports.
The AIC standard has four serial interface modes – pulse mode, SPI mode 0, SPI mode 1, and frame mode. The
TAS1020A only supports the pulse mode of operation. (The pulse mode is so named because of the one CSCLK
period duration of the sync signal). Three options exist for the pulse mode – master (frame sync is sourced by the
codec), slave (frame sync is sourced by the TAS1020A), and continuous-transfer master (data is transmitted and
received continuously, and frame sync is sourced by the codec). The TAS1020A directly supports the master and
slave options. The continuous-transfer master mode option does not allow secondary communication. The AIC
standard covers this case by specifying the use of a second data stream, synchronous with CSCLK, to directly
program the internal registers of the codec. The T AS1020A has no means of outputting such a second data stream.
The TAS1020A then can only support the continuous-transfer master mode option by the use of external logic,
whereby the CDA TO line can be multiplexed between the AIC data terminal and the direct configuration serial input
terminal. Such a solution for implementing the continuous-transfer master mode option does introduce the restriction
that audio data and control data cannot be transmitted concurrently.
The AIC standard provides two options for requesting secondary communication – asserting an active-high logic level
on a separate line (FC) or setting the LSB of the 16-bit data word high. The latter option is only available when the
audio consists of 15-bit data words. The TAS1020A only supports the FC option. When the codec port interface is
set to the AIC mode, the TAS1020A CSCHNE pin (pin 32) sources FC.
2–42
Page 57
Figure 2–6 shows the parameter settings for the AIC master or slave mode, and Section 2.2.13.1.2 provides detail
on these settings. T able 2–9 shows the TAS1020A codec terminal assignments and the respective signal names for
the AIC mode of operation.
Table 2–9. Terminal Assignments for Codec Port Interface AIC Mode
The TAS1020A supports bulk OUT data transactions through the codec port using one of the two available DMA
channels, but the codec port needs to be configured in AC97 or general-purpose mode to support bulk OUT
transactions. AC ’97 and the general-purpose mode are the only two modes of operation that support bulk OUT
transactions, as these are the only two modes that have mechanisms in place to distinguish when valid data is or is
not being output. AC ’97 uses tag bits to indicate whether or not data is valid in any given time slot. In the
general-purpose mode, no sync pulse is output if no valid data is available to be output. (In both AC ’97 and the
general-purpose mode, CPTBLK must be set to logic 1 if tag bits or the sync pulse, respectively , are to indicate the
presence of valid data). See Section 2.2.7.3.3 for more detail on bulk OUT transactions using one of the two DMA
channels.
2.2.14 I2C Interface
The T AS1020A has a bidirectional two-wire serial interface that can be used to access other ICs. This serial interface
is compatible with the I
T AS1020A does not support all provisions of the
on the I
2
C bus, but as a master device, the TAS1020A does not support a multimaster bus environment (no bus
arbitration), but can recognize wait state insertions on the bus. The I
access to I
2
C slave devices, including EEPROMs and codecs. For example, if the application program code is stored
in an EEPROM on the PCB, then the MCU downloads the code from the EEPROM to the T AS1020A on-chip RAM
using the I
2
C interface. Another example is the control of a codec device that uses an I2S interface for audio data
transfers and an I
2
C (Inter IC) bus protocol and supports both 100-kbps and 400-kbps data transfer rates. The
2
C interface for control register read/write access.
2
I
C specification. The T AS1020A can only serve as a master device
2
C interface on the T AS1020A is provided to allow
2.2.14.1Data Transfers
The two-wire serial interface uses the serial clock signal, SCL, and the serial data signal, SDA. As stated above, the
T AS1020A is a master only device, and therefore, the SCL signal is an output only . The SDA signal is a bidirectional
signal that uses an open-drain output to allow the T AS1020A to be wire-ORed with other devices that use open-drain
or open-collector outputs.
All read and write data transfers on the serial bus are initiated by the T AS1020A. The T AS1020A is also responsible
for generating the clock signal used for all data transfers. The data is transferred on the bus serially one bit at a time.
However, the protocol requires that the address and data be transferred in byte (8-bit) format with the most-significant
bit (MSB) transferred first. In addition, each byte transferred on the bus is acknowledged by the receiving device with
an acknowledge bit. Each transfer operation begins with the master device driving a start condition on the bus and
ends with the master device driving a stop condition on the bus.
The timing relationship between the SCL and SDA signals for each bit transferred on the bus is shown in Figure 2–11.
As shown, the SDA signal must be stable while the SCL signal is high, which also means that the SDA signal can
only change states while the SCL signal is low.
2–43
Page 58
SDA
SCL
Data Line Stable:
Data Valid
Change of Data
Allowed
Figure 2–11. Bit Transfer on the I2C Bus
The timing relationship between the SCL and SDA signals for the start and stop conditions is shown in Figure 2–12.
As shown, the start condition is defined as a high-to-low transition of the SDA signal while the SCL signal is high. Also
as shown, the stop condition is defined as a low-to-high transition of the SDA signal while the SCL signal is high.
SDA
SCL
S
Start Condition
P
Stop Condition
Figure 2–12. I2C START and STOP Conditions
When the T AS1020A is the device receiving data information, the TAS1020A acknowledges each byte received by
driving the SDA signal low during the acknowledge SCL period. During the acknowledge SCL period, the slave device
must stop driving the SDA signal. If the T AS1020A is unable to receive a byte, the SDA signal is not driven low and
is pulled high external to the T AS1020A device. Also, if the TAS1020A has received the last byte of data, it signals
an end of transmission to the slave device by issuing a not acknowledge, rather than an acknowledge, following
reception of the last byte. A high during the SCL period indicates a not-acknowledge to the slave device. The
acknowledge timing is shown in Figure 2–13.
Read and write data transfers by the T AS1020A device can be done using single byte or multiple byte data transfers.
Therefore, the actual transfer type used depends on the protocol required by the I
2–44
2
C slave device being accessed.
Page 59
Data Output By
Slave Device
SDA
}
MSB
Not Acknowledge
Data Output By
TAS1020A
SDA
}
Acknowledge
SCL
S
Start Condition
1
2
8
Clock Pulse For
Acknowledge
9
Figure 2–13. TAS1020A Acknowledge on the I2C Bus
2.2.14.2Single Byte Write
As shown is Figure 2–14, a single byte data write transfer begins with the master device transmitting a start condition
followed by the I
transfer. For a write data transfer, the read/write bit must be a 0. After receiving the correct I
the read/write bit, the I
byte or bytes corresponding to the I
address byte, the I
the data byte to be written to the memory address being accessed. After receiving the data byte, the I
again responds with an acknowledge bit. Finally, the TAS1020A device transmits a stop condition to complete the
single byte data write transfer.
Start Condition
SDA
2
C device address and the read/write bit. The read/write bit determines the direction of the data
2
C slave device responds with an acknowledge bit. Next, the T AS1020A transmits the address
2
C slave device again responds with an acknowledge bit. Next, the T AS1020A device transmits
A6 A5 A4 A3 A2 A1 A0
2
C device address and
2
C slave device internal memory address being accessed. After receiving the
A multiple byte data write transfer is identical to a single byte data write transfer except that multiple data bytes are
transmitted by the T AS1020A device to the I
2
the I
C slave device responds with an acknowledge bit.
Start Condition
SDA
A6 A5A1 A0
I2C Device Address and
Read/Write Bit
AcknowledgeAcknowledgeAcknowledge
R/W
ACK A7A5A1 A0 ACK D7 D6D1 D0 ACK
Figure 2–15. Multiple Byte Write Transfer
2
C slave device as shown in Figure 2–15. After receiving each data byte,
Acknowledge
A4 A3A6
Memory or Register AddressLast Data Byte
First Data Byte
D7 D6D1 D0 ACK
Other
Data Bytes
Stop
Condition
2–45
Page 60
2.2.14.4Single Byte Read
As shown in Figure 2–16, a single byte data read transfer begins with the TAS1020A device transmitting a start
2
condition followed by the I
C device address and the read/write bit. For the data read transfer, both a write followed
by a read are actually performed. Initially, a write is performed to transfer the address byte or bytes of the internal
memory address to be read. As a result, the read/write bit must be a 0. After receiving the I
the read/write bit, the I
2
C slave device responds with an acknowledge bit. Also, after sending the internal memory
address byte or bytes, the TAS1020A device transmits another start condition followed by the I
2
C device address and
2
C slave device
address and the read/write bit again. This time the read/write bit is a 1 indicating a read transfer. After receiving the
2
I
C device address and the read/write bit the I2C slave again responds with an acknowledge bit. Next, the I2C slave
device transmits the data byte from the memory address being read. After receiving the data byte, the TAS1020A
device transmits a not-acknowledge followed by a stop condition to complete the single byte data read transfer.
SDA
Start
Condition
Repeat Start Condition
AcknowledgeAcknowledgeAcknowledge
A6 A5A0 R/W ACK A7 A6 A5 A4A0 ACKA6 A5A0ACK
I2C Device Address and
Read/Write Bit
Memory or Register AddressData Byte
I2C Device Address and
Read/Write Bit
R/WA1A1
D7 D6D1 D0 ACK
Not
Acknowledge
Stop
Condition
Figure 2–16. Single Byte Read Transfer
2.2.14.5Multiple Byte Read
A multiple byte data read transfer is identical to a single byte data read transfer except that multiple data bytes are
transmitted by the I
the T AS1020A device responds with an acknowledge bit after receiving each data byte.
2
C slave device to the T AS1020A device as shown in Figure 2–17. Except for the last data byte,
SDA
Start
Condition
I2C Device Address and
Read/Write Bit
Repeat Start
Condition
AcknowledgeAcknowledgeAcknowledge
A7 A6 A7
Memory or Register AddressOther
A6A0ACK
I2C Device Address and
Read/Write Bit
Acknowledge
R/WA6A0 R/W ACKA4A0 ACKD7D0 ACK
First Data Byte
Data Bytes
Figure 2–17. Multiple Byte Read Transfer
Not
Acknowledge
D7 D6D1 D0 ACK
Last Data Byte
Stop
Condition
2–46
Page 61
3 Electrical Specifications
Digital su ly voltage DV
DD
(3.3 V)
I
DD
3.1Absolute Maximum Ratings Over Operating Temperature Ranges (unless
otherwise noted)
Lead temperature 1,6 mm (1/16 inch) from case for 10 seconds 300°C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
†
Stresses beyond those listed under “absolute maximum ratings” may cause permanent damage to the device. These are stress ratings only and
functional operation of the device at these or any other conditions beyond those indicated under “recommended operating conditions” is not
implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.
In this 196 µA measurement, the bulk or suspend current (190 µA) is delivered to the USB cable through PUR pin. The remaining 6 µA is
consumed by the device. As described in section 7.2.3 of USB 1.1 specification, When computing suspend current, the current from VBus throughthe pullup and pulldown resistors must be included.
p
p
Pullup disabledVI = V
Enabled
Pullup disabledVI = V
Enabled
IL
–100
IH
CPU clock 12 MHz45.9
CPU clock 24 MHz50.9
Suspend
Normal14.7mA
Suspend24nA
†
196µA
20
–20
20
µA
µA
mA
3–1
Page 62
3.4Timing Characteristics
3.4.1Clock and Control Signals Over Recommended Operating Conditions
(unless otherwise noted)
3.4.2USB Signals When Sourced by TAS1020A Over Recommended Operating Conditions
(unless otherwise noted)
0.7525
0.62525
0.7525
0.62525
MHz
MHz
t
r
t
f
t
RFM
V
O(CRS)
PARAMETERTEST CONDITIONSMINMAXUNIT
Transition rise time for DP or DM420ns
Transition fall time for DP or DM420ns
Rise/fall time matching(tr/tf) × 10090%110%
Voltage output signal crossover1.32V
DM
DP
V
O(CRS)
90%
10%
tr , t
f
V
OH
V
OL
Figure 3–2. USB Differential Driver Timing Waveform
3–2
Page 63
3.4.3Codec Port Interface Signals (AC ’97 Modes), TA = 25°C, DVDD = 3.3 V, AVDD = 3.3 V
PARAMETERTEST CONDITIONSMINTYPMAXUNIT
f
BIT_CLK
t
cyc1
t
w1(H)
t
w1(L)
f
SYNC
t
cyc2
t
w2(H)
t
w2(L)
t
pd1
t
su
t
h
NOTE 1: Worst case duty cycle is 45/55.
Frequency, BIT_CLKSee Note 112.288MHz
Cycle time, BIT_CLKSee Note 181.4ns
Pulse duration, BIT_CLK highSee Note 13640.745ns
Pulse duration, BIT_CLK lowSee Note 13640.745ns
Frequency, SYNCCL = 50 pF48kHz
Cycle time, SYNCCL = 50 pF20.8µs
Pulse duration, SYNC highCL = 50 pF1.3µs
Pulse duration, SYNC lowCL = 50 pF19.5µs
Propagation delay time, BIT_CLK rising edge to SYNC, SD_OUTCL = 50 pF15ns
Setup time, SD_IN to BIT_CLK falling edge10ns
Hold time, SD_IN from BIT_CLK falling edge10ns
BIT_CLK
SYNC
BIT_CLK
SYNC, SD_OUT
t
w2(H)
t
w1(H)
t
cyc1
t
cyc2
t
w1(L)
t
w2(L)
Figure 3–3. BIT_CLK and SYNC Timing Waveforms
t
pd1
t
su
t
h
SD_IN
Figure 3–4. SYNC, SD_IN, and SD_OUT Timing Waveforms
3–3
Page 64
3.4.4Codec Port Interface Signals (I2S Modes) Over Recommended Operating Conditions
(unless otherwise noted)
TEST CONDITIONSMINMAXUNIT
f
SCLK
t
cyc
t
pd
t
su
t
h
NOTE 1: Worst case duty cycle is 45/55.
Frequency, SCLKCL = 50 pF(32)F
Cycle time, SCLKCL = 50 pF, See Note 11/(64)FS1/(32)F
Propagation delay, SCLK falling edge to LRCLK and SDOUTCL = 50 pF15ns
Setup time, SDIN to SCLK rising edge10ns
Hold time, SDIN from SCLK rising edge10ns
SCLK
t
cyc
LRCLK, SD_OUT
t
pd
(64)FSMHz
S
S
ns
SD_IN
t
su
t
h
Figure 3–5. I2S Mode Timing Waveforms
3.4.5Codec Port Interface Signals (General-Purpose Mode) Over Recommended Operating
Conditions (unless otherwise noted)
TEST CONDITIONSMINMAXUNIT
f
CSCLK
t
cyc
t
pd
t
su
t
h
NOTE 2: The timing waveforms in Figure 3-6 show the CSYNC, CDATO, CSCHNE, and CRESET signals generated with the rising edge of the
Frequency, CSCLKCL = 50 pF0.12525MHz
Cycle time, CSCLKCL = 50 pF, See Note 20.0408µs
Propagation delay, CSCLK to CSYNC, CDATO, CSCHNE and CRESETCL = 50 pF15ns
Setup time, CDATI to CSCLK10ns
Hold time, CDATI from CSCLK10ns
clock and the CDATI signal sampled with the falling edge of the clock. The edge of the clock used is programmable. However , the timing
characteristics are the same regardless of which edge of the clock is used.
CSCLK
t
t
pd
cyc
3–4
CSYNC, CDATO,
CSCHNE, CRESET
CDATI
t
su
t
h
Figure 3–6. General-Purpose Mode Timing Waveforms
Page 65
3.4.6I2C Interface Signals Over Recommended Operating Conditions
PARAMETER
TEST CONDITIONS
UNIT
(unless otherwise noted)
f
SCL
t
w(H)
t
w(L)
t
r
t
f
t
su1
t
pd1
t
buf
t
su2
t
h2
t
su3
C
L
STANDARD
PARAMETERTEST CONDITIONS
Frequency, SCL01000400kHz
Pulse duration, SCL high40.6µs
Pulse duration, SCL low4.71.3µs
Rise time, SCL and SDA1000300ns
Fall time, SCL and SDA300300ns
Setup time, SDA to SCL250100ns
Propagation delay, SCL to SDA (5-KΩ pullup resistor)300500300500ns
Bus free time between stop and start condition4.71.3µs
Setup time, SCL to start condition4.70.6µs
Hold time, start condition to SCL40.6µs
Setup time, SCL to stop condition40.6µs
Load capacitance for each bus line400400pF
SCL
t
w(H)
t
su1
t
w(L)
t
r
t
pd1
MODE
MINMAXMINMAX
t
f
FAST MODE
UNIT
SDA
SDA OUT
SDA IN
SCL
SDA
Figure 3–7. SCL and SDA Timing Waveforms
t
su2
Start ConditionStop Condition
t
h2
t
su3
t
buf
Figure 3–8. Start and Stop Conditions Timing Waveforms
1289SCL
Figure 3–9. Acknowledge Timing Waveform
3–5
Page 66
3–6
Page 67
4 Application Information
Ferrite Bead
9 Ω at 100 MHz
AGND
V
CC
USB_CONN
1
V
4
5
6
27.4 Ω
47 pF
CC
GND
Shield
Shield
20 kΩ
D–
D+
27.4 Ω
47 pF
3.3 V
2
3
D
10 kΩ
1 µF
3.3 V
1.5 kΩ
+
A
Top Layer Ground Shield
27 pF
XTAL
27 pF
100 pF
1000 pF
3.09 kΩ
6 MHz
PLLFILI
48 47 46 45 44 43 42 41 40 39 38 37
PLLFILO
AV
MCLKI
DV
DV
MRESET
TEST
EXTEN
RSTO
DD
SS
PUR
DP
DM
DD
1
2
3
4
5
6
7
8
9
10
11
12
13 14 15 16 17 18 19 20 21 22 23 24
P3.0
XTALI
C1
P3.1
XTALO
AGND
SS
AV
SCL
C5
SS
DV
P3.2/XINT
SDA
VREN
TAS1020A
C2
P3.5
P3.4
P3.3
DGND
2 kΩ
2 kΩ
MCLKO2
RESET
DD
NC
DV
MCLKO1
CDATO
C3
NC
P1.0
SDA
SCL
WP
MCLKO
CSCLK
36
35
34
33
32
31
30
29
28
27
26
25
P1.1
V
CC
3.3 V
24C64
D
CDATI
CSYNC
CRESET
DV
CSCHNE
P1.7
P1.6
P1.5
DV
P1.4
P1.3
P1.2
DD
SS
C4
GND
A2
A1
A0
3.3 V
D
DGND
1.0 Ω
Voltage
Regulator
DGND
3.3 V
+
1.0 Ω
10 µF
16 V
AGND
+
1 µF
16 V
C1
0.1 µFC20.1 µF
DGND
3.3 VA (TAS1020A Only)
C5
0.1 µF
NOTES: A. If MCLKI and CSCHNE are not used, they must be connected to DGND.
B. Capacitors C1, C2, C3, C4, and C5 are as shown to indicate they must be mounted as close to the pins as possible.
C. NC on pins 20 and 22 means they must be left unconnected when running in normal mode.
D. Crystal load capacitors are shown as 27 pF, but recommendations of crystal manufactures should be followed.
Figure 4–1. Typical TAS1020A Device Connections
C3
0.1 µF
3.3 V
D
3.3 VD (TAS1020A Only)
C4
0.1 µF
4–1
Page 68
4–2
Page 69
Appendix A
MCU Memory and Memory-Mapped Registers
This section describes the TAS1020A MCU memory configurations and operation. In general, the MCU memory
operation is the same as the industry standard 8052 MCU.
A.1 MCU Memory Space
The T AS1020A MCU memory is organized into three individual spaces: program memory, external data memory , and
internal data memory. All memory resources reside within the TAS1020A; the terms internal and external refer to
memory resources internal to and external to the MCU core residing in the T AS1020A. The total address range for
the program memory and the external data memory spaces is 64K bytes each. The total address range for the internal
data memory is 256 bytes.
The actual mapping of physical memory resources into these three individual spaces is dependent on which operating
mode is active, boot loader mode or normal mode. The operating mode is determined by the setting of the SDW bit
in the MCU memory configuration register. At power turnon, or after a master reset, the SDW bit is reset and the boot
loader mode is active. In this mode, and 8K ROM resource within the TAS1020A is mapped to program space
beginning at address 0000h. This same 8K ROM is also mapped to program space beginning at address 8000h.
The TAS1020A uses the 8K boot ROM as the program memory when in the boot loader mode. The boot ROM
program code downloads the application program code from a nonvolatile memory (EEPROM) on the peripheral
PCB, and writes the code to a 6K RAM resource internal to the TAS1020A. In the boot loader mode, this 6K RAM
resource is mapped to the external data memory space starting at address 0000h. (If a valid EEPROM resource is
not available, the TAS1020A initializes in the DFU program mode and requires a download of application code to
RAM—see Section 2.2.2.2). After downloading the application program code to the 6K RAM resource, the boot ROM
enables the normal operating mode by setting the ROM disable (SDW) bit to enable program code execution from
the 6K RAM instead of the boot ROM. In the normal operating mode, the boot ROM is still mapped to program memory
space starting at address 8000h, but the 6K RAM resource is now mapped to program memory space beginning at
address 0000h. Also, in the normal operating mode, the RAM resource becomes a read-only memory resource that
cannot be written to. Refer to Figures A–1 and A–2 for details.
In the normal operating mode, the external data memory space contains the data buffers for the USB endpoints, the
configuration blocks for the USB endpoints, the setup data packet buffer for the USB control endpoint, and
memory-mapped registers. The data buffers for the USB endpoints, the configuration blocks for the USB endpoints
and the setup data packet buffer for the USB control endpoints are all implemented in RAM, and this RAM resource
is separate from the 6K RAM resource used to house the application code. The memory-mapped registers used for
control and status registers are implemented in hardware with flip-flops. The data buffers for the USB endpoints total
1304 bytes, the configuration blocks for the USB endpoints total 128 bytes, the setup packet buffer for the USB control
endpoint is 8 bytes, and the memory-mapped-register space is 80 bytes. The total external data memory space used
for these blocks of memory then is 1520 bytes.
A–1
Page 70
A.2 Internal Data Memory
The internal data memory space is a total of 256 bytes of RAM, which includes the 128 bytes of special function
registers (SFR) space. The internal data memory space is mapped in accordance with the industry standard 8052
MCU. The internal data memory space is mapped from 00h to FFh with the SFRs mapped from 80h to FFh. The lower
128 bytes are accessible with both direct and indirect addressing. However, the upper 128 bytes, which is the SFR
space, is only accessible with direct addressing. Note that the internal data memory space is separate and distinct
from the external data memory space, and although both spaces begin at address 0000h, there is no overlap.
FFFFh
A000h
9FFFh
8000h
7FFFh
Program Memory
24K – Reserved
Boot ROM (8K)
24K – Reserved
FFFFh
FFB0h
FFAFh
FA10h
FA0Fh
External Data Memory
Memory Mapped Registers
(80 Bytes)
USB End-Point Configuration
Blocks and Buffer Space
(1440 Bytes)
58,000 Bytes – Reserved
A–2
2000h
1FFFh
0000h
Boot ROM (8K)
Figure A–1. Boot Loader Mode Memory Map
1780h
177Fh
0000h
Code RAM
(6016 Bytes)
(Read/Write)
Page 71
FFFFh
A000h
9FFFh
8000h
7FFFh
Program Memory
24K – Reserved
Boot ROM (8K)
26752 Bytes
FFFFh
FFB0h
FFAFh
FA10h
FA0Fh
External Data Memory
Memory Mapped Registers
(80 Bytes)
USB End-Point Configuration
Blocks and Buffer Space
(1440 Bytes)
64016 Bytes – Reserved
1780h
177Fh
Code RAM
(6016 Bytes)
(Read/Write)
0000h
0000h
Figure A–2. Normal Operating Mode Memory Map
A.3 External MCU Mode Memory Space
When using an external MCU for firmware development, only the USB configuration blocks, the USB buffer space,
and the memory-mapped registers are accessible by the external MCU. See Section A.4 for details. In this mode,
only address lines A0 to A10 are input to the TAS1020A device from the external MCU. Therefore, the USB buffer
space and the memory-mapped registers in the external data memory space are not fully decoded since all sixteen
address lines are not available. Hence, the USB buffer space and the memory-mapped registers are actually
accessible at any 2K boundary within the total 64K external data memory space of the external MCU. As a result,
when using the T AS1020A in the external MCU mode, nothing can be mapped to the external data memory space
of the external MCU except the USB buffer space and the memory-mapped registers of the TAS1020A device.
A–3
Page 72
A.4 USB Endpoint Configuration Blocks and Data Buffer Space
A.4.1USB Endpoint Configuration Blocks
The USB endpoint configuration space contains 16 8-byte blocks that define configuration, buffer location, buffer size,
and data count for the 16 (8 input and 8 output) USB endpoints. The MCU, UBM, and DMA all have access to these
configuration blocks.
Each of the 16 endpoints in the TAS1020A can be configured as a USB pipe endpoint by initializing the block
configuration register assigned to each endpoint. The location of the endpoint X and Y data buffers for each endpoint
is set by the value programmed into the X and Y buffer base address registers. Base addresses are octet (8-byte)
aligned. The size of the X and Y buffers is set by initializing the buffer size register. The size of the X and Y buffers
must be greater than or equal to the USB packet size associated with the endpoint. For Isochronous endpoints, the
buffer size defines the size of the single circular buffer . For IN transactions, the X and Y data count registers assigned
to each endpoint are set by the USB buffer manager (UBM) to register the size of the new data packet just received.
For OUT transactions, the X and Y data count registers assigned to each endpoint are set by the DMA logic or the
MCU to register the size of the data packet to be output. For control, interrupt, and bulk transactions, the data count
is the number of samples per transaction.
A.4.2Data Buffer Space
The endpoint data buffer space (1304 bytes) provides rate buffering between the data traffic on the USB bus and data
traffic to and from the codecs attached to the T AS1020A. Buf fers are defined in this space by base address pointers
and size descriptors in the USB endpoint configuration blocks. The MCU also has access to this space.
In order to conserve RAM memory resources on the T AS1020A, several USB-specific routines have been included
in the firmware resident in the on-chip ROM. These ROM support functions are detailed in Section 2.2.2.7. T o provide
temporary variable storage for these ROM support functions, locations FA10h through F A63h (84 bytes) of the 1304
bytes of data buffer space are reserved for use by the ROM support functions. This then leaves 1220 bytes for the
endpoint buffer memories, which service applications up to 6 channels, 48 kHz sampling rate with 16 bits per sample
or 4 channels, 48-kHz sampling rate with 24 bits per sample. (If the ROM support functions are not used, the entire
block of 1304 bytes can be assigned to endpoint buffer memories.)
The values entered into the X and Y buffer base address registers are offset addresses. The lower memory address
(or Base address) of a given X (Y) buffer is determined by adding the value in the base address register (multiplied
by 8) to the base address of the block of memory assigned to the X and Y buffers. For the TAS1020A, this base
address is FA10h. However, the base address of the TUSB3200 members of the family of USB streaming audio
controllers, of which the TAS1020A is also a member, is F800h. To maintain software compatibility between family
members, the value entered into the base address register for the T AS1020A (as well as the other family members)
must be the offset from the base address F800h. For example, assume the X buffer for IN endpoint 3 is to be
established starting at address FA60h. For the TAS1020A, the offset of this address from the FA10h base address
of the block of memory assigned to the X and Y buffers is 50h. Nevertheless, the value entered into the X buffer base
address for IN endpoint 3 must be 4Ch, as F800h + 8 * 4Ch = FA60h.
A–4
Page 73
DMA Access
UBM Access
MCU Access
External Data Memory
FFFFh
Memory Mapped Registers
(80 Bytes)
FFB0h
FFAFh
Endpoint Configuration Blocks
(128 Bytes)
FF30h
FF2Fh
Setup Data Packet Buffer
(8 Bytes)
FF28h
FF27h
DMA Access
FA10h
Endpoint Data Buffers
(1304 Bytes)
Figure A–3. USB Endpoint Configuration Blocks and Buffer Space Memory Map
A–5
Page 74
T able A–1. USB Endpoint Configuration Blocks Address Map
ADDRESSMNEMONICNAME
FFAFhOEPDCNTY0OUT endpoint 0 - Y buffer data count byte
FFAEhReservedReserved for future use
FFADhOEPBBAY0OUT endpoint 0 - Y buffer base address byte
FFAChReservedReserved for future use
FFABhOEPDCNTX0OUT endpoint 0 - X buffer data count byte
FFAAhOEPBSIZ0OUT endpoint 0 - X and Y buffer size byte
FFA9hOEPBBAX0OUT endpoint 0 - X buffer base address byte
FFA8hOEPCNF0OUT endpoint 0 – configuration byte
FFA7hOEPDCNTY1OUT endpoint 1 - Y buffer data count byte
FFA6hReservedReserved for future use
FFA5hOEPBBAY1OUT endpoint 1 - Y buffer base address byte
FFA4hReservedReserved for future use
FFA3hOEPDCNTX1OUT endpoint 1 - X buffer data count byte
FFA2hOEPBSIZ1OUT endpoint 1 - X and Y buffer size byte
FFA1hOEPBBAX1OUT endpoint 1 - X buffer base address byte
FFA0hOEPCNF1OUT endpoint 1 – configuration byte
FF9FhOEPDCNTY2OUT endpoint 2 - Y buffer data count byte
FF9EhReservedReserved for future use
FF9DhOEPBBAY2OUT endpoint 2 - Y buffer base address byte
FF9ChReservedReserved for future use
FF9BhOEPDCNTX2OUT endpoint 2 - X buffer data count byte
FF9AhOEPBSIZ2OUT endpoint 2 - X and Y buffer size byte
FF99hOEPBBAX2OUT endpoint 2 - X buffer base address byte
FF98hOEPCNF2OUT endpoint 2 – configuration byte
FF97hOEPDCNTY3OUT endpoint 3 - Y buffer data count byte
FF96hReservedReserved for future use
FF95hOEPBBAY3OUT endpoint 3 - Y buffer base address byte
FF94hReservedReserved for future use
FF93hOEPDCNTX3OUT endpoint 3 - X buffer data count byte
FF92hOEPBSIZ3OUT endpoint 3 - X and Y buffer size byte
FF91hOEPBBAX3OUT endpoint 3 - X buffer base address byte
FF90hOEPCNF3OUT endpoint 3 – configuration byte
FF8FhOEPDCNTY4OUT endpoint 4 - Y buffer data count byte
FF8EhReservedReserved for future use
FF8DhOEPBBAY4OUT endpoint 4 - Y buffer base address byte
FF8ChReservedReserved for future use
FF8BhOEPDCNTX4OUT endpoint 4 - X buffer data count byte
FF8AhOEPBSIZ4OUT endpoint 4 - X and Y buffer size byte
FF89hOEPBBAX4OUT endpoint 4 - X buffer base address byte
FF88hOEPCNF4OUT endpoint 4 – configuration byte
FF87hOEPDCNTY5OUT endpoint 5 - Y buffer data count byte
FF86hReservedReserved for future use
FF85hOEPBBAY5OUT endpoint 5 - Y buffer base address byte
FF84hReservedReserved for future use
FF83hOEPDCNTX5OUT endpoint 5 - X buffer data count byte
FF82hOEPBSIZ5OUT endpoint 5 - X and Y buffer size byte
FF81hOEPBBAX5OUT endpoint 5 - X Buffer Base Address Byte
FF80hOEPCNF5OUT endpoint 5 – configuration byte
A–6
Page 75
Table A–1. USB Endpoint Configuration Blocks Address Map (Continued)
ADDRESSMNEMONICNAME
FF7FhOEPDCNTY6OUT endpoint 6 - Y buffer data count byte
FF7EhReservedReserved for future use
FF7DhOEPBBAY6OUT endpoint 6 - Y buffer base address byte
FF7ChReservedReserved for future use
FF7BhOEPDCNTX6OUT endpoint 6 - X buffer data count byte
FF7AhOEPBSIZ6OUT endpoint 6 - X and Y buffer size byte
FF79hOEPBBAX6OUT endpoint 6 - X buffer base address byte
FF78hOEPCNF6OUT endpoint 6 – configuration byte
FF77hOEPDCNTY7OUT endpoint 7 - Y buffer data count byte
FF76hReservedReserved for future use
FF75hOEPBBAY7OUT endpoint 7 - Y buffer base address byte
FF74hReservedReserved for future use
FF73hOEPDCNTX7OUT endpoint 7 - X buffer data count byte
FF72hOEPBSIZ7OUT endpoint 7 - X and Y buffer size byte
FF71hOEPBBAX7OUT endpoint 7 - X buffer base address byte
FF70hOEPCNF7OUT endpoint 7 – configuration byte
FF6FhIEPDCNTY0IN endpoint 0 - Y buffer data count byte
FF6EhReservedReserved for future use
FF6DhIEPBBAY0IN endpoint 0 - Y buffer base address byte
FF6ChReservedReserved for future use
FF6BhIEPDCNTX0IN endpoint 0 - X buffer data count byte
FF6AhIEPBSIZ0IN endpoint 0 - X and Y buffer size byte
FF69hIEPBBAX0IN endpoint 0 - X buffer base address byte
FF68hIEPCNF0IN endpoint 0 – configuration byte
FF67hIEPDCNTY1IN endpoint 1 - Y buffer data count byte
FF66hReservedReserved for future use
FF65hIEPBBAY1IN endpoint 1 - Y buffer base address byte
FF64hReservedReserved for future use
FF63hIEPDCNTX1IN endpoint 1 - X buffer data count byte
FF62hIEPBSIZ1IN endpoint 1 - X and Y buffer size byte
FF61hIEPBBAX1IN endpoint 1 - X buffer base address byte
FF60hIEPCNF1IN endpoint 1 – configuration byte
FF5FhIEPDCNTY2IN endpoint 2 - Y buffer data count byte
FF5EhReservedReserved for future use
FF5DhIEPBBAY2IN endpoint 2 - Y buffer base address byte
FF5ChReservedReserved for future use
FF5BhIEPDCNTX2IN endpoint 2 - X buffer data count byte
FF5AhIEPBSIZ2IN endpoint 2 - X and Y buffer size byte
FF59hIEPBBAX2IN endpoint 2 - X buffer base address byte
FF58hIEPCNF2IN endpoint 2 – configuration byte
FF57hIEPDCNTY3IN endpoint 3 - Y buffer data count byte
FF56hReservedReserved for future use
FF55hIEPBBAY3IN endpoint 3 - Y buffer base address byte
FF54hReservedReserved for future use
FF53hIEPDCNTX3IN endpoint 3 - X buffer data count byte
FF52hIEPBSIZ3IN endpoint 3 - X and Y buffer size byte
FF51hIEPBBAX3IN endpoint 3 - X buffer base address byte
FF50hIEPCNF3IN endpoint 3 – configuration byte
A–7
Page 76
Table A–1. USB Endpoint Configuration Blocks Address Map (Continued)
ADDRESSMNEMONICNAME
FF4FhIEPDCNTY4IN endpoint 4 - Y buffer data count byte
FF4EhReservedReserved for future use
FF4DhIEPBBAY4IN endpoint 4 - Y buffer base address byte
FF4ChReservedReserved for future use
FF4BhIEPDCNTX4IN endpoint 4 - X buffer data count byte
FF4AhIEPBSIZ4IN endpoint 4 - X and Y buffer size byte
FF49hIEPBBAX4IN endpoint 4 - X buffer base address byte
FF48hIEPCNF4IN endpoint 4 – configuration byte
FF47hIEPDCNTY5IN endpoint 5 - Y buffer data count byte
FF46hReservedReserved for future use
FF45hIEPBBAY5IN endpoint 5 - Y buffer base address byte
FF44hReservedReserved for future use
FF43hIEPDCNTX5IN endpoint 5 - X buffer data count byte
FF42hIEPBSIZ5IN endpoint 5 - X and Y buffer size byte
FF41hIEPBBAX5IN endpoint 5 - X buffer base address byte
FF40hIEPCNF5IN endpoint 5 – configuration byte
FF3FhIEPDCNTY6IN endpoint 6 - Y buffer data count byte
FF3EhReservedReserved for future use
FF3DhIEPBBAY6IN endpoint 6 - Y buffer base address byte
FF3ChReservedReserved for future use
FF3BhIEPDCNTX6IN endpoint 6 - X buffer data count byte
FF3AhIEPBSIZ6IN endpoint 6 - X and Y buffer size byte
FF39hIEPBBAX6IN endpoint 6 - X buffer base address byte
FF38hIEPCNF6IN endpoint 6 – configuration byte
FF37hIEPDCNTY7IN endpoint 7 - Y buffer data count byte
FF36hReservedReserved for future use
FF35hIEPBBAY7IN endpoint 7 - Y buffer base address byte
FF34hReservedReserved for future use
FF33hIEPDCNTX7IN endpoint 7 - X buffer data count byte
FF32hIEPBSIZ7IN endpoint 7 - X and Y buffer size byte
FF31hIEPBBAX7IN endpoint 7 - X buffer base address byte
FF30hIEPCNF7IN endpoint 7 – configuration byte
A–8
Page 77
A.4.3USB OUT Endpoint Configuration Bytes
This section describes the individual bytes in the USB endpoint configuration blocks for the OUT endpoints. A set
of 8 bytes is used for the control and operation of each USB OUT endpoint. In addition to the USB control endpoint,
the TAS1020A supports up to a total of seven OUT endpoints.
A.4.3.1 USB OUT Endpoint – Y Buffer Data Count Byte (OEPDCNTYx)
The USB OUT endpoint Y buffer data count byte contains the 7-bit value used to specify the amount of data received
in a data packet from the host PC. The no acknowledge status bit is also contained in this byte.
7NACKNo acknowledgeThe no acknowledge status bit is set to a 1 by the UBM at the end of a successful USB OUT
6:0DCNTY(6:0)Y Buffer data countThe Y buffer data count value is set by the UBM when a new data packet is written to the Y buf fer
transaction to this endpoint to indicate that the USB endpoint Y buffer contains a valid data
packet and that the Y buffer data count value is valid. For control, interrupt, or bulk endpoints,
when this bit is set to a 1, all subsequent transactions to the endpoint result in a NACK
handshake response to the host PC. Also for control, interrupt, and bulk endpoints to enable this
endpoint to receive another data packet from the host PC, this bit must be cleared to a 0 by the
MCU. For isochronous endpoints, a NACK handshake response to the host PC is not allowed.
Therefore, the UBM ignores this bit in reference to receiving the next data packet. However, the
MCU or DMA must clear this bit before reading the data packet from the buffer.
for the OUT endpoint. The 7-bit value is set to the number of bytes in the data packet for control,
interrupt or bulk endpoint transfers and is set to the number of samples in the data packet for
isochronous endpoint transfers. To determine the number of samples in the data packet for
isochronous transfers, the bytes per sample value in the configuration byte is used. The data
count value is read by the MCU or DMA to obtain the data packet size.
A.4.3.2 USB OUT Endpoint – Y Buffer Base Address Byte (OEPBBAYx)
The USB OUT endpoint Y buffer base address byte contains the 8-bit value used to specify the base memory location
for the Y data buffer for a particular USB OUT endpoint.
7:0BBAY(10:3)Y Buffer base addressThe Y buffer base address value is set by the MCU to program the base address location in
memory to be used for the Y data buffer . A total of 11 bits is used to specify the base address
location. This byte specifies the most significant 8 bits of the address. All 0s are used by the
hardware for the three least significant bits.
A–9
Page 78
A.4.3.3 USB OUT Endpoint – X Buffer Data Count Byte (OEPDCNTXx)
The USB OUT endpoint X buffer data count byte contains the 7-bit value used to specify the amount of data received
in a data packet from the host PC. The no acknowledge status bit is also contained in this byte.
7NACKNo acknowledgeThe no acknowledge status bit is set to a 1 by the UBM at the end of a successful USB OUT
6:0DCNTX(6:0)X Buffer data countThe X buffer data count value is set by the UBM when a new data packet is written to the X
transaction to this endpoint to indicate that the USB endpoint X buffer contains a valid data
packet and that the X buffer data count value is valid. For control, interrupt, or bulk endpoints,
when this bit is set to a 1, all subsequent transactions to the endpoint result in a NACK
handshake response to the host PC. Also for control, interrupt, and bulk endpoints to enable
this endpoint to receive another data packet from the host PC, this bit must be cleared to a 0
by the MCU. For isochronous endpoints, a NACK handshake response to the host PC is not
allowed. Therefore, the UBM ignores this bit in reference to receiving the next data packet.
However, the MCU or DMA must clear this bit before reading the data packet from the buffer .
buffer for the OUT endpoint. The 7-bit value is set to the number of bytes in the data packet for
control, interrupt, or bulk endpoint transfers and is set to the number of samples in the data
packet for isochronous endpoint transfers. T o determine the number of samples in the data
packet for isochronous transfers, the bytes per sample value in the configuration byte is
used. The data count value is read by the MCU or DMA to obtain the data packet size.
A.4.3.4 USB OUT Endpoint – X and Y Buffer Size Byte (OEPBSIZx)
The USB OUT endpoint X and Y buffer size byte contains the 8-bit value used to specify the size of the two data buffers
to be used for this endpoint.
7:0BSIZ(7:0)Buffer sizeFor control, interrupt, and bulk transactions, the X and Y buffer size value is set by the MCU to
program the size of the X and Y data packet buffers. Both buffers are programmed to the
same size based on this value. This value is in 8-byte units. For example, a value of 18h results in the size of the X and Y buffers each being set to 192 bytes. For isochronous transactions, the buffer size sets the size of the single circular buffer.
A.4.3.5 USB OUT Endpoint – X Buffer Base Address Byte (OEPBBAXx)
The USB OUT endpoint X buffer base address byte contains the 8-bit value used to specify the base memory location
for the X data buffer for a particular USB OUT endpoint.
7:0BBAX(10:3)X Buffer base addressThe X buffer base address value is set by the MCU to program the base address location in
memory to be used for the X data buffer . A total of 11 bits is used to specify the base address
location. This byte specifies the most significant 8 bits of the address. All 0s are used by the
hardware for the three least significant bits.
A–10
Page 79
A.4.3.6 USB OUT Endpoint – Configuration Byte (OEPCNFx)
The USB OUT endpoint configuration byte contains the various bits used to configure and control the endpoint. Note
that the bits in this byte take on different functionality based on the type of endpoint defined. The control, interrupt,
and bulk endpoints function differently than the isochronous endpoints.
A.4.3.6.1 USB OUT Endpoint Configuration Byte Settings—Control, interrupt, or Bulk Transactions
This section defines the functionality of the bits in the USB OUT endpoint configuration byte for control, interrupt, and
bulk endpoints.
7OEPENEndpoint enableThe endpoint enable bit is set to 1 by the MCU to enable the OUT endpoint.
6ISOIsochronous endpointThe isochronous endpoint bit is set to a 1 by the MCU to specify the use of a particular OUT
5TOGGLEToggleThe toggle bit is controlled by the UBM and is toggled at the end of a successful out data
4DBUFDouble buffer modeThe double buffer mode bit is set to 1 by the MCU to enable the use of both the X and Y data
3STALLStallThe stall bit is set to 1 by the MCU to stall endpoint transactions. When this bit is set, the
2OEPIEInterrupt enableThe interrupt enable bit is set to a 1 by the MCU to enable the OUT endpoint interrupt. See
1:0—ReservedReserved for future use
endpoint for isochronous transactions. This bit must be cleared to a 0 by the MCU to use a
particular OUT endpoint for control, interrupt, or bulk transactions.
stage transaction if a valid data packet is received and the data packet PID matches the
expected PID.
packet buffers for USB transactions to a particular OUT endpoint. This bit must be cleared
to a 0 by the MCU to use the single buffer mode. In the single buffer mode, only the X buffer
is used.
hardware automatically returns a stall handshake to the host PC for any transaction
received for the endpoint. An exception is the control endpoint setup stage transaction,
which must always received. This requirement allows a Clear_Feature_Stall request to be
received from the host PC. Control endpoint data and status stage transactions however
can be stalled. The stall bit is cleared to a 0 by the MCU if a Clear_Feature_Stall request or a
USB reset is received from the host PC. For a control write transaction, if the amount of data
received is greater than expected, the UBM sets the stall bit to a 1 to stall the endpoint.
When the stall bit is set to a 1 by the UBM, the USB OUT endpoint 0 interrupt is generated.
Section A.5.7.1 for details on the OUT endpoint interrupts.
A–11
Page 80
A.4.3.6.2 USB OUT Endpoint Configuration Byte Settings—Isochronous Transactions
This section defines the functionality of the bits in the USB OUT endpoint configuration byte for isochronous
endpoints.
7OEPENEndpoint enableThe endpoint enable bit is set to a 1 by the MCU to enable the OUT endpoint.
6ISOIsochronous endpointThe isochronous endpoint bit is set to a 1 by the MCU to specify the use of a particular OUT
5OVFOverflowThe overflow bit is set to a 1 by the UBM to indicate a buffer overflow condition has occurred.
4:0BPS(4:0)Bytes per sampleThe bytes per sample bits are used to define the number of bytes per isochronous data
endpoint for isochronous transactions. This bit must be cleared to a 0 by the MCU for a
particular OUT endpoint to be used for control, interrupt, or bulk transactions.
This bit is used for diagnostic purposes only and is not used for normal operation. This bit
can only be cleared to a 0 by the MCU.
sample. In other words, the total number of bytes in an entire audio codec frame. For
example, a PCM 16-bit stereo audio data sample consists of 4 bytes. There are two bytes of
left channel data and two bytes of right channel data. For a four channel system using 16-bit
data, the total number of bytes is 8, which is the isochronous data sample size.
00h = 1 byte, 01h = 2 bytes, …, 1Fh = 32 bytes
A.4.4USB IN Endpoint Configuration Bytes
This section describes the individual bytes in the USB endpoint configuration blocks for the IN endpoints. A set of
8 bytes is used for the control and operation of each USB IN endpoint. In addition to the USB control endpoint, the
TAS1020A supports up to a total of seven IN endpoints.
A.4.4.1 USB IN Endpoint – Y Buffer Data Count Byte (IEPDCNTYx)
The USB IN endpoint Y buffer data count byte contains the 7-bit value used to specify the amount of data to be
transmitted in a data packet to the host PC. The no acknowledge status bit is also contained in this byte.
7NACKNo acknowledgeThe no acknowledge status bit is set to a 1 by the UBM at the end of a successful USB IN
6:0DCNTY(6:0)Y Buffer data countThe Y buffer data count value is set by the MCU or DMA when a new data packet is written
transaction to this endpoint to indicate that the USB endpoint Y buffer is empty . For control,
interrupt, or bulk endpoints, when this bit is set to a 1, all subsequent transactions to the
endpoint result in a NACK handshake response to the host PC. Also for control, interrupt,
and bulk endpoints to enable this endpoint to transmit another data packet to the Host PC,
this bit must be cleared to a 0 by the MCU. For isochronous endpoints, a NACK handshake
response to the host PC is not allowed. Therefore, the UBM ignores this bit in reference to
sending the next data packet. However, the MCU or DMA must clear this bit after writing a
data packet to the buffer.
to the Y buffer for the IN endpoint. The 7-bit value is set to the number of bytes in the data
packet for control, interrupt, or bulk endpoint transfers and is set to the number of samples
in the data packet for isochronous endpoint transfers. T o determine the number of samples
in the data packet for isochronous transfers, the bytes per sample value in the configuration
byte is used.
A–12
Page 81
A.4.4.2 USB IN Endpoint – Y Buffer Base Address Byte (IEPBBAYx)
The USB IN endpoint Y buffer base address byte contains the 8-bit value used to specify the base memory location
for the Y data buffer for a particular USB IN endpoint.
7:0BBAY(10:3)Y Buffer base addressThe Y buffer base address value is set by the MCU to program the base address location in
memory to be used for the Y data buffer . A total of 11 bits is used to specify the base address
location. This byte specifies the most significant 8 bits of the address. All 0s are used by the
hardware for the three least significant bits.
A.4.4.3 USB IN Endpoint – X Buffer Data Count Byte (IEPDCNTXx)
The USB IN endpoint X buffer data count byte contains the 7-bit value used to specify the amount of data received
in a data packet from the host PC. The no acknowledge status bit is also contained in this byte.
7NACKNo acknowledgeThe no acknowledge status bit is set to a 1 by the UBM at the end of a successful USB IN
6:0DCNTX(6:0)X Buffer data countThe X buffer data count value is set by the MCU or DMA when a new data packet is written
transaction to this endpoint to indicate that the USB endpoint X buffer is empty . For control,
interrupt, or bulk endpoints, when this bit is set to a 1, all subsequent transactions to the
endpoint result in a NACK handshake response to the host PC. Also for control, interrupt,
and bulk endpoints to enable this endpoint to transmit another data packet to the host PC,
this bit must be cleared to a 0 by the MCU. For isochronous endpoints, a NACK handshake
response to the host PC is not allowed. Therefore, the UBM ignores this bit in reference to
sending the next data packet. However, the MCU or DMA must clear this bit after writing a
data packet to the buffer.
to the X buffer for the IN endpoint. The 7-bit value is set to the number of bytes in the data
packet for control, interrupt, or bulk endpoint transfers and is set to the number of samples
in the data packet for isochronous endpoint transfers. T o determine the number of samples
in the data packet for isochronous transfers, the bytes per sample value in the configuration
byte is used.
A.4.4.4 USB IN Endpoint – X and Y Buffer Size Byte (IEPBSIZx)
The USB IN endpoint X and Y buffer size byte contains the 8-bit value used to specify the size of the two data buffers
to be used for this endpoint.
7BSIZ(7:0)Buffer sizeFor control, interrupt, and bulk transactions, the X and Y buffer size value is set by the MCU
to program the size of the X and Y data packet buffers. Both buffers are programmed to the
same size based on this value. This value should be in 8 byte units. For example, a value of
18h results in the size of the X and Y buffers each being set to 192 bytes. For isochronous
transactions, the buffer size sets the size of the single circular buffer.
A–13
Page 82
A.4.4.5 USB IN Endpoint – X Buffer Base Address Byte (IEPBBAXx)
The USB IN endpoint X buffer base address byte contains the 8-bit value used to specify the base memory location
for the X data buffer for a particular USB IN endpoint.
7:0BBAX(10:3)X Buffer base addressThe X buffer base address value is set by the MCU to program the base address location in
memory to be used for the X data buffer . A total of 11 bits is used to specify the base address
location. This byte specifies the most significant 8 bits of the address. All 0s are used by the
hardware for the three least significant bits.
A.4.4.6 USB IN Endpoint – Configuration Byte (IEPCNFx)
The USB IN endpoint configuration byte contains the various bits used to configure and control the endpoint. Note
that the bits in this byte take on different functionality based on the type of endpoint defined. Basically, the control,
interrupt and bulk endpoints function differently than the isochronous endpoints.
A.4.4.6.1 USB IN Endpoint Configuration Byte Settings – Control, Interrupt or Bulk Transactions
This section defines the functionality of the bits in the USB IN endpoint configuration byte for control, interrupt, and
bulk endpoints.
7IEPENEndpoint enableThe endpoint enable bit is set to a 1 by the MCU to enable the IN endpoint. This bit does not
6ISOIsochronous endpointThe isochronous endpoint bit is set to a 1 by the MCU to specify the use of a particular IN
5TOGGLEToggleThe toggle bit is controlled by the UBM and is toggled at the end of a successful in data
4DBUFDouble buffer modeThe double buffer mode bit is set to a 1 by the MCU to enable the use of both the X and Y
3STALLStallThe stall bit is set to a 1 by the MCU to stall endpoint transactions. When this bit is set, the
2IEPIEInterrupt enableThe interrupt enable bit is set to a 1 by the MCU to enable the IN endpoint interrupt. See
1:0—ReservedReserved for future use.
affect the reception of the control endpoint setup stage transaction.
endpoint for isochronous transactions. This bit must be cleared to a 0 by the MCU to use a
particular IN endpoint for control, interrupt, or bulk transactions.
stage transaction if a valid data packet is transmitted. If this bit is a 0, a DATA0 PID is
transmitted in the data packet to the host PC. If this bit is a 1, a DA T A1 PID is transmitted in
the data packet.
data packet buffers for USB transactions to a particular IN endpoint. This bit must be
cleared to a 0 by the MCU to use the single buffer mode. In the single buffer mode, only the X
buffer is used.
hardware automatically returns a stall handshake to the host PC for any transaction
received for the endpoint.
Section A.5.7.2 for details on the IN endpoint interrupts.
A–14
Page 83
A.4.4.6.2 USB IN Endpoint Configuration Byte Settings – Isochronous Transactions
This section defines the functionality of the bits in the USB IN endpoint configuration byte for isochronous endpoints.
7IEPENEndpoint enableThe endpoint enable bit is set to a 1 by the MCU to enable the IN endpoint.
6ISOIsochronous endpointThe isochronous endpoint bit is set to a 1 by the MCU to specify the use of a particular IN
5OVFOverflowThe overflow bit is set to a 1 by the UBM to indicate a buffer overflow condition has occurred.
4:0BPS(4:0)Bytes per sampleThe bytes per sample bits are used to define the number of bytes per isochronous data
endpoint for isochronous transactions. This bit must be cleared to a 0 by the MCU for a
particular IN endpoint to be used for control, interrupt, or bulk transactions.
This bit is used for diagnostic purposes only and is not used for normal operation. This bit
can only be cleared to a 0 by the MCU.
sample. In other words, the total number of bytes in an entire audio codec frame. For
example, a PCM 16-bit stereo audio data sample consists of 4 bytes. There are two bytes of
left channel data and two bytes of right channel data. For a four channel system using 16-bit
data, the total number of bytes is 8, which is the isochronous data sample size.
00h = 1 byte, 01h = 2 bytes, …, 1Fh = 32 bytes
A.4.5USB Control Endpoint Setup Stage Data Packet Buffer
The USB control endpoint setup stage data packet buffer is the buffer space used to store the 8-byte data packet
received from the host PC during a control endpoint transfer setup stage transaction. Refer to Chapter 9 of the USB
Specification for details on the data packet.
T able A–2. USB Control Endpoint Setup Data Packet Buffer Address Map
ADDRESSNAME
FF2FhwLength – Number of bytes to transfer in the data stage
FF2EhwLength – Number of bytes to transfer in the data stage
FF2DhwIndex – Index or offset value
FF2ChwIndex – Index or offset value
FF2BhwValue – Value of a parameter specific to the request
FF2AhwValue – Value of a parameter specific to the request
FF29hbRequest – Specifies the particular request
FF28hbmRequestType – Identifies the characteristics of the request
A–15
Page 84
A.5 Memory-Mapped Registers
The TAS1020A device provides a set of control and status registers to be used by the MCU to control the overall
operation of the device. This section describes the memory-mapped registers.
T able A–3. Memory-Mapped Registers Address Map
ADDRESSMNEMONICNAMESECTIONPAGE
FFFFhUSBFADRUSB function address registerA.5.1.1A–17
FFFEhUSBSTAUSB status registerA.5.1.2A–18
FFFDhUSBIMSKUSB interrupt mask registerA.5.1.3A–19
FFFChUSBCTLUSB control registerA.5.1.4A–19
FFFBhUSBFNLUSB frame number register (low-byte)A.5.1.5A–20
FFFAhUSBFNHUSB frame number register (high-byte)A.5.1.6A–20
FFF9hACG2FRQ0Adaptive clock generator2 frequency register (Byte 0)A.5.3.6A–25
FFF8hACG2FRQ1Adaptive clock generator2 frequency register (Byte 1)A.5.3.7A–25
FFF7hACG2FRQ2Adaptive clock generator2 frequency register (Byte 2)A.5.3.8A–26
FFF6hACG2DCTLAdaptive clock generator2 divider control registerA.5.3.9A–26
FFF5hReservedReserved for future use
FFF4hDMABCNT1HDMA buffer content register (high-byte) (channel 1)A.5.2.5A–22
FFF3hDMABCNT1LDMA buffer content register (low-byte) (channel 1)A.5.2.4A–21
FFF2hDMABPCT0DMA bulk packet count register (low-byte)A.5.2.6A–22
FFF1hDMABPCT1DMA bulk packet count register (high-byte)A.5.2.7A–22
FFF0hDMATSL1DMA time slot assignment register (low-byte) (channel 1)A.5.2.1A–20
FFEFhDMATSH1DMA time slot assignment register (high-byte) (channel 1)A.5.2.2A–21
FFEEhDMACTL1DMA control register (channel 1)A.5.2.3A–21
FFEDhReservedReserved for future use
FFEChDMABCNT0HDMA current buffer content register (high-byte) (channel 0)A.5.2.5A–22
FFEBhDMABCNT0LDMA current buffer content register (low-byte) (channel 0)A.5.2.4A–21
FFEAhDMATSL0DMA time slot assignment register (low-byte) (channel 0)A.5.2.1A–20
FFE9hDMATSH0DMA time slot assignment register (high-byte) (channel 0)A.5.2.2A–21
FFE8hDMACTL0DMA control register (channel 0)A.5.2.3A–21
FFE7hACG1FRQ0Adaptive clock generator1 frequency register (byte 0)A.5.3.1A–24
FFE6hACG1FRQ1Adaptive clock generator1 frequency register (byte 1)A.5.3.2A–24
FFE5hACG1FRQ2Adaptive clock generator1 frequency register (byte 2)A.5.3.3A–24
FFE4hACGCAPLAdaptive clock generator1 MCLK capture register (low byte)A.5.3.4A–25
FFE3hACGCAPHAdaptive clock generator1 MCLK capture register (high byte)A.5.3.5A–25
FFE2hACG1DCTLAdaptive clock generator1 divider control registerA.5.3.10A–26
FFE1hACGCTLAdaptive clock generator control registerA.5.3.11A–27
FFE0hCPTCNF1Codec port interface configuration register 1A.5.4.1A–27
FFDFhCPTCNF2Codec port interface configuration register 2A.5.4.2A–28
FFDEhCPTCNF3Codec port interface configuration register 3A.5.4.3A–29
FFDDhCPTCNF4Codec port interface configuration register 4A.5.4.4A–30
FFDChCPTCTLCodec port interface control and status registerA.5.4.5A–31
FFDBhCPTADRCodec port interface address registerA.5.4.6A–32
FFDAhCPTDATLCodec port interface data register (low-byte)A.5.4.7A–32
FFD9hCPTDATHCodec port interface data register (high-byte)A.5.4.8A–33
FFD8hCPTVSLLCodec port interface valid slots register (low-byte)A.5.4.9A–33
FFD7hCPTVSLHCodec port interface valid slots register (high-byte)A.5.4.10A–34
FFD6hCPTRXCNF2Codec port receive interface configuration register 2A.5.4.11A–34
FFD5hCPTRXCNF3Codec port receive interface configuration register 3A.5.4.12A–35
FFD4hCPTRXCNF4Codec port receive interface configuration register 4A.5.4.13A–36
FFD3hReservedReserved for future use
FFD2hReservedReserved for future use
FFD1hReservedReserved for future use
FFD0hReservedReserved for future use
FFCFhReservedReserved for future use
FFCEhReservedReserved for future use
FFCDhReservedReserved for future use
FFCChReservedReserved for future use
FFCBhReservedReserved for future use
FFCAhP3MSKMask register for P3A.5.5.1A–36
FFC9hReservedReserved for future use
FFC8hReservedReserved for future use
FFC7hReservedReserved for future use
FFC6hReservedReserved for future use
FFC5hReservedReserved for future use
FFC4hReservedReserved for future use
FFC3hI2CADRI2C interface address registerA.5.6.1A–36
FFC2hI2CDATII2C interface receive data registerA.5.6.2A–37
FFC1hI2CDATOI2C interface transmit data registerA.5.6.3A–37
FFC0hI2CCTLI2C interface control and status registerA.5.6.4A–38
FFBFhReservedReserved for future use
FFBEhReservedReserved for future use
FFBDhReservedReserved for future use
FFBChCh0WrPtrLUBM write pointer (low-byte) (8 bits)A.5.2.8A–22
FFBBhCh0WrPtrHUBM write pointer (high-byte) (3 bits)A.5.2.9A–23
FFBAhCh0RdPtrLDMA read pointer (low-byte) (8 bits)A.5.2.10A–23
FFB9hCh0RdPtrHDMA read pointer (high-byte) (3 bits)A.5.2.11A–23
FFB8hCh1WrPtrLUBM write pointer (low-byte) (8 bits)A.5.2.8A–22
FFB7hCh1WrPtrHUBM write pointer (high-byte) (3 bits)A.5.2.9A–23
FFB6hCh1RdPtrLDMA read pointer (low-byte) (8 bits)A.5.2.10A–23
FFB5hCh1RdPtrHDMA read pointer (high-byte) (3 bits)A.5.2.11A–23
FFB4hOEPINTUSB OUT endpoint interrupt registerA.5.7.1A–39
FFB3hIEPINTUSB IN endpoint interrupt registerA.5.7.2A–39
FFB2hVECINTInterrupt vector registerA.5.7.3A–40
FFB1hGLOBCTLGlobal control registerA.5.7.4A–41
FFB0hMEMCFGMemory configuration registerA.5.7.5A–41
A–17
Page 86
A.5.1USB Registers
This section describes the memory-mapped registers used for control and operation of the USB functions. This
section consists of six registers used for USB functions.
A.5.1.1 USB Function Address Register (USBFADR – Address FFFFh)
The USB function address register contains the current setting of the USB device address assigned to the function
by the host. After power-on reset or USB reset, the default address is 00h. During enumeration of the function by the
host, the MCU should load the assigned address to this register when a USB Set_Address request is received by
the control endpoint.
7RSTRFunction resetThe function reset bit is set to a 1 by hardware in response to the host PC initiating a USB
6SUSRFunction suspendThe function suspend bit is set to a 1 by hardware when a USB suspend condition is
5RESRFunction resumeThe function resume bit is set to a 1 by hardware when a USB resume condition is detected
4SOFStart-of-frameThe start-of-frame bit is set to a 1 by hardware when a new USB frame starts. This bit is set
3PSOFPseudo start-of-frameThe pseudo start-of-frame bit is set to a 1 by hardware when a USB pseudo SOF occurs.
2SETUPSetup stage transactionThe setup stage transaction bit is set to a 1 by hardware when a successful control endpoint
1—ReservedReserved for future use
0STPOWSetup stage transaction
over-write
reset to the function. When a USB reset occurs, all of the USB logic blocks, including the
SIE, UBM, frame timer, and suspend/resume are automatically reset. The function reset
enable (FRSTE) control bit in the USB control register, when set, enables the USB reset to
reset all remaining TAS1020A logic, except the shadow the ROM (SDW) and the USB
function connect (CONT) bits. Also, when the FRSTE control bit is set to a 1, the reset
output (RSTO
This bit is read only and is cleared when the MCU writes to the interrupt vector register.
detected by the suspend/resume logic. See Section 2.2.5 for details on the USB suspend
and resume operation. This bit is read only and is cleared when the MCU writes to the
interrupt vector register.
by the suspend/resume logic. See Section 2.2.5 for details on the USB suspend and
resume operation. This bit is read only and is cleared when the MCU writes to the interrupt
vector register.
when the SOF packet from the host PC is detected, even if the TAS1020A frame timer is not
locked to the host PC frame timer. This bit is read only and is cleared when the MCU writes
to the interrupt vector register. The nominal SOF rate is 1 ms.
The pseudo SOF is an artificial SOF signal that is generated when the TAS1020A frame
timer is not locked to the host PC frame timer. This bit is read only and is cleared when the
MCU writes to the interrupt vector register. The nominal pseudo SOF rate is 1 ms.
setup stage transaction is completed. Upon completion of the setup stage transaction, the
USB control endpoint setup stage data packet buffer should contain a new setup stage data
packet. This bit is read-only and is cleared when the MCU writes to the interrupt vector
register.
The setup stage transaction over-write bit is set to a 1 by hardware when the data in the
USB control endpoint setup data packet buffer is over-written. This scenario occurs when
the host PC prematurely terminates a USB control transfer by simply starting a new control
transfer with a new setup stage transaction. This bit is read-only and is cleared when the
MCU writes to the interrupt vector register.
) signal from the T AS1020A device is also active when a USB reset occurs.
A–19
Page 88
A.5.1.3 USB Interrupt Mask Register (USBIMSK – Address FFFDh)
The USB interrupt mask register contains the interrupt mask bits used to enable or disable the generation of interrupts
based on the corresponding status bits.
7CONTFunction connectThe function connect bit is set to 1 by the MCU to connect the T AS1020A device to the USB. As a
6FENFunction enableThe function enable bit is set to 1 by the MCU to enable the TAS1020A device to respond to USB
5RWUPRemote wake-upThe remote wake-up bit is set to 1 by the MCU to request the suspend/resume logic to generate
4FRSTEFunction reset
enable
3—ReservedReserved for future use.
2—ReservedReserved for future use.
1—ReservedReserved for future use.
0SDW_OKSDW bit confirmThis bit is used as a confirmation bit to prevent a user from spuriously clearing the SDW bit in the
result of connecting to the USB, the host PC should enumerate the function. When this bit is set,
the USB data plus pullup resistor (PUR) output signal is enabled, which connects the pullup on the
PCB to the TAS1020A 3.3-V supply voltage. When this bit is cleared to 0, the PUR output is in the
high-impedance state. This bit is not affected by a USB reset.
transactions. If this bit is cleared to 0, the UBM ignores all USB transactions. This bit is cleared by a
USB reset.
resume signaling upstream on the USB. This bit is used to exit a USB low-power suspend state
when a remote wake-up event occurs. After initiating the resume signaling by setting this bit, the
MCU should clear this bit within 2.5 µs.
The function reset enable bit is set to 1 by the MCU to enable the USB reset to reset all internal logic
including the MCU. However, the shadow the ROM (SDW) and the USB function connect (CONT)
bits will not be reset. When this bit is set, the reset output (RSTO
is also active when a USB reset occurs. This bit is not affected by USB reset.
MEMCFG register. This bit must be set to 1 before clearing the SDW bit to switch from normal
mode to boot mode. This bit is not affected by USB reset.
) signal from the TAS1020A device
A–20
Page 89
A.5.1.5 USB Frame Number Register (Low Byte) (USBFNL – Address FFFBh)
The USB frame number register (low byte) contains the least significant byte of the 11-bit frame number value
received from the host PC in the start-of-frame packet.
7:0FN(7:0)Frame numberThe frame number bit values are updated by hardware each USB frame with the frame number
field value received in the USB start-of-frame packet. The frame number can be used as a time
stamp by the USB function. If the TAS1020A frame timer is not locked to the host PC frame timer ,
then the frame number is incremented from the previous value when a pseudo start-of-frame
occurs.
A.5.1.6 USB Frame Number Register (High Byte) (USBFNH – Address FFFAh)
The USB frame number register (high byte) contains the most significant 3 bits of the 11-bit frame number value
received from the host PC in the start-of-frame packet.
7:3—ReservedReserved for future use.
2:0FN(10:8)Frame numberThe frame number bit values are updated by hardware each USB frame with the frame number
field value received in the USB start-of-frame packet. The frame number can be used as a time
stamp by the USB function. If the TAS1020A frame timer is not locked to the host PC frame timer ,
then the frame number is incremented from the previous value when a pseudo start-of-frame
occurs.
A.5.2DMA Registers
This section describes the memory-mapped registers used for the two DMA channels. Each DMA channel has a set
of three registers.
7DMAENDMA enableThe DMA enable bit is set to a 1 by the MCU to enable this DMA channel. Before enabling
6HSKENHandshake enableThis bit is relevant for BULK data transfer in the OUT direction through DMA. MCU must set
5—ReservedReserved for future use
4—ReservedReserved for future use
3EPDIRUSB endpoint directionThe USB endpoint direction bit controls the direction of data transfer by this DMA channel.
2:0EPNUM(2:0)USB endpoint numberThe USB endpoint number bits are set by the MCU to define the USB endpoint number
the DMA channel, all other DMA channel configuration bits must be set to the desired value.
this bit to a 1 to enable the handshake mode for the data transfer. If MCU sets this bit, MCU
has to enable DMA for each received BULK OUT packet. DMA, once enabled, transfers the
BULK OUT packet to the C-port, disables itself and generates an interrupt to the MCU. If
MCU clears this bit, DMA handles the BULK OUT data transfer to the C-port without MCU
intervention. For more details, see Section 2.2.7.3.3.
The MCU should set this bit to a 1 to configure this DMA channel to be used for a USB IN
endpoint. The MCU must clear this bit to a 0 to configure this DMA channel to be used for a
USB OUT endpoint.
supported by this DMA channel. Keep in mind that endpoint 0 is always used for the control
endpoint, which is serviced by the MCU and not a DMA channel.
001b = Endpoint 1, 010b = Endpoint 2, …, 111b = Endpoint 7, 000b = Illegal
7:0PCNT (7:0)Bulk packet count This register shows the number of BULK OUT packets DMA has to handle in handshake mode.
MCU writes to this register before enabling the DMA to program the DMA to handle up to 64K
BULK packets without MCU intervention. MCU can read this register anytime.
7:0PCNT (15:8)Bulk packet count This register shows the number of BULK OUT packets DMA has to handle in handshake mode.
MCU writes to this register before enabling the DMA to program the DMA to handle up to 64K
BULK packets without MCU intervention. MCU can read this register anytime.
7:0WRPTR(7:0)UBM Write PointerThis register contains 8 LSB bits of 11-bit UBM Write Pointer of the isochronous OUT endpoint
buffer . MCU can read this register anytime. This 11-bit UBM Write Pointer WRPTR can be used
in conjunction with the corresponding 11-bit CHn DMA RDPTR to estimate the amount of data in
the isochronous OUT endpoint buffer .
2:0WRPTR(10:8)UBM Write PointerThis register contains 3 MSB bits of 11-bit UBM Write Pointer of the isochronous OUT endpoint
7:3—ReservedReserved for future use
buffer . MCU can read this register anytime. This 11-bit UBM Write Pointer WRPTR can be used
in conjunction with the corresponding 11-bit CHn DMA RDPTR to estimate the amount of data in
the isochronous OUT endpoint buffer .
7:0RDPTR(7:0)DMA Read PointerThis register contains 8 LSB bits of 11-bit DMA channel n (n can be 0 or 1) Read Pointer of the
Isochronous OUT endpoint buffer. MCU can read this register anytime. This 11-bit CHn DMA
Read pointer RDPTR can be used in conjunction with the corresponding 11-bit UBM Write
Pointer WRPTR to estimate the amount of data in the isochronous OUT endpoint buffer.
2:0RDPTR(10:8)DMA Read PointerThis register contains 3 MSB bits of 11-bit channel n (n can be 0 or 1) Read Pointer of the
7:3—ReservedReserved for future use
Isochronous OUT endpoint buffer. MCU can read this register anytime. This 11-bit CHn DMA
RDPTR can be used in conjunction with the corresponding 1 1-bit UBM Write Pointer WRPTR to
estimate the amount of data in the isochronous OUT endpoint buffer.
A–24
Page 93
A.5.3Adaptive Clock Generator Registers
This section describes the memory-mapped registers used for two adaptive clock generators for their controls and
operations.
The adaptive clock generator frequency register (byte 0) contains the least significant byte of the 24-bit ACG
frequency value. The adaptive clock generator frequency registers, ACG1FRQ0, ACG1FRQ1, and ACG1FRQ2,
contain the 24-bit value used to program the ACG1 frequency synthesizer. The 24-bit value of these three registers
can be used to determine the codec master clock output (MCLKO) signal frequency. The output of the ACG2
frequency synthesizer can also be used to source MCLK0. See Section 2.2.6 for the operation details of the adaptive
clock generator including instructions for programming the 24-bit ACG frequency value.
The adaptive clock generator MCLK capture register (low byte) contains the least significant byte of the 16-bit codec
master clock (MCLK) signal cycle count that is captured each time a USB start of frame (SOF) occurs. The value of
a16-bit free running counter, which is clocked with the MCLK signal, is captured at the beginning of each USB frame.
The source of the MCLK signal used to clock the 16-bit timer can be selected to be either the MCLKO signal or the
MCLKO2 signal. See Section 2.2.6 for the operation details of the adaptive clock generator.
The adaptive clock generator MCLK capture register (high byte) contains the most significant byte of the 16-bit codec
master clock (MCLK) signal cycle count that is captured each time a USB start of frame (SOF) occurs.
The adaptive clock generator control registers ACG2FRQ0, ACG2FRQ1, and ACG2FRQ2, contain the 24-bit value
used to program the ACG2 frequency synthesizer.
7MCLKO2ENMCLKO2 Output enableThis bit is set to 1 by the MCU to enable the MCLKO2 signal to be an output from the
6MCLKO1ENMCLKO1 Output enableThis bit is set to 1 by the MCU to enable the MCLKO1 signal to be an output from the
5–ReservedReserved for future use
4MCLKO1S1MCLKO1 Clock selectThis bit in conjunction with MCLKO1S0, selects the source for MCLKO1. Refer to ACG
3MCLKO1S0MCLKO1 Clock selectRefer to the description above.
2DIVENDivider EnableThe Divider Enable bit is set to 1 by the MCU to enable the Divide-by-I and Divide-by-M
1MCLKO2S1MCLKO2 Clock selectThis bit in conjunction with MCLKO2S0, selects the MCLKO2. Refer to ACG block diagram.
0MCLKO2S0MCLKO2 Clock selectRefer to the description above.
TAS1020A device. If the MCLKO2 signal is not being used, then the MCU can clear this bit
to 0 to set the output to logic 0.
TAS1020A device. If the MCLKO1 signal is not being used, then the MCU can clear this bit
to 0 to set the output to logic 0.
This section describes the memory-mapped registers used for the codec port interface control and operation. The
codec port interface has a set of ten registers. Note that the four codec port interface configuration registers can only
be written to by the MCU if the codec port enable bit (CPTEN) in the global control register is a 0 – the codec port
is disabled.
7:3NTSL(4:0)Number of time slotsThe number of time slots bits are set by the MCU to program the number of time slots per audio
2:0MODE(2:0)Mode selectThe mode select bits are set by the MCU to program the codec port interface mode of
frame.
00000b = illegal, 00001b = 2 time slots per frame, …, 01 101 = 14 time slots per frame
operation. In addition to selecting the desired mode of operation, the MCU must also program
the other configuration registers to obtain the correct serial interface format.
000b = mode 0 - General-purpose mode
001b = mode 1 - AIC mode
010b = mode 2 - AC ’97 1.X mode
011b = mode 3 - AC ’97 2.X mode
100b = mode 4 - I2S mode – 1 OUT and 2 IN at same frequency
101b = mode 5 - I2S mode – 1 OUT and 1 IN at different frequencies
110b = reserved
111b = reserved
7:6TSL0L(1:0)Time slot 0 lengthThe time slot 0 Length bits are set by the MCU to program the number of serial clock
5:3BPTSL(2:0)Data bits per time slotThe data bits per time slot bits are set by the MCU to program the number of data bits per
2:0TSLL(2:0)Time slot lengthThe time slot length bits are set by the MCU to program the number of serial clock (CSCLK)
(CSCLK) cycles for time slot 0.
00b = CSCLK cycles for time slot 0 same as other time slots
01b = 8 CSCLK cycles for time slot 0
10b = 16 CSCLK cycles for time slot 0
11b = 32 CSCLK cycles for time slot 0
audio time slot. Note that this value in not used for the secondary communication address
and data time slots.
000b = 8 data bits per time slot
001b = 16 data bits per time slot
010b = 18 data bits per time slot
011b = 20 data bits per time slot
100b = 24 data bits per time slot
101b = 32 data bits per time slot
110b = reserved
111b = reserved
cycles for all time slots except time slot 0.
000b = 8 CSCLK cycles per time slot
001b = 16 CSCLK cycles per time slot
010b = 18 CSCLK cycles per time slot
011b = 20 CSCLK cycles per time slot
100b = 24 CSCLK cycles per time slot
101b = 32 CSCLK cycles per time slot
110b = reserved
111b = reserved
7DDLYData delayThe data delay bit is set to a 1 by the MCU to program a one CSCLK cycle delay of the serial
6TRSEN3-State enableThe 3-state enable bit is set to a 1 by the MCU to program the hardware to set the serial
5CSCLKPCSCLK polarityThe CSCLK polarity bit is used by the MCU to program the clock edge used for the codec
4CSYNCPCSYNC polarityThe CSYNC polarity bit is set to a 1 by the MCU to program the polarity of the codec port
3CSYNCLCSYNC lengthThe CSYNC length bit is set to a 1 by the MCU to program the length of the codec port
2BYORByte orderThe byte order bit is used by the MCU to program the byte order for the data moved by the
1CSCLKDCSCLK directionThe CSCLK direction bit is set to a 1 by the MCU to program the direction of the codec port
0CSYNCDCSYNC directionThe CSYNC direction bit is set to a 1 by the MCU to program the direction of the codec port
data output and input signals in reference to the leading edge of the CSYNC signal. The
MCU must clear this bit to a 0 for no delay between these signals.
data output signal to the high-impedance state for the time slots during the audio frame that
are not valid. The MCU must clear this bit to a 0 to program the hardware to use
zero-padding for the serial data output signal for time slots during the audio frame that are
not valid.
port interface frame sync (CSYNC) output signal, codec port interface serial data output
(CDAT O) signal and codec port interface serial data Input (CDA TI) signal. When this bit is
set to a 1, the CSYNC signal is generated with the negative edge of the codec port interface
serial clock (CSCLK) signal. Also, when this bit is set to a 1, the CDAT O signal is generated
with the negative edge of the CSCLK signal and the CDATI signal is sampled with the
positive edge of the CSCLK signal. When this bit is cleared to a 0, the CSYNC signal is
generated with the positive edge of the CSCLK signal. Also, when this bit is cleared to a 0,
the CDAT O signal is generated with the positive edge of the CSCLK signal and the CDA TI
signal is sampled with the negative edge of the CSCLK signal.
interface frame sync (CSYNC) output signal to be active high. The MCU must clear this bit
to a 0 to program the polarity of the CSYNC output signal to be active low.
interface frame sync (CSYNC) output signal to be the same number of CSCLK cycles as
time slot 0. The MCU must clear this bit to a 0 to program the length of the CSYNC output
signal to be one CSCLK cycle.
DMA between the USB endpoint buffer and the codec port interface. When this bit is set to
a 1, the byte order of each audio sample is reversed when the data is moved to/from the
USB endpoint buffer . When this bit is cleared to a 0, the byte order of the each audio sample
is unchanged.
interface serial clock (CSCLK) signal as an input to the T AS1020A device. The MCU must
clear this bit to a 0 to program the direction of the CSCLK signal as an output from the
TAS1020A device.
interface frame sync (CSYNC) signal as an input to the T AS1020A device. The MCU must
clear this bit to a 0 to program the direction of the CSYNC signal as an output from the
TAS1020A device.
3CptBlkC-port bulk modeThis bit is used when C-port is in Mode 0. If this bit is cleared to 0, the C-port
2:0DIVB(2:0)Divide by B valueThe divide by B control bits are set by the MCU to program the divide ratio used to
The command/status address/data time slot bits are set by the MCU to program the
time slots to be used for the secondary communication address and data values. For
the AC ’97 modes of operation, this value must be set to 0001b which results in time
slot 1 being used for the address and time slot 2 being used for the data. For the AIC
and general-purpose modes of operation, the same time slot is used for both
address and data. For the AIC mode of operation this value must be set to 0111b
which results in time slot 7 being used for both the address and data.
0000b = time slot 0, 0001b = time slot 1, …, 1111b = time slot 15
sync/clocks are free running once C-port is enabled. If this bit is set to 1, DMA
controls the C-port sync/clocks. The sync/clocks are active only when valid data is
present in a codec frame.
derive CSCLK from MCLKO.
000b = CSCLK output disabled
001b = divide by 2
010b = divide by 3
011b = divide by 4
100b = divide by 5
101b = divide by 6
110b = divide by 7
111b = divide by 8
A–32
Loading...
+ 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.