STw5098 is a dual low power asynchronous
stereo audio CODEC device with headphones
amplifiers for high quality audio listening and
recording.
Two I2S/PCM digital interfaces are available, one
per master for example Bluetooth and Application
Processor, enabling concurrent audio and voice
flow between Network and user.
The STw5098 control registers are accessible
through a selectable I
compatible interface.
2
C-bus compatible or SPI
Applications
■ Digital cellular telephones with application
processor such as mp3 or gaming and
Bluetooth concurrent application
●Dual 20 bit audio resolution, 8kHz to 96kHz independent rate ADC and DAC
●Dual I
●Sustain complex voice and audio flow with or without mixing
●Two I
●Asynchronous sampling ADC and DAC that do not require oversampled clock and
●Wide master clock range from 4MHz to 32MHz
●Two stereo headphones drivers, hand free loudspeaker driver, line out drivers
●Mixable analog line inputs
●Voice filters: 8/16kHz with voice channel filters
●Automatic gain control for microphone and line-in inputs
●Four programmable master/slave serial audio data interfaces: I
●Frequency programmable clock outputs
●Multibit Σ∆ modulators with data weighted averaging ADC and DAC
●Four DSP functions for bass-treble-volume control, mute, mono/stereo selection, voice
●93 dB dynamic range ADC, 0.001% THD with full scale with full scale output @ 2.7V
●95 dB dynamic range DAC, 0.02% THD performance @ 2.7V over 16Ω load
2
S/PCM digital interfaces for dual master
2
C/SPI compatible independent control interfaces
information on the audio data sampling frequency (fs). Jitter tolerant fs
2
S, SPI, PCM
compatible and other formats
channel filters, de-emphasis filter and dynamic compression
Analog inputs
●Selectable stereo differential or single-ended microphone amplifier inputs with 51dB
range programmable gain
●2 microphone biasing output
●Microphone plug-in and push-button detection input
●Selectable stereo differential or single-ended line inputs with 38dB range
programmable gain
Analog output drivers
●2 Stereo headphones outputs. driving capability: 40mW (0.1% THD) over 16Ω with
40dB range programmable gain
●Common mode voltage headphones driver (phantom ground)
●1 Balanced loudspeaker output with driving capability up to 500mW (V
THD) over 8Ω with 30dB range programmable gain
●1 Balanced earphone output with driving capability up to 125mW
●Transient suppression filter during power up and power down
●Balanced/unbalanced stereo line outputs with 1 kΩ driving capability
CCLS
>3.5V; 1%
8/85
STw5098Pinout
2 Pinout
Figure 1.Pin assignment
1234567891011
GND
1SCLK
1AD_OCK
2SDA/SDIN
1DA_OCK
1AD_CK2AS/CSB2AD_DATA
2AD_SYNC
1DA_SYNC
1DA_DATA
A
2SCLK
2AD_OCK
1CMOD
2DA_OCK
2DA_CK
AMCK
VCC2DA_SYNC
2DA_DATA2HDET
GND
B
VCCA
1HDET
VCCA
2CMOD
1SDA/SDIN2AD_CK
1AD_DATA
1AD_SYNC
2IRQ
2MBIAS
1MBIAS
C
1MICLN1AUX1L2AUX1L
VCC
VCCIO
1DA_CK
1AS/CSB
1IRQ
VCCA2AUX1R
1AUX1R
D
1MICLP
2MICLN1AUX3L2AUX3L
2CAPLINEIN2AUX3R
1MICRN2MICRN
E
2CAPMIC
1CAPMICGNDA
2MICLP
1CAPLINEIN2MICRP
1MICRP1AUX3R
F
1AUX2LN2LINEINL2AUX2LN
1LINEINL
1AUX2RPGNDA
2AUX2RN1AUX2RN
G
1AUX2LP2AUX2LP
2OLN
GNDCM
1EARPS
1EARP
VCCP
1HPR
2ORN
2LINEINR
2AUX2RP
H
1OLN
1OLP
2OLP
2HPL
1VCMHP
1CAPEAR
1EARN
VCCLS
2ORP
1ORN
1LINEINR
J
GNDCM VCCP
1HPL
2VCMHPSVCCLS
GNDP
GNDP
1EARNS
VCCLS
1ORP
GNDP
K
VCCP
GNDP1VCMHPS
2VCMHP
2LSPS2LSP
2CAPLS
2LSN
2LSNS
VCCP2HPR
L
9/85
PinoutSTw5098
Table 1.STw5098 pin description
PositionTypePin nameDescription
A1PGNDGround pin for the digital section
A2DI1SCLKControl interface serial clock input
A3DO1AD_OCKOversampled clock out from AD clock generator
2
A4DIOD2SDA/SDIN
Control interface serial data input-output in I
interface serial data input in SPI mode (SDIN).
A5DO1DA_OCKOversampled clock out from DA clock generator
A6DIO1AD_CKSerial data clock for stereo A/D converter
2
C mode (AS).
A7DI2AS/CSB
Control interface address select in I
Interface enable signal in SPI mode (CSB).
A8DO2AD_DATASerial data out for stereo A/D converter
A9DIO2AD_SYNCFrame sync for stereo A/D converter
A10DIO1DA_SYNCFrame sync for stereo D/A converter
A11DI1DA_DATASerial data In for stereo D/A converter
B1AI2HDET
Headset detection input
(microphone plug-in and push-button detection)
C mode (SDA), control
B2DI2SCLKControl interface serial clock input
B3DO2AD_OCKOversampled clock out from AD clock generator
B4DI1CMODControl interface type selector I
2
C-bus mode or SPI mode
B5DO2DA_OCKOversampled clock out from DA clock generator
B6DIO2DA_CKSerial data clock for stereo D/A converter
Master clock input. Accepted range 4 MHz to 32 MHz.
B7DI
AI
B8PVCC
AMCK
AMCK is a digital square wave
AMCK is an analog sinewave (
Section 10.2 on page 62
Power supply pin for the digital section.
Operating range: from 1.71 V to 2.7 V
B9DIO2DA_SYNCFrame sync for stereo D/A converter
B10DI2DA_DATASerial data in for stereo D/A converter
B11PGNDGround pin for the digital section
Power supply pin for the analog section.
C1PVCCA
Standard operating range: from 2.7V to 3.3V
Low voltage (LV) range: from 2.4V to 2.7V
C2AI1HDET
Headset detection input
(microphone plug-in and push-button detection)
Power supply pin for the analog section.
C3PVCCA
Standard operating range: from 2.7V to 3.3V
Low voltage (LV) range: from 2.4V to 2.7V
C4DI2CMODControl interface type selector I
2
C-bus mode or SPI mode.
)
10/85
STw5098Pinout
Table 1.STw5098 pin description
PositionTypePin nameDescription
2
C5DIOD1SDA/SDIN
Control interfac e s erial da ta i npu t-ou tpu t in I
interface serial data input in SPI mode (SDIN).
C6DIO2AD_CKSerial data clock for stereo A/D conver ter
C7DO1AD_DATASerial data out for stereo A/D converter
C8DIO1AD_SYNCFrame sync for stereo A/D converter
C9DO2IRQProgrammable interrupt output. Active low signal.
C10AO2MBIASMicrophone biasing pin. Fixed voltage reference
C11AO1MBIASMicrophone biasing pin. Fixed voltage reference
D1AI2AUX1LLeft and right channel single ended pins for microphone or line input
D2AI1AUX1LLeft and right channel single ended pins for microphone or line input
D3AI1MICLNLeft and right channel differential pins for microphone input
D4PVCC
D5PVCCIO
Power supply pin for the digital section.
Operating range: from 1.71V to 2.7V
Power supply pin for the digital I ⁄ O buffers.
Operating ranges: from 1.2V to 1.8V and from 1.71V to V
D6DIO1DA_CKSerial data clock for stereo D/A converter
2
C mode (AS)
D7DI1AS/CSB
Control interface address select in I
Interface enable signal in SPI mode (CSB)
C mode (SDA). Control
CC
D8DO1IRQProgrammable interrupt output. Active low signal.
Power supply pin for the analog section.
D9PVCCA
Standard operating range: from 2.7V to 3.3V
Low voltage (LV) range: from 2.4V to 2.7V
D10AI1AUX1RLeft and right channel single ended pins for microphone or line input
D11AI2AUX1RLeft and right channel single ended pins for microphone or line input
E1AI2AUX3LLeft and right channel single ended pins for microphone or line input
E2AI1AUX3LLeft and right channel single ended pins for microphone or line input
E3AI1MICLPLeft and right channel differential pins for microphone input
E4AI2MICLNLeft and right channel differential pins for microphone input
E8AI2CAPLINEINA capacitor must be connected between CAPLINEIN and ground
E9AI1MICRNLeft and right channel differential pins for microphone input
E10AI2AUX3RLeft and right channel single ended pins for microphone or line input
E11AI2MICRNLeft and right channel differential pins for microphone input
F1AI2CAPMICA capacitor must be connected between CAPMIC and ground.
F2AI1CAPMICA capacitor must be connected between CAPMIC and ground
F3PGNDAGround pin for the analog section
F4AI2MICLPLeft and right channel differential pins for microphone input
11/85
PinoutSTw5098
Table 1.STw5098 pin description
PositionTypePin nameDescription
F8AI1CAPLINEINA capacitor must be connected between CAPLINEIN and ground
F9AI1MICRPLeft and right channel differential pins for microphone input
F10AI1AUX3RLeft and right channel single ended pins for microphone or line input
F11AI2MICRPLeft and right channel differential pins for microphone input
G1AI1AUX2LNLeft and right channel differential pins for microphone or line input
G2AI2AUX2LNLeft and right channel differential pins for microphone or line input
G3AI1LINEINLLeft and right channel single ended pins for line input
G4AI2LINEINLLeft and right channel single ended pins for line input
G8PGNDAGround pin for the analog section
G9AI1AUX2RPLeft and right channel differential pins for microphone or line input.
G10AI1AUX2RNLeft and right channel differential pins for microphone or line input
G11AI2AUX2RNLeft and right channel differential pins for microphone or line input
H1AI1AUX2LPLeft and right channel differential pins for microphone or line input
H2AI2AUX2LPLeft and right channel differential pins for microphone or line input
Audio differential line out amplifier for left and right channels. This
H3AO2OLN
H4PGNDCM
H5AO1EARPS
H6AO1EARP
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Ground pin for analog reference.
GNDCM can be connected to GNDA
EARPS, EARNS (sense) pins must be connected on the application
board to EARP, EARN pins respectively. The connection must be as
close as possible to the pins.
Analog differenti al lou ds pea ker amplifier output for left channel or
right channel or the sum of both. This output can drive 50nF (with
series resistor) or directly an earp iece transd uctor from 8 Ω. to 32Ω.
Can deliver from 500mW to 125mW.
H7PVCCP
H8AO1HPR
H9AO2ORN
H10AI2LINEINRLeft and right channel single ended pins for line input
H11AI2AUX2RPLeft and right channel differential pins for microphone or line input
J1AO1OLN
12/85
Power supply pin for the left and right output drivers (headphones
and line-out). Operating range: from V
Audio single ended headphones amplifier outputs for left and right
channels. The outputs can drive 50nF (with series resistor) or
directly an earpiece transductor of 16Ω.
Audio differential line out amplifier for left and right channels. This
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Audio differential line out amplifier for left and right channels. This
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
CCA
to 3.3V
STw5098Pinout
Table 1.STw5098 pin description
PositionTypePin nameDescription
Audio differential line out amplifier for left and right channels. This
J2AO1OLP
J3AO2OLP
J4AO2HPL
J5AO1VCMHP
J6AI1CAPEARA capacitor can be connected between this node and ground
J7AO1EARN
J8PVCCLS
J9AO2ORP
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Audio differential line out amplifier for left and right channels. This
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Audio single ended headphones amplifier outputs for left and right
channels. The outputs can drive 50nF (with series resistor) or
directly an earpiece transductor of 16Ω.
Common mode voltage headphones output. The negative pins of
headphones left and right speakers can be connected to this pin to
avoid decoupling capacitors.
Analog differenti al lou ds pea ker amplifier output for Left channel or
Right channel or the sum of both. This output can drive 50nF (with
series resistor) or directly an earp iece transd uctor from 8 Ω to 32Ω.;
It can deliver from 500mW to 125mW.
Power supply pin for the mono differential output driver. Operating
range: from V
CCA
to 5.5V
Audio differential line out amplifier for left and right channels. This
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Audio differential line out amplifier for left and right channels. This
J10AO1ORN
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
J11AI1LINEINRLeft and right channel single ended pins for line input
K1PGNDCM
Ground pin for analog reference.
GNDCM can be connected to GNDA
Power supply pins for the left and right output drivers (headphones
K2PVCCP
and line-out).
Operating range: from V
CCA
to 3.3V
Audio single ended headphones amplifier outputs for left and right
K3AO1HPL
channels. The outputs can drive 50nF (with series resistor) or
directly an earpiece transductor of 16Ω.
VCMHPS (sense) pin m ust b e con necte d on t he app licat ion bo ard to
K4AO2VCMHPS
VCMHP pin. The connection must be as close as possible to the
pins.
K5PVCCLS
K6PGNDP
K7PGNDP
Power supply pin for the mono differential output driver. Operating
range: from V
CCA
to 5.5V
Ground pin for the left, right and mono-differential output drivers.
GNDP and GNDA must be connected together.
Ground pin for the left, right and mono-differential output drivers.
GNDP and GNDA must be connected together.
13/85
PinoutSTw5098
Table 1.STw5098 pin description
PositionTypePin nameDescription
EARPS, EARNS (sense) pins must be connected on the application
K8AO1EARNS
board to EARP, EARN pins respectively. The connection must be as
close as possible to the pins.
K9PVCCLS
K10AO1ORP
K11PGNDP
L1PVCCP
L2PGNDP
L3AO1VCMHPS
L4AO2VCMHP
L5AO2LSPS
L6AO2LSP
Power supply pins for the mono differential output driver. Operating
range: from V
CCA
to 5.5V
Audio differential line out amplifier for left and right channels. This
outputs can drive up to 1kΩ resistive load. Can be used as single
ended output.
Ground pin for the left, right and mono-differential output drivers.
GNDP and GNDA must be connected together.
Power supply pin for the left and right output drivers (headphones
and line-out).
Operating range: from V
CCA
to 3.3V
Ground pin for the left, right and mono-differential output drivers.
GNDP and GNDA must be connected together.
VCMHPS (sense) pin m ust b e con necte d on t he app licat ion bo ard to
VCMHP pin. The connection must be as close as possible to the
pins.
Common mode voltage headphones output. The negative pins of
headphones left and right speakers can be connected to this pin to
avoid decoupling capacitors.
LSPS, LSNS (sense) pins must be connected on the application
board to LSP, LSN pins respectively. The connection must be as
close as possible to the pins.
Analog differenti al lou ds pea ker amplifier output for Left channel or
Right channel or the sum of both. This output can drive 50nF (with
series resistor) o r directly an earpiece transductor of 8Ω.; It can
deliver up to 500mW.
L7AI2CAPLSA capacitor can be connected between this node and ground
Analog differenti al lou ds pea ker amplifier output for Left channel or
L8AO2LSN
Right channel or the sum of both. This output can drive 50nF (with
series resistor) or direct ly an e arpiece tr an sductor of 8Ω. Can deliver
up to 500mW.
LSPS, LSNS (sense) pins must be connected on the application
L9AO2LSNS
board to LSP, LSN pins respectively. The connection must be as
close as possible to the pins.
L10PVCCP
Power supply pin for the left and right output drivers (headphones
and line-out). Operating range: from V
CCA
to 3.3V
Audio single ended headphones amplifier outputs for left and right
L11AO2HPR
channels. The outputs can drive 50nF (with series resistor) or
directly an earpiece transductor of 16Ω.
14/85
STw5098Pinout
Type definitions
AI-Analog input
AO-Analog output
AIO -Analog input output
DI-Digital input
DO-Digital output
DIO-Digital input output
DIOD-Digital input output open drain
P-Pow er supply or ground
15/85
Block diagramSTw5098
3 Block diagram
Figure 2.STw5098 block diagram
2CAPLINEIN
2CAPMIC
2LINEINL
2LINEINR
2AUX3R
2AUX3L
2AUX2NR
2AUX2PR
2AUX2NL
2AUX2PL
2AUX1R
2AUX1L
2MICRN
2MICRP
2MICLN
2MICLP
Diff.
Stereo
LINEIN
LINSEL2
LINLG2
LINRG2
+18 dB Step 2
:
-20
AGC
(from DSP)
2SCLK
2CMOD2AS/CSB1SCLK2SDA/SDIN1HDET
Control I/F
1AS/CSB
1CMOD
1SDA/SDIN
Diff.
Stereo
Stereo
Sing.E.
AUX1
AUX2
AUX3
MUTE
Amps
LIN L-R
L
R
AGC
(from DSP)
Stereo Path
Registers
Logic
Control
Stereo
Stereo
Sing.E.
Sing.E.
MIC
AUX1
AUX2
AUX3
MUTE
MICSEL2MICLG2
39 dB
÷
Step 1.5
0
PreAmps
MICRG2
MIC L-R
0 dB
÷
MICLA2
Step 1.5
MICRA2
-12
L
R
2MBIAS
2OLP
2OLN
2ORP
2ORN
Mode
Comm.
Left
LineOut
Right
Mic.
Bias
2.1V
Reference
ADMIC2ADLIN2
LineOut
LOG: -18:0 dB Step 3
MICLO2
-40:0 dB Step 2
MIXMIC 2
MIXLIN2
2VCMHP
2VCMHPS
2HPL
HPLG2
Left
Driver
Filter
Suppr.
Transient
RL
2LSPS
2LSP
2CAPLS
2LSN
2HPR
Right
Driver
CM
Driver
Filter
Suppr.
Transient
Voltage
Reference
-40:0 dB Step 2
2LSNS
2AD_SYNC
2AD_CK
2AD_DATA
HPRG2
Mono
Driver
LSG2
6 dB Step 2
:
-24
LSSEL2
Audio
Filter
Suppr.
Transient
L
R
(L+R)/2
Rate
Converter
AD Sample
ADC
Σ∆
Digital
2AD_OCK
AD-I/F
Mode
Master
CK Gen/
AGC
(Mic&Lin)
ADMONO
DSP2
ADC
Gain
Digital
ADCHSW
Filter
Audio/Voice
MIXDAC2
Filter
Analog
2DA_OCK
2DA_SYNC
2DA_CK
2DA_DATA
AMCK
PLL
MCK2
Gain
Mixing
Bass
Treble
DA to AD
(Audio Only)
(Audio only)
Gain
Mixing
AD to DA
(sidetone)
Σ∆
DAC
Modulator
Audio
DA-I/F
Mode
Master
CK Gen/
Dyn.Comp.
DACHSW
DAMONO
DAC
Gain
Digital
Filter
Audio/Voice
Rate
Converter
DA Sample
Digital
DA-PLL
Stereo DAC
AD-PLL
DA_SYNC2
Stereo ADC
AD_SYNC2
Headset
Detection
2IRQ
1IRQ2HDET
VCCA
VCCIOGNDVCC
GNDA
GNDCMGNDPVCCLSVCCP
1MICLP
Reset
IRQ
Gen
Power-On
Stereo Path
L
R
AGC
(from DSP)
+18 dB Step 2
:
LIN L-R
Amps
-20
LINLG1
LINRG1
LINSEL1
LINEIN
AUX1
AUX2
AUX3
MUTE
Stereo
Diff.
Stereo
Sing.E.
1MICLN
1AUX1L
1MICRP
1MICRN
1AUX1R
L
AGC
(from DSP)
0 dB
÷
-12
Step 1.5
MICLA1
MICRA1
39 dB
÷
MIC L-R
Step 1.5
0
MICRG1
MICSEL1 MICLG1
MIC
AUX1
AUX2
Stereo
Diff.
Stereo
Sing.E.
1AUX3L
1AUX3R
AUX2NR
1AUX2PL
1AUX2NL
1AUX2PR
STw5098
ADLIN1
R
PreAmps
AUX3
MUTE
Stereo
1LINEINR
2.1V
Mic.
Sing.E.
Comm.
Mode
1MBIAS
1LINEINL
1CAPMIC
1CAPLINEIN
Bandgap
Oscillator
CurrentBias
AD_SYNC1
Stereo ADC
Digital
AD-PLL
ADC
Σ∆
Rate
Converter
AD Sampl e
MIXDAC1
ADMIC1
MIXLIN1
MIXMIC 1
ADCHSW
DSP1
RL
LSSEL1
L
(L+R)/2
R
MICLO1
Reference
Bias
Left
Right
LineOut
LineOut
LOG: -18:0 dB Step 3
1OLP
1OLN
1ORP
1ORN
Voltage
Filter
Suppr.
Reference
Transient
-40:0 dB Step 2
Transient
-40:0 dB Step 2
CM
Left
Driver
Driver
HPLG1
1HPL
1VCMHP
1VCMHPS
Filter
Filter
6 dB Step 2
Suppr.
Suppr.
:
Transient
LSG1
-24
Driver
Driver
Right
Mono
HPRG1
1HPR
1EARP
1EARN
1EARPS
1CAPEAR
ADMONO
Audio
AD-I/F
1AD_CK
1EARNS
1AD_DATA
1AD_SYNC
Stereo DAC
DAC
Filter
Analog
Gain
Filter
Mixing
AD to DA
(sidetone)
Audio/Voice
ADC
Gain
Digital
Bass
Gain
Mixing
DA to AD
(Audio Only)
AGC
(Mic&Lin)
MCK1
Mode
Master
PLL
CK Gen/
1AD_OCK
AMCK
AMCK
DA_SYNC1
Digital
DA-PLL
Σ∆
Modulator
Rate
Converter
DA Sample
Filter
Audio/Voice
DAC
Gain
Digital
Treble
(Audio only)
DACHSW
DAMONO
Dyn.Comp.
Mode
Master
Audio
CK Gen/
1DA_OCK
DA-I/F
1DA_CK
1DA_DATA
1DA_SYNC
16/85
STw5098Functional description
4 Functional description
4.1 Naming convention
The STw5098 is composed of two identical entities, with their respective set of control
registers.
Regarding the pin labelling, a pin name preceded by 1 refers to entity 1 and a pin name
preceded by 2 refers to entity 2 (ie.g. 1SCLK, 2SCLK). In the following sections, no
distinction is made between the two entities when it is not relevant. Consequently, the 1 and
2 prefixes for entities 1 and 2 respectively are omitted. The same naming convention applies
to the control registers (CRxxx).
4.2 Power supply
STw5098 can have different supply voltages for different blocks, to optimize performance,
power consumption and connectivity. See
The correct sequence to apply supply voltage is to set first (and unset last) the digital I/O
supply (V
individually, if needed. Disconnection does not cause any harm to the device and no extra
current is pulled from any supply during this operation. Moreover if a voltage conflict is
detected, like V
power down and no extra current is pulled from supply.
). The other supply voltages can be set in any order and can be disconnected
CCIO
< VCC (not allowed), simply all blocks connected to V
CCA
Section 9.2 on page 59
for voltage definition.
are set to
CCA
When V
impedance state, while the digital inputs are disconnected to avoid power consumption for
any input voltage value between GND and V
has to be reset (SWRES bit in CR30).
When the analog supply (V
impedance state.
The two sets of control registers are powered by VCC pins (digital supply) so if these pins
are disconnected all the information stored in control registers is lost. When the digital
supply voltage is set, a power-on-reset (POR) circuit sets all the registers content to the
default value and then generates IRQ signals writing 1 in bits PORMSK end POREV in
CR31 and CR32 respectively for both entities.
All supplies must be on during operation.
is set and VCC (digital supply) is not set, all the digital output pins are in high
CCIO
. Before VCC is disconnected the device
CCIO
) is set and VCC is not set, all the analog inputs are in high
CCA
17/85
Functional descriptionSTw5098
4.3 Device programming
STw5098 can be programmed by writing Control Registers with SPI or I2C compatible
control interface (both slave). The interface is always active, there is no need to have the
master clock running to program the device registers. The control interfaces of each entity
can be operated independently either in SPI or I2C modes.
The choice between the two interfaces for each entity is done via their input pins 1CMOD
and 2CMOD (CMOD):
1.CMOD connected to GND: I
The device address is selected with AS pin:
AS/CSB connected to GND:chip address 00110101(35hex) for reading, 00110100 (34hex) for writing
AS/CSB connected to V
:chip address 00110111(37hex) for reading, 00110110 (36hex) for writing
CCIO
When this mode is selected control registers are accessed through pins:
SCLK (clock)
SDA (serial data out/in, open drain)
2. CMOD connected to V
When this mode is selected control registers are accessed through:
AS/CSB (chip select, active low)
SCLK (clock)
SDIN (serial data in)
AD_OCK or DA_OCK or IRQ (serial data out, if selected)
Device Programming: I
page 50
. The interface has an internal counter that keeps the current address of the control
2
C. The I2C Control Interface timing is shown in
register to be read or written. At each write access of the interface the address counter is
loaded with the data of the
increased after each data byte read or write. It is possible to access the interface in 2
modes: single-byte mode in which the address and data of a single register are specified,
and multi-byte mode in which the address of the first register to be written or read is
specified and all the following bytes exchanged are the data of successive registers starting
from the one specified (in multi-byte mode the internal address counter restart from register
0 after the last register 36). Using the multi-byte mode it is possible to write or read all the
registers with a single access to the device on the I
the device.
2
C compatible mode selected
: SPI compatible mode selected
CCIO
register address
field. The value in the address counter is
2
C bus. This applies to both entities of
Section 6.1 on
Device Programming: SPI. The SPI Control Interface timing is shown in section
Section 6.2 on page 51
. Bits SPIOSEL (SPI Output Select) in CR33 control the out pin
selection for serial data out (none, AD_OCK, DA_OCK or IRQ), while bit SPIOHIZ=1 in
CR33 selects the high impedance state of serial data out pin when idle. The first bit sent on
SDIN, after AS/CSB falling edge, sets the interface for writing (SDIN=1) or reading
(SDIN=0), then a 7-bit Control Register address follows.
If the interface is set for writing then the last 8 bits on SDIN are written in the control register.
If the interface is set for reading then after the 7 bit address STw5098 sends out 8 bits data
on the pin selected with bits SPIOSEL in CR33, while bits present at SDIN pin are ignored.
If SPIOSEL=00 (no out pin selected) the reading access on SPI interface can still be useful
to clear the IRQ event bits in CR32.
18/85
STw5098Functional description
4.4 Power up
STw5098 internal blocks can individually be switched on and off according to the user
needs. A general power-up bit is present at bit 7 of CR0. The output drivers should always
be powered up after the general power up. See the following drawing to select the needed
block for the desired function. A fast-settling function is activated to quickly charge external
capacitors when the device is switched on (CAPLS, CAPLINEIN and CAPMIC).
Figure 3.Power up block diagram: example shown for one entity
ENMICL
ENMICR
ENLINL
ENLINR
ENLOL
ENHPL
ENLS
ENHPR
ENHSD
ENMIXL
ENMIXL
MBIAS
ENANA
ENADCL
ENADCR
ENDACL
ENDACR
POWERUP
STw5098
ENADCKGEN
ADMAST ENADOCK
AUDIO I/F
DAMAST ENDAOCK
ENDACKGEN
ENPLL
ENLOR
ENHPVCM
4.5 Master clock
Master clock is applied to both entities. The master clock pin (AMCK) accepts any frequency
from 4 MHz to 32 MHz. The 4-32 MHz range is divided in sub-ranges that have to be
programmed in bits CKRANGE in CR30. The jitter and spectral properties of this clock have
a direct impact on the DAC and ADC performance because it is used to directly or by integer
division drive the continuous-time to sampled-time interfaces.
ENOSC
ENOSC
=0
=1
ENAMCK
ENOSC
19/85
Functional descriptionSTw5098
Note that AMCK clock does not need to have any relation to any other digital or analog input
or output.
AMCK can be either a square wave or a sinewav e, bit AMCKSIN in CR30 selects the proper
input mode. When a sinewave is used as input, AMCK pin must be decoupled with a
capacitor. Specification for sinusoid input can be found in
The AMCK clock is not needed when only analog functions are used. For this purpose an
internal oscillator with no external components can be used to operate the device (see
Section 4.14 on page 25
).
Section 10.2 on page 62
.
4.6 Data rates
STw5098 supports any data rate in 2 ranges: 8 kHz to 48 kHz and 88 kHz to 96 kHz. The
range is selected with bits DA96K and AD96K in CR29 for AD and DA paths respectively.
Note:When AD96K=1 it is required to have DA96K=1.
The rates are fully independent in A/D and D/A paths. Moreover the rates do not have to be
specified to the device and they can change on the fly, within one range, while data is
flowing.
The 2 audio data interfaces (for A/D and D/A) can independently operate in master or slave
modes.
4.7 Clock generators and master mode function
STw5098 provides 4 internal clock generators that can drive, if needed, the audio interfaces
(master mode), and/or two independent master clocks.
The AMCK clock input frequency is internally raised via a PLL on each entity to obtain a
clock (MCK) in the range 32 MHz to 48 MHz. The ratio MCK/AMCK is defined in CR30 (see
MCKCOEFF in
MCK is used to obtain, by fractional division, the oversampled clock (OCK), word clock
(SYNC) and bit clock (CK), that will therefore have edges aligned with MCK (the OCK period
can have jitter of 1 MCK period).
The frequency of OCK, SYNC and CK is set with DAOCKF in CR21/20 for DA interf ace, and
ADOCKF in CR24/23 for AD interface.
The ratio between OCK and SYNC clocks is selected with bit DAOCK512 in CR22 for DA
interface and bit ADOCK512 in CR25 for AD interface. The ratio between CK and SYNC
clocks depends on the selected interface format (see
below). Note that SPI format can only be slave.
The ADOCK and DAOCK output clocks are activated by bits ENADOCK and ENDAOCK
respectively, while master mode generation is activated with two bits: first ADMAST
(DAMAST) sets ADSYNC and ADCK (DASYNC and DACK) pins as outputs, then
ADMASTGEN (DAMASTGEN) generates the SYNC and CK clocks. The logical value at
SYNC and CK pins before data generation depends on the interface selected format.
See description of CR20 to CR25 for further details.
Section 4.7 on page 20
).
Audio digital interfaces
paragraph
20/85
STw5098Functional description
4.8 Audio digital interfaces
Four separate audio data interfaces are provided for AD and DA paths to have maximum
flexibility in communicating with other devices. The 4 interfaces can have different rates and
can work in different formats and modes (i.e an AD interface can be 8 kHz PCM slave while
a DA is 44.1 kHz I
The pins used by the interfaces are:
AD_SYNC, AD_CK and AD_DATA for AD paths word clock, bit clock and data, respectively,
and
DA_SYNC, DA_CK and DA_DATA for DA paths word clock, bit clock and data, respectively.
Data is exchanged with MSB first and left channel data first in all formats. Data word-length
is selected with bits DAWL in CR26 and ADWL in CR27. AD_DATA pin, outside the selected
time slot, is in the impedance condition selected by bit ADHIZ in CR28 in all data formats
except right aligned format.
In the following paragraphs SYNC, CK and DATA will be used when the distinction between
AD and DA is not relevant. When Master Mode is selected (bits DAMAST and ADMAST in
CR22 and CR25 respectively) the SYNC and CK clocks are generated internally . In addition,
an oversampled clock can be generated for each interface (AD_OCK and DA_OCK). The
clock is available in Slave Mode also, if needed.
The AD and DA interfaces can also be used as a single bidirectional interface when they are
configured with the same format (Delayed, DSP, etc.) and AD_SYNC is connected to
DA_SYNC and DA_CK to AD_CK. Master Mode is still available selecting ADMAST or
DAMAST (not both).
2
S master).
The interfaces features are controlled with control registers CR26, CR27 and CR28.
Supported operating formats:
●Delayed format (I
2
I
S compatible (
2
S compatible) (DAFORM or AD FORM =0 00): the A u dio I nterface is
Figure 9 on page 54
). The number of CK periods within one SYNC
period is not relevant, as long as enough CK periods are used to transfer the data and
the maximum frequency limit specified for bit clock is not exceeded. CK can be either a
continuous clock or a sequence of bursts. In master mode there are 32 CK periods per
SYNC period (that means 16 CK periods per channel) when the word length is 16 bit,
while there are 64 CK periods per SYNC period (or 32 CK periods per channel) when
word length is 18bit or higher. Bits ADSYNCP, DASYNCP and ADCKP, DACKP affect
the interface format inverting the polarity of SYNC and CK pins respectively.
●Left alignedformat (DAFORM or ADFORM =001): this format is equivalent to delayed
format without the 1 bit clock delay at the beginning of each frame (
page 54
●Right aligned format (DAFORM or ADFORM =010): this format is equivalent to
).
Figure 9 on
delayed format, except that the audio data is right aligned and that the number of CK
periods is fixed to 64 for each SYNC period (
●DSP format (DAFORM or ADFORM =011) in this format the audio interface starting
Figure 9 on page 54
).
from a frame sync pulse on SYNC receives (DA) or sends (AD) the left and right data
one after the other (
Figure 10 on page 55
). The number of CK periods within one
SYNC period is not relevant, as long as enough CK periods are used to transfer the
data and the maximum frequency limit specified for bit clock is not exceeded. CK can
be either a continuous clock or a sequence of bursts. In Master Mode there are 32 CK
periods per SYNC period when the word length is 16 bit, while there are 64 CK periods
per SYNC period when word length is 18bit or higher. Bit CKP (ADCKP and DACKP)
21/85
Functional descriptionSTw5098
affects the interface format inverting the polarity of CK pin. Bit SYNCP (ADSYNCP and
DASYNCP) switches between delayed (SYNCP=0) and non delayed (SYNCP=1)
formats.
DSP format is suited to interface with a multi-channel serial port.
●SPI format (DAFORM or ADFORM =100) in this format left and right data is received
with separate data burst. Every burst is identified with a low level on SYNC signal
(
Figure 10 on page 55
). There is no timing difference between the left and right data
burst: the two channels are identified by the startup order: the first burst after AD path
or DA path power-up identifies the left channel data, the second one is the Right
channel data, then left and right data repeat one after the other. CK must have 16
periods per channel in case of 16 bit data word and 32 periods per channel in case of
18 bit to 32 bit data word.
The SPI interface can be configured as a single-channel (mono) interface with bit SPIM
(ADSPIM and DASPIM). The mono interface always exchanges the left channel
sample.
SPI-format can only be slave: if Master Mode is selected the CK and SYNC pins are set
to 0. Bit CKP (ADC K P an d DACKP) affects the inte r face format inverting the polarit y of
CK pin.
●PCM format (DAFORM or ADFORM =111): this format is monophonic, as it can only
receive (DA) and transmit (AD) single channel data (
Figure 10 on page 55
). It is mainly
used when voice filters are selected. If audio filters are used then the same sample is
sent from DA-PCM interface to both channel of DA path, and the left channel sample
from AD path is sent to AD-PCM interface. If in the AD path the right channel has to be
sent to the PCM interface then the following must be set: ADRTOL=1 (CR27) and
ENADCR=0 (CR1). In Master Mode the number of CK periods per SYNC period is
between 16 and 512 (see DAPCMF in CR22 and ADPCMF in CR25
page 20
for details). Bit CKP (ADCKP and DACKP) affects the interface format
Section 4.7 on
inverting the polarity of CK pin. Bit SYNCP (ADSYNCP and DASYNCP) switches
between delayed (SYNCP=0) and non delayed (SYNCP=1) formats.
4.9 Analog inputs
Each entity of the STw5098 has a stereo Microphone preamplifier and a stereo Line In
amplifier, with inputs selectable among 5: MIC (for Microphone preamplifiers only), LINEIN
(for Line In amplifiers only) and 3 different AUX inputs (for Microphone and Line In
amplifiers). The AUX inputs can be used simultaneously for Line In amplifiers and
Microphone preamplifi er s.
The following description is for one entity, it is similar for the other entity.
●Microphone preamplifier: it has a very low noise input, specifically designed for low
amplitude signals. For this reason the preamplifier has a high input gain (up to 39 dB)
keeping a constant 50 kΩ input impedance for the whole gain range. However it can
also be used as line in preamplifier because it can accept a high dynamic input signal
(up to 4 V
the S/N ratio when the preamplifier output range is below full scale (volume
control).The gain and attenuation controls are separate for left and right channel (CR3
and CR4 respectively). The Preamplifier input is selected with bits MICSEL in CR18,
and it is disconnected when MICMUTE=1. If a single ended input is selected then the
preamplifier uses the selected pin as the positive input and connects the negative input
(for both left and right channels) to CAPMIC pin, which has to be connected through a
capacitor to a low noise ground (typically the same reference ground of the input).
22/85
). There are two separate gain and attenuation stages in order to improve
pp
STw5098Functional description
Each stereo M icrophone preampli fier is powered up with bits ENMIC L and ENMICR in
CR1.
●Line In amplifier: each line in amplifier is designed for high level input signal. The input
gain is in the range -20 dB up to 18 dB. The Line In amplifier input is selected with bits
LINSEL in CR18, and it is disconnected when LINMUTE=1. If a single ended input is
selected then the amplifier uses the selected pin as the positive input and connects the
negative input (for both left and right channels) to CAPLINEIN pin, which has to be
connected through a capacitor to a low noise ground (typically the same reference
ground of the input).
The stereo Line In amplifier is powered up with bits ENLINL and ENLINR in CR1.
4.10 Analog output drivers
Each entity of the STw5098 provides 3 different analog signal outputs and 1 common mode
reference output. The description here below is for one entity. V
for both entities.
●Line out drivers: it is a stereo differential output, it can be used as single-ended output
just by using the positive or negative pin. It can drive 1 kΩ resistive load. The load can
be connected between the positive and negative pins or between one pin and ground
through a decoupling capacitor. The output gain is regulated with LOG bits in CR7, in
the range 0 to -18 dB, simultaneously for left and right channels. When used as a single
ended output the effective gain is 6 dB lower. It is muted with bit MUTELO in CR19. The
input signal of this stereo output can come from the analog mixer or directly from MIC
preamplifiers. The output Common Mode Voltage level is controlled with bits VCML in
CR19. The supply voltage of line ou t dr ivers is V
CCP
.
The line out drivers are powered up with bits ENLOL and ENLOR in CR1. The output
pins are in high impedance state with a 180kΩ pull-down resistor when the line out
drivers are powered down.
●Headphones drivers: it is a stereo single ended output. It can drive 16 ohm resistive
load and deliver up to 40 mW . The output gain is regulated with HPLG and HPRG bits
in CR8 and CR9 respectively, with a range of -40 to 6 dB. It is muted with bit MUTEHP
in CR19. The input signal of this stereo output comes from the analog mixer.The output
common mode voltage is controlled with bits VCML in CR19. The supply voltage of
headphones dri vers is V
CCP
.
The headphones drivers are powered up with bits ENHPL and ENHPR in CR2.The
output pins are in high impedance state when the headphones drivers are powered
down.
●Common mode voltage driver: it is a single ended output with output voltage value
selectable with bits VCML in CR19, from 1.2 V to 1.65 V in steps of 150 mV . The output
voltage should be set to the value closest to V
/2 to optimize output drivers
CCP
performance. The common mode voltage driver is designed to be connected to the
common pin of stereo headphones, so that decoupling capacitors are not needed at
HPL and HPR outputs. The supply voltage of the common mode voltage driver is
V
.
CCP
The common mode voltage driver is powered up with bit ENHPVCM in CR2.The output
pin is in high impedance state when the common mode voltage driver is powered down.
CCP
and V
are common
CCL
23/85
Functional descriptionSTw5098
●Loudspeaker driver (one entity only): it is a monophonic differential output. It can
drive 8 Ω resistive load and deliver up to 500 mW to the load. The output gain is
regulated with LSG bits in CR7, in the range -24 to +6 dB. The input signal of the
loudspeaker driver comes from the analog mixers: bits LSSEL in CR29 select left
channel, right channel, (L+R)/2 (mono) or mute. The output common mode voltage is
obtained with an internal voltage divider from V
The supply voltage of the loudspeaker driver is V
and it is connected to CAPLS pin.
CCLS
.
CCLS
The loudspeaker driver is powered up with bit ENLS in CR2.The output pin is in high
impedance state when the loudspeaker driver is powered down.
Note:1Together with the LS driver, only a second power output is allowed among:
Ear (1EARP - 1EARN)
Headphones 1 (1HPL and 1HPR)
Headphones 2 (2HPL and 2HPR)
●Earphone driver (one entity only): it is a monophonic differential output. It can drive
32 Ω resistive load and deliver up to 125 mW to the load. The output gain is regulated
with EARG bits in CR7, in the range -24 to +6 dB. The input signal of the loudspeaker
driver comes from the analog mixers: bits EARSEL in CR29 select left channel, right
channel, (L+R)/2 (mono) or mute. The output Common Mode Voltage is obtained with
an internal voltage divider from V
voltage of the loudspeaker driver is V
and it is connected to CAPEAR pin. The supply
CCLS
CCLS
.
The loudspeaker driver is powered up with bit ENEAR in CR2.The output pin is in high
impedance state when the loudspeaker driver is powered down.
Note:Note on direct connection of V
The voltage of batteries of handheld devices during charging is usually below 5.5 V, making
V
supply pin suitable for a direct connection to the battery. In this case if STw5098 is
CCLS
delivering the maximum power to the load and the ambient temperature is above 70 °C then
the simultaneous charging of the battery can overheat the device. A basic protection
scheme is implemented in STw5098 (activated with bit LSLIM in CR19): it limits the
maximum gain of the loudspeaker to -6 dB when V
limit for V
with bits LSG. This event (V
below 4.0 V. The loudspeaker gain is left unchanged if it is set below -6 dB
CCLS
CCLS
an IRQ signal.
4.11 Analog mixers
STw5098 can send to the output drivers the sum of stereo audio signals from 3 different
sources of each entity: DA path (bit MIXDAC in CR17), Microphone Preamplifiers (bit
MIXMIC in CR17) and Line In Amplifiers (bit MIXLIN in CR17). The analog mixers do not
have a gain control on the inputs, therefore the user should reduce the levels of the input
signals within the analog signal range.
The stereo analog mixers are powered up with bits ENMIXL and ENMIXR in CR2.
4.12 AD paths
In each entity the AD path converts audio signals from Microphone Preamplifiers (selected
with bit ADMIC in CR17) and Line In Amplifiers (bit ADLIN in CR17) inputs to digital domain.
If both inputs are selected then the sum of the two is converted. After AD conversion the
audio data is resampled with a sample rate converter and then processed with the internal
DSP. Two different filters are selectable in the DSP (bit ADVOICE in CR29): stereo Audio
to the battery:
CCLS
is above 4.2 V, and it removes the
CCLS
> 4.2 V) can generate, if enabled (bit VLSMSK in CR31),
24/85
STw5098Functional description
Filter, with DC offset removal and FIR image filtering; and a standard mono voice-channel
filter (uses left channel input and feeds both channel output). The AD path includes a digital
gain control (ADCLG, ADCRG in CR12 and CR13 respectively) in the range -57 to +8 dB.
The maximum gain from Mic Preamplifier to AD interface is then 47 dB. When Audio filter is
selected in both AD and DA paths then DA audio data can be summed to AD data and sent
to the AD Audio Interface (see DA2ADG in CR15). Left and right channels can be
independently switched on and off to save power, if needed (bits ENADCL and ENADCR in
CR1)
4.13 DA paths
In each entity the DA path converts digital data from the digital audio interface to analog
domain and feeds it to the analog mixer. Incoming audio data is processed with a DSP
where different filters are selectable (bit DAVOICE in CR29): Audio filter, stereo, with FIR
image filtering, bass and treble controls (bits BASS and TREBLE in CR14), de-emphasis
filter; and a standard voice channel filter, mono (uses left channel input and feeds both
channel output). A dynamic compression function is available for both audio and voice filters
(bit DYNC in CR14). The DA path includes a digital gain control (DACLG, DACRG in CR10
and CR11 respectively) in the range -65 to 0 dB. AD to DA mixing (sidetone) can be
enabled: see CR16 for details. Left and right channel can be independently switched on and
off to save power, if needed (bits ENDACL and ENDACR in CR1).
4.14 Analog-only operations
Each entity from the STw5098 can operate without AMCK master clock if analog-only
functions are used. It is possible to mix Microphone and Line In preamplifiers signals and
listen through headphones, loudspeaker or send them to line-out. The analog-only operation
is enabled with bit ENOSC in CR0. When ENOSC=1 the AD and DA paths cannot be used.
In Analog Mode, each of the two entities can handle two different stereo audio signals, so it
can be used as a front end for an external voice codec that does not include microphone
preamplifiers and power drivers: mic signal is sent through Microphone preamplifiers directly
to line out drivers (Transmit path), while Receive signal is sent through Line In amplifiers to
the selected power drivers.
4.15 Automatic Gain Control (AGC)
STw5098 provides a digital Automatic Gain Control in AD path for each entity. The circuit
can control the input gain at MIC preamplifier, Line In amplifier or both (bits ENAGCMIC and
ENAGCLIN in CR35). When one input is selected, the center gain value used for the input is
fixed with bits MICLG, MICRG, LINLG and LINRG in CR3 to CR6 (like in normal operation),
then the AGC circuit adds to all the gains a value in the range -10.5 dB to +10.5 dB (or,
extended with bit AGCRANGE in CR35, -21 dB to 21 dB), in order to obtain an average level
at the digital interface output in the range -6 dB to -30 dB (selected with bits AGCLEV in
CR35). The AGC added gain acts directly in the input gain, to avoid input saturation and
improve S/N ratio, so it cannot exceed the input gain range. When MIC and Line-In inputs
are selected simultaneously the control is performed on the sum of the two, preserving the
balance fixed with input gains. Different values for Attack and Decay constants can be
selected, depending on the kind of signal the AGC has to control (i.e. voice, music). The
25/85
Functional descriptionSTw5098
Attack and Decay time constants are related to the AD data rate (see bits AGCATT and
AGCDEL in CR34).
4.16 Interrupt request: IRQ pins
On each entity of the STw5098, the interrupt request feature can signal to a control device
the occurrence of particular events on each entity. Two control registers are used to choose
the behavior of IRQ pin: the first is a Status/Event Register (CR32), where bits can
represent the status of an internal function (i.e. a voltage is above or below a threshold) or
an event (i.e. a voltage changed crossing a threshold); the second is a Mask Register
(CR31) where if a bit in the mask is set to 1 then the corresponding bit in the Status/Event
Register can affect IRQ pin status.
On each entity, the IRQ pin is always active low. At V
power up an interrupt request is
CC
generated by the Power-On-Reset circuit that sets to 1 bits PORMSK in CR31 and POREV
in CR32. After this event the PORMSK bit should be cleared by the user and bit IRQCMOS
in CR33 should be set according to the application (open drain or CMOS).
When an IRQ e v ent oc curs a nd SPI con trol interface is selecte d with no serial ou tput pin it i s
still possible to identify the event (and relative status) that generated the interrupt request.
This can be done by setting the IRQ mask/enable bits (in CR31) one at the time (with
successive writings) and reading the IRQ pin status. A simple example of this is the headset
plug-in detection: at first we set bit HSDETMSK=1 in CR31 (with all the other bits set to 0). If
there is an interrupt request then we set HSDETMSK=0 and HSDETEN=1, so we can read
the HSDET status at IRQ pin. Then we read CR32 to clear its content (even if no data is
sent out).
4.17 Headset plug-in and push-button detection
Each entity of the STw5098 can detect the plug-in of a microphone connector and the
press/release event of a call/answer push-button. An application example can be found
below, while specifications can be found in
Figure 4.Plug-in and push-button detection application note
Section 10.4 on page 64
HDET
.
3kΩ
1.5kΩ
Call/Answer Button10µF
From driver
Generic Connector
26/85
VCCA
200nF
200nF
AUX1L
AUX1R
STw5095
CAPMIC
Loading...
+ 59 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.