ANDOTHER FORMATS)
PLL FOR INTERNAL CLOCK AND FOR OUT-
PUTPCM CLOCK GENERATION
CRC CHECK AND SYNCHRONISATION ER-
ROR DETECTION WITH SOFTWARE INDICATORS
2
I
C CONTROL BUS
LOW POWER2.4VCMOS TECHNOLOGY
WIDE RANGE OF EXTERNAL CRYSTALS
FREQUENCIES SUPPORTED
2
WITH ADPCM CAPABILITY
PRODUCT PREVIEW
ORDERING NUMBERS: STA015 (SO28)
APPLICATIONS
PC SOUNDCARDS
MULTIMEDIA PLAYERS
VOICERECORDERED
DESCRIPTION
The STA015 is a fully integrated high flexibility
MPEG Layer III Audio Decoder, capable of decoding Layer III compressedelementary streams,
as specified in MPEG 1 and MPEG 2 ISO standards. The device decodesalsoelementarystreams
STA015 receives the input data through a Serial
Input Interface. The decoded signal is a stereo,
mono, or dual channel digital output that can be
sent directly to a D/Aconverter, by the PCM Output Interface.This interface is software programmable to adapt the STA015 digital output to the
most common DACs architectures used on the
market.
The functional STA015 chip partitioning is described in Fig.1 and Fig.2.
STA015T (TQFP44)
STA015B (LFBGA 64)
February 2000
This is preliminary informationon a new product now in development or undergoing evaluation. Details are subject to changewithout notice.
1/44
STA015-STA015B-STA015T
Figure1a. BLOCK DIAGRAM for TQFP44 and LFBGA64 package
The MP3 decoder engine is able to decode any
Layer III compliant bitstream: MPEG1, MPEG2
and MPEG2.5 streams are supported. Besides
audio data decoding the MP3 engine also performs ANCILLARY data extraction: these data
can be retrieved via I2C bus by the application
microcontroller in order to implement specific
functions.
Decodedaudio data goesthrough a software volume control and a two-band equalizer blocks before feeding the output I2S interface. This results
in no need for an external audio processor.
MP3 bitstream is sent to the decoderusing a simple serial input interface (see pins SDI, SCKR,
BIT_EN and DATA_REQ), supporting input rate
up to 20 Mbit/s. Received data are stored in a
256 bytes long input buffer which provides a
ABSOLUTE MAXIMUM RATINGS
feedback line (see DATA_REQ pin) to the bitstreamsource (tipicallyan MCU).
1.2 - ADPCMencoder/decoder engine
This device also embeds a multistandardADPCM
encoder/decoder supporting different sample
rates (from 8 KHz up to 32 KHz) and different
sample sizes (from 8 bit to 32 bits). During encoding process two different interfaces can be
used to feeddata: theserial input interface (same
interface used also to feed MP3 bitstream) or the
ADC input interface, which provides a seamless
connection with an external A/D converter. The
currentlyused interface is selected via I2Cbus.
Also to retrieve encoded data two different interfaces are available: the I2C bus or the faster
GPSOoutput interface. GPSO interface is able to
output data with a bitrate up to 5 Mbit/s and its
control pins (GPSO_SCKR, GPSO_DATA and
GPSO_REQ)can be configuredin order to easily
fit thetarget application.
SymbolParameterValueUnit
V
DD
V
i
V
O
T
stg
T
oper
Power Supply-0.3 to 4V
Voltageon Input pins-0.3 to VDD+0.3V
Voltageon output pins-0.3 to VDD+0.3V
Storage Temperature-40 to +150°C
Operative ambient temp-20 to +85°C
129B5VDD_1Supply Voltage
230B4VSS_1Ground
331A4SDAI/Oi
432B3SCLII
534A1SDIIReceiver Serial DataCMOS Input Pad Buffer
636B2SCKRIReceiverSerial ClockCMOS Input Pad Buffer
738D4BIT_ENIBit EnableCMOSInput Pad Bufferwith
840D1SRC_INT/SCK_ADCIInterrupt Line/ADC Serial
942E2SDOOTransmitterSerialData(PCMData) CMOS 4mA Output Drive
1044F2SCKTOTransmitter Serial ClockCMOS 4mA Output Drive
112H1LRCLKTOTransmitter Left/Right ClockCMOS 4mA Output Drive
123H3OCLKI/OOversampling Clock for DACCMOS Input Pad Buffer
135F3VSS_2Ground
146E4VDD_2Supply Voltage
157G4VSS_3Ground
168G5VDD_3Supply Voltage
1710F5PVDDPLL Power
1811G6PVSSPLL Ground
1912G7FILTOPLL Filter Ext. Capacitor
2219E7VSS_4Ground
2321C8VDD_4Supply Voltage
2422D7TESTENITest EnableCMOSInputPad Bufferwith
2524A7SDI_ADCIADC Data InputCMOS Input Pad Buffer
2625B6RESETISystem ResetCMOSInputPad Bufferwith
2726A5LRCK_ADCIADC Left/Right ClockCMOS Output Pad Buffer
2827C5OUT_CLK/
DATA_REQ
20C7IODATA[0]I/OGPIO Data LineCMOS 4mA Schmitt Trigger
18E6IODATA[1]I/OGPIO DataLine
16F6IODATA[2]I/OGPIO Data Line
14F8IODATA[3]I/OGPIO Data Line
37C3IODATA[4]I/OGPIO Data Line
39E3IODATA[5]I/OGPIO DataLine
41D2IODATA[6]I/OGPIO Data Line
43F1IODATA[7]I/OGPIO Data Line
35C2GPIO_STROBEI/OGPIO Strobe Signal
4G3GPSO_REQOGPSO Request SignalCMOS Output Pad Buffer
28C6GPSO_SCKRIGPSO Serial ClockCMOS Input Pad Buffer
33A2GPSO_DATAOGPSO Serial DataCMOS Output Pad Buffer
Note: In functional mode TESTEN must be connectedto VDD.
The STA015 input clock is derivated from an external source or from a industry standard crystal
oscillator, generating input frequencies of 10,
V
REF
D98AU967
Other frequencies may be supported upon request to STMicroelectronics. Each frequency is
supported by downloading a specific configuration file, provided by STM
XTI is an input Pad with specificlevels.
14.31818 or14.7456 MHz.
SymbolParameterTest ConditionMin.Typ.Max.Unit
V
IL
V
IH
Low LevelInput VoltageVDD-1.8V
High Level Input VoltageVDD-0.8V
CMOScompatibility
The XTI pad low and high levels are CMOS compatible; XTI pad noise margin is better than typical
CMOSpads.
TTL compatibility
The XTI pad low level is compatible with TTL while the high level is not compatible(for example if V
DD =
3V TTL min high level = 2.0V while XTI min high level = 2.2V)
7/44
STA015-STA015B-STA015T
Figure5. PLL and Clocks GenerationSystem
XTI
N
PFDCP
M
FRAC
Update FRAC
Switching
Circuit
2.4 - PCM Output Interface
The decodedaudio data are output in serial PCM
format.The interface consists of the followingsignals:
SDOPCM Serial Data Output
SCKTPCM SerialClock Output
LRCLKLeft/RightChannel SelectionClock
The output samples precision is selectable from
Figure6. PCM OutputFormats
16 SCLK Cycles
LRCKT
16 SCLK Cycles
R
CC
VCO
Disable PLL
OCLK
X
XTI2OCLK
DCLK
S
XTI2DSPCLK
16 to 24 bits/word, by setting the outputprecision
with PCMCONF (16, 18, 20 and 24 bits mode)
register. Data can be output either with the most
significant bit first (MS) or least significant bit first
(LS), selected by writing into a flag of the
PCMCONFregister.
Figure 8 gives a description of the several
STA015PCM OutputFormats.
The sample rates set decoded by STA015 is described in Table 1.
16SCLK Cycles
16 SCLK Cycles
16 SCLK Cycles
Table 1:
SDO
SDO
LRCKT
SDO
SDO
SDO
SDO
M
S
L
S
32 SCLK Cycles
M
L
S
S
M
0
S
L
M
0
S
S
M
S
M
L
S
S
L
M
S
S
32 SCLK Cycles
M
S
L
S
M
00
00
S
L
MSBMSB
S
L
M
S
S
L
M
S
S
32SCLK Cycles
L
S
M
S
M
S
MSL
00
L
S
L
S
L
S
S
M
00
S
MSL
S
MSL
MSBMSB
M
L
S
S
M
L
S
S
32 SCLK Cycles
M
0
L
S
00
S
L
S
S
M
0
S
L
M
0
S
S
M
S
PCM_ORD = 0
L
S
PCM_PRECis 16 bit mode
PCM_ORD = 1
M
S
PCM_PRECis 16 bit mode
32 SCLK Cycles
PCM_FORMAT = 1
0
PCM_DIFF = 1
PCM_FORMAT = 0
L
S
PCM_DIFF = 0
PCM_FORMAT = 0
PCM_DIFF = 1
PCM_FORMAT = 1
L
S
PCM_DIFF = 1
MPEGSampling Rates (KHz)
MPEG 1MPEG 2MPEG 2.5
482412
44.122.0511.025
32168
8/44
STA015-STA015B-STA015T
2.5 - STA015Operation Mode
The STA015 can work in two different modes,
calledMultimediaMode and BroadcastMode.
In
Multimedia Mode
(default mode) STA015 decodes the incoming bitstream, acting as a master
of the data communication from the source to itself.
This control is done by a specific buffer management,controlledbySTA015 embedded software.
The data source, by monitoring the DATA_REQ
line, send to STA015 the input data, when the
signalis high (defaultconfiguration).
Thecommunicationisstoppedwhenthe
DATA_REQline is low.
In this mode the fractional part of the PLL is disabled and the audio clocks are generated at
nominal rates. Fig. 7 describes the default
DATA_REQsignalbehaviour. Programming
STA015 it is possible to invert the polarity of the
DATA_REQline (register REQ_POL).
Figure7.
SOURCE STOPS TRANSMITTING DATASOURCE STOPS TRANSMITTING DATA
DATA_REQ
SOURCE SEND DATA TO STA015
D00AU1144
In Broadcast Mode, STA015 works receiving a
bitstream with the input speed regulated by the
source. In this configuration the source has to
guarantee that the bitrate is equivalent to the
nominalbitrateof the decodedstream.
To compensate the difference between the nominal and the real sampling rates, the STA015 embedded software controls the fractional PLL operation. Portable or Mobile applications need
normally to operate in Broadcast Mode. In both
modes the MPEG Synchronisation is automatic
and transparentto the user.
2.6 - STA015Decoding States
There are three different decoder states: Idle,
Init, and Decode. Commands to change the de-
coding states are described in the STA015 I
2
C
registersdescription.
Idle Mode
In this mode the decoder is waiting for the RUN
command. This mode shouldbe used to initialise
the configuration registers of the device. The
DAC connected to STA015 can be initialised during this mode (set MUTE to 1).
PLAYMUTEClock StatePCM Output
X0Not Running0
X1Running0
Init Mode
”PLAY” and ”MUTE” changes are ignored in this
mode. The internal state of the decoder will be
updatedonly when the decoder changes from the
state ”init” to the state ”decode”.The ”init” phase
ends when the first decoded samples are at the
output stage of the device.
Decode Mode
This mode is completely described by the follow-
ing table:
PLAYMUTEClock State
00Not Running0No
01Running0No
10RunningDecoded
11Running0Yes
PCM
Output
Samples
Decoding
Yes
9/44
STA015-STA015B-STA015T
Figure8.
MPEGDecoder Interfaces.
DATA_REQ
SDI
DATA
SOURCE
D98AU912
SCKR
BIT_EN
Figure9. Serial Input Interface Clocks
SDI
XTO
XTIFILT
PLL
MPEG
DECODER
SERIAL AUDIO INTERFACE
RXTX
µP
IIC
SCLSDA
IIC
DATA IGNORED
SDO
SCKT
LRCKT
DAC
OCLK
SCKR
SCKR
BIT_EN
D98AU968A
2.2 - SerialInput Interface
STA015 receives the input data (MSB first)
thought the Serial Input Interface (Fig.5). It is a
serial communication interface connected to the
SDI (Serial Data Input) and SCKR (Receiver Serial Clock).
The interface can be configured to receive data
sampled on both rising and falling edge of the
SCKR clock. The BIT_EN pin, when set to low,
forces the bitstream input interface to ignore the
incoming data. For proper operation Bit_E
N line
should be toggled only when SCRK is stable low
(for both SCLK_POL configuration) The possible
configurationsare describedin Fig. 9.
2.3 - PLL & Clock Generator System
When STA015 receives the input clock, as described in Section 2.1, and a valid layer III input
bitstream, the internal PLL locks, providing to the
DSP Core the master clock (DCLK), and to the
SCLK_POL=0
SCLK_POL=4
DATA IGNOREDDATA VALID
Audio Output Interface the nominal frequenciesof
the incomingcompressedbit stream. The STA015
PLLblockdiagramisdescribedin Figure5.
The audio sample rates are obtained dividing the
oversampl i ng clock(OCLK)by softwareprogramm able factors. The operation is done by STA015 embeddedsoftwar eand it istrans parenttotheuser.
TheSTA015PLLcandrivedirectlymost of thecommercial DACs families, providing an over sampling
clock, OCLK, obtaineddividing the VCO frequency
witha softwareprogrammabledividers.
2.4 - GPSOOutput Interface
In order to retrieveADPCM encoded data a General Purpose Serial Output interface is available
(in TQFP44 and LFBGA64 packages only). The
maximumfrequencyforclockisthe
GPSO_SCKR DSP system clock frequency divided by 3 (i.e. 8.192 MHz @ 24.58MHz).The interface is based on a simple and configurable 3lines protocol, as described by figure10.
10/44
Figure10.
GPSO_SCKR
GPSO_REQ
GPSO_SCKR
STA015MCU
GPSO_DATA
GPSO_REQ
STA015-STA015B-STA015T
GPSO_DATA
To enable the GPSO interface bit GEN of
GPSO_ENABLE register must be set. Using the
GPSO_CONFregister the protocol can be configured in order to provide outcoming data on ris-
ADPCM to provide an interrupt; the use of the
other bits is still to be defined. The related configurationregisteris GPIO_CONF.Seethe following summary for related pin usage:
D00AU1145
ing/falling edge of GPSO_SCKR input clock; the
GPSO_REQ request signal polarity (usually connected to an MCU interrupt line) can be configuredas well.
ADC Inteface
NameDescriptionDir
I/ODATA [0]
GPIO data lineI/O
....................
I/ODATA [7]
GPIO_STROBEGPIO strobe lineI/O
Beside the serial input interface based on SDI
and SCKR lines a 3 wire flexible and user configurable input interface is also available, suitable to
interface with most A/D converters. To configure
this interface 4 specificI
2
C registersare available
(ADC_ENABLE, ADC_CONF, ADC_WLEN and
ADC_WPOS). Refer to registers description for
more details.
2.5 ADPCM Encoding: Overview
According to the previously described interfaces
there are 4 ways to manage ADPCM data stream
while encoding. Input interface can be either the
serial receiver block (SDI + SCKR + DATA_REQ
lines) or the ADC specific interface.
Output interfaces can be either the I
General PurposeI/O Interface
A new general purpose I/O interface has been
added to this device (TQFP44 and LFBGA64
only). Actually only the strobe line is used in
SERIAL I/F (SCKR+ SDI + DATA_REQ)GPSO I/F (GPSO_REQ + GPSO_DATA +
SERIAL I/F (SCKR+ SDI + DATA_REQ) (*)I
(*) STA013 Compatible mode
GPSO_SCKR)
2
C + Interrupt (SCL + SDA + DATA_REQ)SO28/TQFP44
GPSO_SCKR)
2
C (polling) (SCL + SDA)SO28/TQFP44
or without interrupt line) or the GPSO high-speed
serial interface (GPSO_REQ + GPSO_ DATA +
GPSO_SCKRlines). This result in the following 4
methodsto handle encoding flow:
Figure.11
....
I/O
2
C bus (with
Available on
package
TQFP44
LFBGA64
LFBGA64
TQFP44
LFBGA64
LFBGA64
LRCK_ADC
SDI_ADC
SCK_ADC
SDI
SCKR
DATA_REQ
ADC I/F
SERIAL
RECEIVER
ENCOD
ENGINE
GPSOMUX
I2C
D99AU1064
GPSO_REQ
GPSO_DATA
GPSO_SCKR
SDA
SCL
DATA_REQ
11/44
STA015-STA015B-STA015T
The following 4 figures (fig. 12, 13, 14, 15) show
the available connection diagrams as for as
ADPCM encoding function. As shown in the figures some configuration is not available in SO28
package.
Figure13. Input fromADC, Output from I2C +
IRQ
2
I
C
DATA_REQ
MCU
SDI_ADC
ADC
SLAVE
LRCKT
SCKT
STA015
SO28
TQFP44
LFBGA64
SDO
DAC
OCLK
Figure 12. Input from BITSTREAM,Outputfrom
I2C
SDI
SCKR
DATA_REQ
MCUDAC
BIT_EN
2
C
I
Figure 14.
Input from BITSTREAM,Outputfrom
STA015
SO28
TQFP44
LFBGA64
LRCKT
SCKT
SDO
OCLK
D99AU1121A
GPSO
GPSO_DATA
GPSO_SCKR
GPSO_REQ
MCUDACSTA015
Figure 15.
SDI
SCKR
DATA_REQ
BIT_EN
I2C
TQFP44
LFBGA64
Input from ADC, Output from GPSO
LRCKT
SCKT
SDO
OCLK
D99AU1122A
2
I
MCU
ADC
MASTER
C
DATA_REQ
LRCK_ADC
SCK_ADC
SDI_ADC
STA015
SO28
TQFP44
LFBGA64
LRCKT
SCKT
SDO
OCLK
DAC
D99AU1123A
3-I2C BUS SPECIFICATION
2
The STA015 supports the I
C protocol. This protocoldefines any device that sends data on to the
bus as a transmitter and any device that reads
the data as a receiver. The device that controls
the data transfer is known as the master and the
others as the slave. The master always starts the
transfer and provides the serial clock for synchronisation. The STA015 is always a slave device in
all its communications.
12/44
GPSO_DATA
MCU
ADC
MASTER
GPSO_SCKR
GPSO_REQ
LRCK_ADC
SCK_ADC
SDI_ADC
STA015
TQFP44
LFBGA64
LRCKT
SCKT
SDO
OCLK
DAC
D99AU1124A
3. 1 - COMMUNICATION PROTOCOL
3.1.0 - Datatransition or change
Data changes on the SDA line must only occur
when the SCL clock is low. SDA transition while
the clock is high are used to identify START or
STOP condition.
3.1.1 - Start condition
START is identified by a high to low transition of
the data bus SDA signal while the clock signal
SCL is stable in the high state.
A START condition must precede any command
fordata transfer.
STA015-STA015B-STA015T
3.1.2 - Stopcondition
STOP is identified by low to high transition of the
data bus SDA signal while the clocksignal SCL is
stable in the high state. A STOP condition terminates communications between STA015 and the
busmaster.
3.1.3 - Acknowledgebit
An acknowledgebit is used to indicate a successful data transfer. The bus transmitter, either master or slave, releases the SDA bus after sending
8 bit of data.
During the 9th clock pulse the receiver pulls the
SDA bus low to acknowledge the receipt of 8 bits
of data.
3.1.4 - Datainput
During the data input the STA015 samples the
SDA signalon the rising edgeof the clock SCL.
For correct device operation the SDA signal has
to be stable during the rising edge of the clock
and the data can changeonly when the SCL line
is low.
3.2 - DEVICEADDRESSING
To start communication between the master and
the STA015, the master must initiate with a start
condition. Following this, the master sends onto
the SDA line 8 bits (MSB first) corresponding to
the device select address and read or write
mode.
Figure16. Write Mode Sequence
The 7 most significant bits are the deviceaddress
identifier, corresponding to the I
2
C bus definition.
For the STA015 these are fixed as 1000011.
The 8th bit (LSB) is the read or write operation
RW, this bit is set to 1 in read mode and 0 for
write mode. After a START condition the STA015
identifies on the bus the device address and, if a
match is found, it acknowledges the identification
on SDA bus duringthe 9th bit time. The following
byte after the device identification byte is the internalspace address.
3.3 - WRITE OPERATION(see fig. 16)
Following a START condition the master sends a
deviceselectcode with the RW bit set to 0.
The STA015 acknowledges this and waits for the
byte of internaladdress.
After receiving the internal bytes address the
STA015againrespondswith an acknowledge.
3.3.1 - Bytewrite
In thebyte write mode the master sends one data
byte, this is acknowledged by STA015. The master then terminates the transfer by generating a
STOP condition.
3.3.2 - Multibytewrite
The multibyte write mode can start from any internal address. The transfer is terminated by the
mastergenerating a STOPcondition.
BYTE
WRITE
MULTIBYTE
WRITE
START
STARTRW
DEV-ADDR
DEV-ADDR
Figure17. Read Mode Sequence
ACK
CURRENT
ADDRESS
READ
RANDOM
ADDRESS
READ
SEQUENTIAL
CURRENT
READ
SEQUENTIAL
RANDOM
READ
DEV-ADDR
START
DEV-ADDR
STARTRW
START
STARTRW
DEV-ADDR
DEV-ADDR
RW=
HIGH
DATA
RW
ACK
SUB-ADDR
ACK
DATA
ACK
SUB-ADDR
ACK
RW
ACK
NO ACK
ACK
STARTRW
ACK
ACK
STARTRW
SUB-ADDR
SUB-ADDR
STOP
DATA
DEV-ADDR
DEV-ADDR
ACK
ACK
ACK
ACK
ACK
DATA IN
DATA IN
DATA
DATA
DATA
ACK
ACK
STOP
NO ACK
NO ACK
ACK
D98AU825B
STOP
STOP
DATA
DATA IN
ACK
ACKNO ACK
D98AU826A
STOP
DATA
STOP
13/44
STA015-STA015B-STA015T
3.4 - READOPERATION (see Fig. 17)
3.4.1 - Currentbyte address read
The STA015 has an internal byte address
counter. Each time a byte is written or read, this
counteris incremented.
For the current byte address read mode, following a START condition the master sends the deviceaddresswith the RW bit set to 1.
The STA015 acknowledges this and outputs the
byte addressed by the internal byte address
counter. The master does not acknowledge the
received byte, but terminates the transfer with a
STOPcondition.
3.4.2 - Sequential address read
This mode can be initiated with either a current
address read or a random address read. However in this case the master does acknowledge
the data byteoutputand the STA015 continues to
outputthe nextbyte in sequence.
To terminate the streams of bytes the master
does not acknowledge the last received byte, but
2
I
C REGISTERS
terminatesthe transfer with a STOP condition.
The output data stream is from consecutive byte
addresses,with the internal byte address counter
automaticallyincrementedafter one byte output.
2
C REGISTERS
4- I
The following table gives a description of the
MPEGSource Decoder (STA015)register list.
The first column (HEX_COD) is the hexadecimal
code for the sub-address.
The second column (DEC_COD) is the decimal
code.
The third column (DESCRIPTION) is the description of theinformationcontainedin the register.
The fourth column (RESET) inidicate the reset
value if any. When no reset value is specifyed,
the defaultis ”undefined”.
The fifth column (R/W) is the flag to distinguish
register ”read only” and ”read and write”, and the
useful size of the register itself.
Each register is 8 bit wide. The master shall operate reading or writing on 8 bits only.