Figure 5.Processing path, second part: 2.1 output with individually configurable anticlipper/DRCs. 26
Figure 6.Processing path, second part: 2.0 output with B
Figure 7.Processing path, second part: 2.1 output configuration with STCompressor
Figure 8.STCompressor
The STA381BW is an integrated solution embedding digital audio processing, digital
amplification, FFX
the Sound Terminal
TM
power output stage, headphone and 2 Vrms line outputs. It is part of
®
family and provides full digital audio streaming from the source to the
speaker, offering cost effectiveness, low power dissipation and sound enrichment.
The STA381BW input section consists of a flexible digital input serial audio interface,
feeding the digital processing unit, and an analog 1 Vrms input for a seamless connection
with pure analog sources. The serial audio data input interface supports many formats,
including the popular IIS format.
The STA381BW is based on an FFX
technology from STMicroelectronics. FFX
is the evolution of the ST ternary technology:
the advanced processor is available for ternary, binary, binary differential and phase shift
PWM modulation. The STA381BW embeds the ternary, binary and binary differential
implementations, a subset of the full capability of the FFX
TM
processor.
The STA381BW power section consists of four independent half-bridges. These can be
configured via digital control to operate in different modes. A 2.1-channel setup can be
implemented with two half-bridges (L/R) together with a single full-bridge (subwoofer).
Alternatively, the 2.0-channel setup can be done with two full-bridges. When using this
configuration, an external amplifier for the SW channel can also be driven through the PWM
output. The STA381BW is able to deliver 2 x 20 W (ternary) into an 8 Ω load at 18 V or
2 x 9 W (binary) into a 4 Ω load, plus 1 x 20 W (ternary) into an 8 Ω load at 18 V.
The STA381BW also provides a capless headphone out (with embedded negative charge
pump), able to deliver up to 40 mW into a 32 Ω load or, alternatively, can be configured as a
2 Vrms line output.
The STA381BW digital processing unit includes up to 12 programmable biquads (EQs),
allowing perfect sound equalization and offering advanced noise-shaping techniques.
Moreover, the coefficient range ensures a great variety of filter shapes (low/high-pass,
low/high shelf, peak, notch, band-pass). The equalization engine is fully compatible with the
ST speaker compensation technology embedded into the APWorkbench suite. A state-ofthe-art multi-band DRC, STCompressor
protection with full audio quality preservation against sudden sound peaks. Moreover,
STSpeakerSafe
TM
technology offers reliable speaker protection under any condition. The
TM
equalizes the system to provide active speaker
master clock can be from stable BICKI (64xfs, 50% duty cycle) or external XTI.
16/171Doc ID 018835 Rev 7
STA381BWDescription
1.1 Block diagram
Figure 1.Block diagram
Doc ID 018835 Rev 717/171
Pin connectionsSTA381BW
2 Pin connections
2.1 Connection diagram
Figure 2.Pin connections VQFN48 (top view)
SDI
VDDDIG2
GNDDIG2
48
47
TESTMODESASCL
46
45
44
SDA
43
INTLINE
42
PWDN
41
RESET
40
LRCKI
BICKI
39
38
37
VCC_REG
VSS_REG
OUT2B
GND2
VCC2
OUT2A
OUT1B
VCC1
GND1
OUT1A
VDD_REG
GND_REG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
F3XL
F3X_FILT
STA 381BW
15
16
17
F3XR
LINEINL
LINEINR
18
19
LINEHPOUT_L
LINEHPOUT_R
20
GNDA
21
22
VDD3V3
SOFTMUTE
23
CPVSS
24
CPM
36
MCLK
AGNDPLL
35
VREGFILT
34
33
TWARN/FFX4A
32
EAPD/FFX4B
FFX3B
31
30
FFX3A
29
GNDDIG1
28
VDDDIG1
27
VDD3V3CHP
26
CPP
25
GNDPSUB
18/171Doc ID 018835 Rev 7
STA381BWPin connections
2.2 Pin description
Table 2.Pin list
VQFN 48-pinNameTypeDescription
1VCC_REGPOWERVCC reg
2VSS_REGPOWERVss reg, VCC_REG-3.3 V
3OUT2BOUTPUTHalf-bridge 2B output
4GND2POWERHalf-bridge 2A and 2B ground
5VCC2POWERHalf-bridge 2A and 2B supply
6OUT2AOUTPUTHalf-bridge 2A output
7OUT1BOUTPUTHalf-bridge 1B output
8VCC1POWERHalf-bridge 1A and 1B supply
9GND1POWERHalf-bridge 1A and 1B ground
10OUT1AOUTPUTHalf-bridge 1A output
11VDD_REGPOWERVDD reg 3.3 V
12GND_REGPOWERDC reg ground
13F3X_FILTPOWERF3X reference voltage
14F3XLOUTPUTF3X analog out left channel
15F3XROUTPUTF3X analog out right channel
16LINEINLINPUTLine in left channel
17LINEINRINPUTLine in right channel
18LINEHPOUT_LOUTPUTHeadphone/line driver left channel
19LINEHPOUT_ROUTPUTHeadphone/line driver right channel
20GNDAPOWERHeadphone/line driver power ground
21SOFTMUTEINPUTSoft mute
22VDD3V3POWER+3 V LDO power supply
23CPVSSPOWER-3.3 V charge pump pin
24CPMFILTERCHP Cfly negative
25GNDPSUBPOWERCharge pump ground
26CPPFILTERCHP Cfly positive
27VDD3V3CHPPOWERCharge pump power supply
28VDDDIG1POWERI/O ring power supply
29GNDDIG1POWERDigital core ground
30FFX3AOUTPUTDigital PWM line out
31FFX3BOUTPUTDigital PWM line out
Doc ID 018835 Rev 719/171
Pin connectionsSTA381BW
Table 2.Pin list (continued)
VQFN 48-pinNameTypeDescription
32EAPD/FFX4BOUTPUTDigital PWM line out
33TWARN/FFX4AOUTPUTDigital PWM line out
34VREGFILTPOWERDigital VDD from core
35AGNDPLLPOWERPLL analog ground
36MCLKINPUTPLL input clock
37BICKIINPUTIIS serial clock
38LRCKIINPUTIIS left/right clock
39SDIINPUTIIS serial data input
40RESETINPUTReset
Device power-down
41PWDNINPUT
0 = power-down
1 = normal operation
42INTLINEOUTPUTFault interrupt
43SDAI/OIIC serial data
44SCLINPUTIIC serial clock
45SAINPUTIIC select address (pull-down)
46TEST_MODEINPUT
This pin must be connected to
ground (pull-down)
47GNDDIG2POWERDigital I/O ground
48VDDDIG2POWERDigital core LDO supply
20/171Doc ID 018835 Rev 7
STA381BWElectrical specifications
3 Electrical specifications
3.1 Absolute maximum ratings
Table 3.Absolute maximum ratings
SymbolParameterMinTypMaxUnit
VccPower supply voltage (VCCxA, VCCxB)-0.330V
VDD_DIGDigital supply voltage-0.34V
VDD3V3
VDD3V3CHP
TopOperating junction temperature0150°C
TstgStorage temperature-40150°C
R
Line
R
Hp
R
Btl
Charge pump and analog path LDO supply-0.34V
Load impedance - line driver mode1kΩ
Load impedance - headphone driver mode16Ω
Load impedance - power output-BTL mode5Ω
Warning:Stresses beyond those listed in Table 3 above 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” are not implied.
Exposure to absolute-maximum-rated conditions for
extended periods may affect device reliability. In the real
application, power supplies with nominal values rated within
the recommended operating conditions may rise beyond the
maximum operating conditions for a short time when no or
very low current is sunk (amplifier in mute state). In this case
the reliability of the device is guaranteed, provided that the
absolute maximum ratings are not exceeded.
ηPeak efficiency, FFX modePo = 2 x 20 W into 8 Ω90%
1. The related THD can be defined through appropriate DRC settings (see section: 4.3: STCompressorTM)
2. Refer to Figure 3: Test circuit.
Doc ID 018835 Rev 723/171
Electrical specificationsSTA381BW
Figure 3.Test circuit
3.6 Electrical specifications for the analog section
The specifications given in this section are valid for the operating conditions: VCC = 24 V
f=1kHz, T
Table 8.Electrical specifications for the analog section
SymbolParameterConditionsMinTypMaxUnit
VoutOutput voltage for line outG
PoutOutput voltage for HP outTHD+N = 10%, G
DRDynamic range for line out
X-TalkChannel separation for line outV
PSRRPower supply rejection ratio
Line input resistance30
R
in
THD+N Total harmonic distortion + noise
1. Refer to 8.2: Headphone and 2 Vrms line out, Figure 47: Headphone and line out block diagram, Rin = R1
= 25 °C, VDD3V3 = 3.3 V, R
amb
= 2.5, THD < 1%, Rload = 5 kΩ1.92.1Vrms
v
Vout = 2 V
Vin = 0.8 mV (-60 dBFs)
= 2 Vrms, Gv = 2.575dB
out
HP mode, P
Line out mode, V
HP mode, V
Line out mode, V
= 5 kΩ, R
Line
= 2.5, Rload = 32 Ω40mW
v
, Fin = 200 Hz,
RMS
= 15 mW70dB
0
= 2 Vrms70
Out
= 200 mV
out
Out
RMS
= 0.2 Vrms, Gv = 2.50.03%
= 32 Ω, unless otherwise specified.
Hp
100dB
(1)
, Gv = 2.50.03%
kΩ
24/171Doc ID 018835 Rev 7
STA381BWDevice overview
4 Device overview
The mentioned hyperlink in this section relates to the default New Map Section 6: Register
description: New Map.
4.1 Processing data path
The whole STA381BW processing chain is composed of two consecutive sections. In the
first one dual-channel processing is implemented (Figure 4) and then each channel is fed
into the post-mixing block allowing to generate either a third channel (typically used in 2.1
output configurations together with crossover filters) or to have the channels processed by
the dual-band DRC block (2.0 output configuration with crossover filters used to define the
cutoff frequency of the two bands).
The first section begins with a 2x oversampling FIR filter allowing 2*Fs audio processing.
Then a selectable high-pass filter removes the DC level (enabled if HFB = 0). The channel 1
and 2 processing chain can include up to 8 filters, depending on the selected configuration
(bits BQL, BQ5, BQ6, BQ7 and XO[3:0]). By default, 4 independent filters per channel are
enabled, plus the pre-configured Bass and Treble controls (BQL=0, BQ5=0, BQ6=0,
BQ7=0).
The STA381BW offers the possibility to share the filter coefficients between the two
processing channels. When this option is set (BQL=1), filters from the 1st to the 4th have the
same coeffcients set. Under these conditions, filters from the 5th to 7th can be used as
custom filters as well (provided the relevant BQx bits are set). Once again filter coefficients
are shared between the two processing channels.
Moreover the common 8th filter, from the subsequent processing section, can be available
on both channels (provided the pre-defined crossover frequencies are not used, XO[3:0]=0,
and the dual-band DRC is not used).
Figure 4.Processing path, first part
Sampl i ng Fr equency = 2 xFs
Tone Control
Tone Control
Treble
Or
Biquad#7
Treble
Or
Biquad#7
L
R
I2S Input
Interface
X2Ov er-
-sampl ing
FIR
Sampling Frequency = Fs
X2Ov er-
-sampl ing
FIR
Sampl i ng Fr equency = 2 xFs
Pre-
-scale
Pre-
-scale
Hi-Pas s
Filter
Hi-Pas s
Filter
Biquad#1Biquad#2Biquad#3Biquad
Userd Defi ned Fil ters
Biquad#1Biquad#2Biquad#3Biquad
Userd Defi ned Fil ters
#4
#4
De-emph
Or
Biquad#5
De-emph
Or
Biqua
d#5
Bass
Or
Biquad#6
Bass
Or
Biquad#6
Doc ID 018835 Rev 725/171
Device overviewSTA381BW
The second processing stage embeds a mixing block, a biquadratic/crossover filter, a DRC
stage, the volume control, a DC cut filter and a post scaler. Depending on the device
settings, the following configuration and features are available:
●2.1 output with individually configurable anticlipper/DRCs (Figure 5): two individually
configurable DRC/anticlippers are available while the eighth biquadratic filter, jointly
with the mixer block, can be used to perform LFE. This configuration and features
ensure the backward compatibility with previous Sound Terminal
®
products.
Figure 5.Processing path, second part: 2.1 output with individually configurable
anticlipper/DRCs
L
C1Mx1
+
R
C1Mx2
C2Mx1
+
C2Mx2
C3Mx1
+
C3Mx2
Us er-Defined
Mix Coef ficients
Channel ½
Biquad#8
--------------
Hi-pass XO
Filter
Channel ½
Biquad#8
--------------
Hi-pass XO
Filter
Channel 3
Biquad#8
-- -- -- ---- ----
Low- pass XO
filter
Crossover Frequency
Determined by XO Setting
(User D efined If
XO=0000)
Channel 1
Vol ume
Channel 2
Vol ume
Channel 3
Vol ume
Anti -clipper
/
DRC
Anti -clipper
/
DRC
Anti- clipper
/
DRC
DC Cut
Filter
DC Cut
Filter
DC Cut
Filter
Pos t Scale
Pos t Scale
Pos t Scale
26/171Doc ID 018835 Rev 7
STA381BWDevice overview
●2.0 output with B
2
DRC (Figure 6): the mixer and the eighth biquadratic filter are used to
divide the channel into two sub-bands, then each sub-band is independently processed
by a DRC block. The two bands are then re-composed and fed to the following
processing blocks. The crossover frequency is user-selectable. This configuration and
features ensure the backward compatibility with the previous Sound Terminal
products. For further information please refer to Chapter 6.11.1: Dual-band DRC.
DRC 2
DRC 1
DRC 1
DRC 2
2
DRC
+
DC Cut
Filter
DC Cut
Filter
Post Scale
Post Scale
TM
. When
Figure 6.Processing path, second part: 2.0 output with B
Channel 3
Vol ume
L
R
●2.1 output with STCompressor
C1Mx1
+
C1Mx2
C2Mx1
+
C2Mx2
C3Mx1
+
C3Mx2
User-Def ined
Mix Coef fici ents
B2DRC
Hi-p ass XO
filter
B2DRC
Hi-p ass XO
filter
Crossover Frequency
Determined by XO Setting
(User Defi ned I f
XO=000 0)
TM
-Channel 1
++
+
-
Vol ume
Channel 2
Vol ume
Channel 3
Vol ume
(Figure 7): the STA381BW embeds the latest, stateof-the-art multi-band dynamic, range compressor, called STCompressor
using this configuration, up to 10 biquad filters are available for dedicated processing.
Please refer to Section 4.3: STCompressorTM for further information about this feature.
®
Figure 7.Processing path, second part: 2.1 output configuration with
STCompressor
L
R
TM
C1Mx1
+
C1Mx2
C2Mx1
+
C2Mx2
C3Mx1
+
C3Mx2
User-Defined
Mix Coefficients
Channel ½
Biquad#8
--------------
Hi-p ass XO
Filter
Channel ½
Biquad#8
--------------
Hi-p ass XO
Filter
Channel 3
Biquad#8
--------------
Low-p ass XO
filter
Crossover Frequency
Determined by XO Sett ing
(User Defin ed If
XO=0000)
STCompressor
STCompressor
Vol ume
And
Limit er
Vol ume
And
Limit er
Vol ume
And
Limit er
DC Cut
Filter
DC Cut
Filter
DC Cut
Filter
Post Scale
Post Scale
Post Scale
Doc ID 018835 Rev 727/171
Device overviewSTA381BW
4.2 Input oversampling
Figure 4 shows the input oversampling block in front of the main processing. When 32 kHz
Fs is used, the default x2 oversampling ratio can be increased to a x3.
Activating this feature, it is possible to have a 384 kHz PWM switching frequency (instead of
the default 256 kHz) when 32 kHz Fs is used.
When bit 0 of register PLLCFG1 is set to one, the feature is activated so that the PLL ratio is
modified to generate 49.152 MHz internal clock and the audio data path (after the input
oversampling block) is running at 96 kHz.
It is not recommended to use the x3 oversampling feature when Fs > 32 kHz because of the
PLL maximum frequency constraint.
4.3 STCompressor
The STCompressorTM (STC from now on) is a stereo, dual-band Dynamic Range Control
(DRC) and its main purpose is to provide optimum output power level control for speaker
protection, preserving as much as possible the original audio quality of the signal.
Two m ai n I
data flow control bits, these registers also allow enabling the checksum engine to protect the
STC filters from erroneous coefficients downloads, thus improving the final application
circuitry and safety of the speakers.
2
C registers control the STC behavior: STCCFG0 and STCCFG1. On top of the
TM
28/171Doc ID 018835 Rev 7
STA381BWDevice overview
4.3.1 STC block diagram
Figure 8.STCompressorTM block diagram
DRC 0
Offs et
Band 0
In put
Ch 0
In put
Ch 1
Band
Sp li tter
Band
Sp li tter
(Low freqs)
Band 1
(High freqs)
Band 0
(Low freqs)
Band 1
(High freqs)
Level
Meter
Level
Meter
Level
Meter
Level
Meter
MapperAttenuator
DRC 1
Mapper
DRC 2
Mapper
DRC 3
Mapper
Attenuato r
Offs et
Offs et
Attenua to r
Attenua to r
X
Ou tp ut
Ch 0
+
X
X
Ou tp ut
Ch 1
+
X
Offs et
The STC takes as input 2 channels and every channel is processed independently (i.e. an
independent DRC for each band of each channel) following the steps listed below
(Figure 8):
1.Splits the input signal into 2 bands (band splitter)
2. Measures the level of the signal (level meter)
3. Computes the attenuation (mapper)
4. Applies the attenuation and offset (attenuator)
The band splitter settings are common to both the processing channels while the settings of
the remaining blocks can be independently set for each band of each processing channel.
Caution:All the settings explained hereafter apply only to the behavior of the STCompressor
the settings concerning other device operating configurations (see Chapter 4.1: Processing
data path) please refer to the appropriate paragraphs and registers.
4.3.2 Band splitter
The band splitter block is used to divide the signal into 2 sub-bands (typically low- and highfrequency bands). This is done through two 2
thus allowing to have up to a 4
th
order filter per band. This feature guarantees a totally flat
band recombination (see Figure 9). Using different filtering orders, indeed, causes a nonnegligible gain around the filter’s cutoff frequency, endangering the overall audio fidelity and,
eventually, also the safety of the speaker. The sub-band recombination can be enabled or
disabled.
nd
order biquads (IIR filters) for each band,
TM
. For
Doc ID 018835 Rev 729/171
Device overviewSTA381BW
The band splitter filter coefficients have a user-selectable range [-1, 1), [-2, 2) and [-4, 4).
The RAM coefficient 0x7 is responsible for these settings according to Tab l e 9 . The range
default value is [-4, 4).
Please refer to Section 6.24: User-defined coefficient control registers (addr 0x27 - 0x37)
and to Ta bl e 1 3 for further details.
Figure 9.Band splitter with 4
Band Splitter
Inp ut
Ch x
BQ 0
th
order filtering
BQ 1
Band 0
…
Output
Ch x
+=
BQ 0
BQ 1
Band 1
…
4.3.3 Level meter
The level meter block measures the input signal level (in dB). Two kinds of measures are
performed: peak and RMS. The mapper configuration and the input signal automatically
determine which measurement to take into account.
4.3.4 Mapper
The mapper block computes the appropriate attenuation value (expressed in dB) to be
applied to the signal, basing its calculations on the level meter output value, on the
compressor threshold and on the limiter threshold.The attenuation value is then passed to
the attenuator block.
30/171Doc ID 018835 Rev 7
STA381BWDevice overview
The STC reacts differently depending on these three parameters (Figure 10):
●level meter output value < compressor threshold < limiter threshold: under these
circumstances the signal level is small enough to not require any type of
limiting/compressing action. The signal remains unchanged.
●compressor threshold < level meter output value < limiter threshold: under these
circumstances the signal level is compressed to a ratio determined by the compressor
rate.
●compressor threshold < limiter threshold < level meter output value: under these
circumstances the signal level exceeds the limiter threshold which represents the
maximum output power allowed. The signal is limited to avoid unpredictable effects and
damages.
The compressor threshold, the limiter threshold and the compressor rate are all userselectable parameters. The compressor threshold range of value is [-48, 0] dB with a
0.25 dB step. The limiter threshold range of values is [-24, +12] dB with a 0.25 dB step. The
compressor ratio range of value is [0, 15], the meaning of these values is specified in
Ta bl e 1 0 . For further details please refer to Ta b l e 1 2 . Either setting the compressor rate to
1:1 or setting the compressor threshold greater than the limiter threshold makes the STC
behave as a pure limiter (Figure 11).
Figure 10. STCompressor
[dB]
L.T.
C.T.
OUTPUT
TM
behavior
C.R.
C.T.L.T.L.T. comp
INPUT
Linear Zone
Compression Zone
Limiting Zone
[dB]
Doc ID 018835 Rev 731/171
Device overviewSTA381BW
Figure 11. STCompressorTM behavior as a limiter
Linear Zone
[dB]
L.T.
Limiting Zone
OUTPUT
Table 10.Compressor ratio
Compressor ratioRatio value
01:1
11:1.25
21:1.5
31:1.75
41:2
51:2.5
61:3
71:3.5
81:4
91:4.5
101:5
111:5.5
121.6
L.T.
INPUT
[dB]
131:7
141:8
151:16
32/171Doc ID 018835 Rev 7
STA381BWDevice overview
4.3.5 Attenuator
The attenuation is characterized by two different phases: attack and release.
Given an input signal above the limiter threshold, during the attack phase the STC
decreases the gain in order to reach the output level determined by the mapper. In this
process the key parameter is the attack rate (dB/ms) which determines how fast the STC
reacts according to the following equation:
AttackTime
where:
●Output SignalLevel is the attenuated signal coming from the attenuator block itself and
used as feedback
●Mapper Level is the target signal level to be reached
The attack rate is user-selectable and its range is [0, +16] dB/ms with a 0.25 dB/ms step.
Given an input signal moving below the limiter threshold, during the release phase the STC
increases the gain in order to return the original input signal dynamic. In this process the key
parameter is the release rate (dB/ms) which determines how fast the STC releases the
attenuation on the input signal according to the following equation:
The release rate is user-selectable and its range is [0.0078, 1) dB/ms with a 0.0039 dB/ms
step.
4.3.6 Dynamic attack
Due to its dynamic, the input signal may exceed the limiter threshold by a variable amount of
decibels. In such different situations it might be useful to be able to tune the attack rate to
make the STC react slower or faster depending on the context. The attack rate value, set by
the user, can be dynamically varied through the dynamic attack rate (DAR). It is a parameter
(expressed in ms/dB) acting as a weighted coefficient, multiplying the difference between
the attenuator output signal and the mapper target level. The dynamic attack rate affects the
user-programmed attack rate according to the following equations:
The offset is a user-selectable gain or volume control. When using the STC it is advised to
use the offset to tune the output volume instead of the regular volume controls. The offset is
located before the attenuator block, ensuring that the output power limit (limiter threshold) is
never exceeded (Figure 12). On the other side, the traditional volume control is located after
the STC attenuator, thus a wrong setting of this control could nullify the STC effect.
Each sub-band has its own and independent offset. Its range is [0, +48] dB with a 0.25 dB
step (Ta bl e 1 2 ).
Figure 12. Offset effect
4.3.8 Stereo link
The stereo link feature allows applying the same attenuation to the corresponding band of
each channel (i.e. band 0 left channel and band 0 right or band 1 left channel and band 1
right channel). This should help to prevent image shifting that could occur when individually
compressing each channel and causing a volume mismatch between left and right.
When the stereo link is active, the proper attenuation for each band is independently
computed, then the highest one for each band is applied (Figure 13).
34/171Doc ID 018835 Rev 7
STA381BWDevice overview
Figure 13. Stereo link block diagram
Ch 0 – Band 0
From mapper
Ch 0 – Band 0
From mapper
Ch 0 – Band 1
Ch 0 – Band 1
Ch 1 – Band 0
From mapper
Ch 1 – Band 0
From mapper
Ch 1 – Band 1
Ch 1 – Band 1
Attenuator
Attenuator
Attenuator
Attenuator
4.3.9 Programming of coefficients
The coefficients are expressed in different value ranges and in decimal notation (refer to the
previous paragraphs). In order to be programmed they must be converted into a
[-1, +1) range and in hexadecimal notation (Tab le 1 1). This can be achieved with the
following procedure:
●if CoeffDecValue>0
Attenuator
Max
Atte nuation
Band 0
Attenuator
Attenuator
Max
Atte nuation
Band 1
Attenuator
X
+
Output
Ch 0
X
X
+
Output
Ch 1
X
CoeffI2CValuernd CoeffDecValue 26⁄()223×()=
●if CoeffDecValue<0
24
CoeffI2CValue2
rnd CoeffDecValue 26⁄()223×()–=
where CoeffI2CValue is the final decimal value to be converted into hexadecimal notation
while CoeffDecValue is the coefficient value (in decimal notation) to start from.
Doc ID 018835 Rev 735/171
Device overviewSTA381BW
Table 11.Conversion example
Original value (dec)I2C value (hex)
+48.000x600000
+24.000x300000
+16.000x200000
+12.000x180000
+06.000x0C0000
+02.000x040000
+01.000x020000
-01.000xFE0000
-02.000xFC0000
-06.000xF40000
-12.000xE80000
-24.000xD00000
-48.000xA00000
36/171Doc ID 018835 Rev 7
STA381BWDevice overview
4.3.10 Memory map
All the control parameters listed in the previous paragraphs are stored in the internal device
memory. Please refer to Ta bl e 1 2 and Tab le 1 3 for a complete list of their addresses.
For the programming procedure please refer to Section 6.24: User-defined coefficient
control registers (addr 0x27 - 0x37). Be aware that the read-all operation is not available for
The STA381BW supports the I2C protocol via the input ports SCL and SDA_IN (master to
slave) and the output port SDA_OUT (slave to master). This protocol defines 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 other as the slave.
The master always starts the transfer and provides the serial clock for synchronization. The
STA381BW is always a slave device in all of its communications. It supports up to
400 kb/sec rate (fast-mode bit rate). The STA381BW I
interface works properly only in the case that the master clock generated by the PLL has a
frequency 10 times higher compared to the frequency of the applied SCL signal.
5.1 Communication protocol
5.1.1 Data transition or change
Data changes on the SDA line must only occur when the SCL clock is low. An SDA transition
while the clock is high is used to identify a START or STOP condition.
2
C is a slave-only interface. The I2C
5.1.2 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 for
data transfer.
5.1.3 Stop condition
STOP is identified by a low-to-high transition of the data bus SDA signal while the clock
signal SCL is stable in the high state. A STOP condition terminates communication between
the STA381BW and the bus master.
5.1.4 Data input
During the data input the STA381BW samples the SDA signal on the rising edge of clock
SCL. For correct device operation, the SDA signal must be stable during the rising edge of
the clock and the data can change only when the SCL line is low.
5.2 Device addressing
To start communication between the master and the STA381BW, the master must initiate
with a start condition. Following this, the master sends to the SDA line 8 bits (MSB first)
corresponding to the device select address and read or write mode.
The seven most significant bits are the device address identifiers, corresponding to the I
bus definition. In the STA381BW the I
the SA port configuration, 0x38 when SA = 0, and 0x3A when SA = 1.
2
C interface has two device addresses depending on
2
C
The eighth bit (LSB) identifies read or write operation RW, this bit is set to 1 for read mode
and to 0 for write mode. After a START condition the STA381BW identifies on the bus the
device address and if a match is found, it acknowledges the identification on SDA bus during
Doc ID 018835 Rev 739/171
I2C bus specificationSTA381BW
the 9th bit time. The byte following the device identification byte is the internal space
address.
5.3 Write operation
Following the START condition, the master sends a device select code with the RW bit set
to 0. The STA381BW acknowledges this and then waits for the byte of the internal address.
After receiving the internal byte address the STA381BW again responds with an
acknowledgement.
5.3.1 Byte write
In the byte write mode the master sends one data byte which is acknowledged by the
STA381BW. The master then terminates the transfer by generating a STOP condition.
5.3.2 Multi-byte write
The multi-byte write mode can start from any internal address. The master generating a
STOP condition terminates the transfer.
5.4 Read operation
5.4.1 Current address byte read
Following the START condition, the master sends a device select code with the RW bit set
to 1. The STA381BW acknowledges this and then responds by sending one byte of data.
The master then terminates the transfer by generating a STOP condition.
5.4.2 Current address multi-byte read
The multi-byte read modes can start from any internal address. Sequential data bytes are
read from sequential addresses within the STA381BW. The master acknowledges each
data byte read and then generates a STOP condition, terminating the transfer.
5.4.3 Random address byte read
Following the START condition, the master sends a device select code with the RW bit set
to 0. The STA381BW acknowledges this and then the master writes the internal address
byte. After receiving the internal byte address, the STA381BW again responds with an
acknowledgement. The master then initiates another START condition and sends the device
select code with the RW bit set to 1. The STA381BW acknowledges this and then responds
by sending one byte of data. The master then terminates the transfer by generating a STOP
condition.
5.4.4 Random address multi-byte read
The multi-byte read mode can start from any internal address. Sequential data bytes are
read from sequential addresses within the STA381BW. The master acknowledges each
data byte read and then generates a STOP condition, terminating the transfer.
40/171Doc ID 018835 Rev 7
STA381BWI2C bus specification
5.4.5 Write mode sequence
Figure 14. Write mode sequence
BYTE
BYTE
WRITE
WRITE
MULTIBYTE
MULTIBYTE
WRITE
WRITE
DEV-ADDR
DEV-ADDR
STARTRW
STARTRW
DEV-ADDR
DEV-ADDR
START
START
ACK
ACK
SUB-ADDR
SUB-ADDR
ACK
ACK
SUB-ADDR
SUB-ADDR
RW
RW
ACK
ACK
ACK
ACK
DATA IN
DATA IN
DATA IN
DATA IN
ACK
ACK
ACK
ACK
STOP
STOP
DATA IN
DATA IN
ACK
ACK
STOP
STOP
5.4.6 Read mode sequence
Figure 15. Read mode sequence
CURRENT
CURRENT
ADDRESS
ADDRESS
READ
READ
RANDOM
RANDOM
ADDRESS
ADDRESS
READ
READ
SEQUENTIAL
SEQUENTIAL
CURRENT
CURRENT
READ
READ
SEQUENTIAL
SEQUENTIAL
RANDOM
RANDOM
READ
READ
DEV-ADDR
DEV-ADDR
STARTRW
STARTRW
DEV-ADDR
DEV-ADDR
START
START
START
START
STARTRW
STARTRW
DEV-ADDR
DEV-ADDR
DEV-ADDR
DEV-ADDR
HIGH
HIGH
RW=
RW=
ACK
ACK
ACK
ACK
RW
RW
ACK
ACK
ACK
ACK
DATA
DATA
SUB-ADDR
SUB-ADDR
DATA
DATA
SUB-ADDR
SUB-ADDR
NO ACK
NO ACK
ACK
ACK
ACK
ACK
ACK
ACK
STOP
STOP
DATA
DATA
DEV-ADDR
DEV-ADDR
DEV-ADDR
DEV-ADDR
ACK
ACK
WRTRATS
WRTRATS
ACK
ACK
ACK
ACK
WRTRATS
WRTRATS
DATA
DATA
DATA
DATA
DATA
DATA
NO ACK
NO ACK
NO ACK
NO ACK
ACK
ACK
STOP
STOP
STOP
STOP
ACKNO ACK
ACKNO ACK
DATA
DATA
DATA
DATA
STOP
STOP
Doc ID 018835 Rev 741/171
Register description: New MapSTA381BW
6 Register description: New Map
Mapping of two registers is available on the STA381BW, the selection is done by setting
register 0x7E bit D7. By default, 0x7E is set to 1 and refers to a map that is not compatible
with previous Sound Terminal devices. This register’s mapping is also called “New Map”.
To keep compatibility with previous Sound Terminal devices, 0x7E bit D7 must be set to 0
after device turn-on and after any reset (via SW or via external pin). Please refer to
Section 7: Register description: Sound Terminal compatibility for all the information about
device compatibility.
Missing addresses are to be considered as reserved.
After SRESET is written, the last IC acknowledge is skipped and the EAPD bit (reg 0x16 bit
D7) is set to 1 instead of the 0 default value obtained after hardware reset.
1 channel mono-parallel:
3A → 1A/1B w/ C3BO 45°
3B → 2A/2B w/ C3BO 45°
1A/1B → 3A/3B
2A/2B → 4A/4B
CH3 downmixed on all the PWM channels.
Doc ID 018835 Rev 749/171
No
Register description: New MapSTA381BW
Figure 16. OPER = 00 (default value)
OUT1A
OUT1A
Half
Half
Bridge
Bridge
Channel 1
LPF
LPF
LPF
LPF
Channel 1
Channel 2
Channel 2
LineOut1
LineOut1
LineOut2
LineOut2
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
OUT1B
OUT1B
OUT2A
OUT2A
OUT2B
OUT2B
OUT3A
OUT3A
OUT3B
OUT3B
OUT4A
OUT4A
OUT4B
OUT4B
Figure 17. OPER = 11
Half
Half
Bridge
Bridge
OUT1A
OUT1A
Channel 1
Channel 1
Figure 18. OPER = 10
Bridge
Bridge
Bridge
Bridge
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Half
Half
Half
Half
OUT1A
OUT1A
OUT1B
OUT1B
OUT2A
OUT2A
OUT2B
OUT2B
OUT3A
OUT3A
OUT3B
OUT3B
EAPD
EAPD
OUT1B
OUT1B
OUT2A
OUT2A
OUT2B
OUT2B
Power
Power
Device
Device
Channel 3
Channel 3
Channel 1
Channel 1
Channel 2
Channel 2
Channel 2
Channel 2
Channel 3
Channel 3
50/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Figure 19. OPER = 01
OUT1A
OUT1A
Half
Half
Bridge
Bridge
OUT1B
OUT2B
OUT2B
OUT3A
OUT3A
OUT3B
OUT3B
OUT4A
OUT4A
OUT4B
OUT4B
OUT1B
OUT2A
OUT2A
Channel 1
Channel 1
Channel 2
Channel 2
Channel 3
Channel 3
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
Half
Half
Bridge
Bridge
The STA381BW can be configured to support different output configurations. For each PWM
output channel, a PWM slot is defined. A PWM slot is always 1 / (8 * fs) seconds length. The
PWM slot defines the maximum extension for the PWM rising and falling edge, that is, the
rising edge as well as the falling edge cannot range outside the PWM slot boundaries.
Figure 20. Output mapping scheme
FFX1A
FFX1A
FFX1A
FFX1A
FFX1A
FFX1A
FFX1 B
FFX1 B
FFX1 B
FFX1 B
FFX1 B
FFX1 B
FFX2 A
FFX2 A
FFX2 A
FFX2 A
FFX2 A
FFX2 A
FFX
FFX
FFX
FFX
FFX
FFX
2B
2B
2B
2B
2B
FFX™
FFX™
FFX™
FFX™
FFX™
FFX
mo
mo
mo
mo
mo
mo
dulator
dulator
dulator
dulator
dulator
dulator
TM
2B
FFX3 A
FFX3 A
FFX3 A
FFX3 A
FFX3 A
FFX3 A
FFX3B
FFX3B
FFX3B
FFX3B
FFX3B
FFX3B
FFX4 A
FFX4 A
FFX4 A
FFX4 A
FFX4 A
FFX4 A
FFX 4B
FFX 4B
FFX 4B
FFX 4B
FFX 4B
REMAP
REMAP
REMAP
REMAP
REMAP
REMAP
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2B
OUT2B
OUT2B
OUT2B
OUT2B
OUT2B
OUT3A
OUT3A
OUT3A
OUT3A
OUT3A
OUT3B
OUT3B
OUT3B
OUT3B
OUT3B
OUT4A
OUT4A
OUT4A
OUT4A
OUT4A
OUT4B
OUT4B
OUT4B
OUT4B
OUT4B
Power
Power
Power
Power
Power
Power
Bridg
Bridg
Bridg
Bridg
Bridg
Bridg
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
e
e
e
e
e
e
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2
OUT2
OUT2
OUT2
OUT2
OUT2
B
B
B
B
B
B
Doc ID 018835 Rev 751/171
Register description: New MapSTA381BW
For each configuration the PWM signals from the digital driver are mapped in different ways
to the power stage.
2.0 channels, two full-bridges (OPER = 00)
●FFX1A -> OUT1A
●FFX1B -> OUT1B
●FFX2A -> OUT2A
●FFX2B -> OUT2B
●FFX3A -> OUT3A
●FFX3B -> OUT3B
●FFX4A -> OUT4A
●FFX4B -> OUT4B
●FFX1A/1B configured as ternary
●FFX2A/2B configured as ternary
●FFX3A/3B configured as line out ternary
●FFX4A/4B configured as line out ternary
On channel 3 line out (LOC bits = 00, reg 0x17 bit D7,D6) the same data as channel 1
processing is sent. On channel 4 line out (LOC bits = 00) the same data as channel 2
processing is sent. In this configuration, neither volume control nor EQ has any effect on
channels 3 and 4.
In this configuration the PWM slot phase is the following as shown in Figure 21.
Figure 21. 2.0 channels (OPER = 00) PWM slots
OUT1A
OUT1A
OUT1B
OUT1B
OUT2A
OUT2A
OUT2B
OUT2B
OUT3A
OUT3A
OUT3B
OUT3B
OUT4A
OUT4A
OUT4B
OUT4B
52/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
2.1 channels, two half-bridges + one full-bridge (OPER = 11)
●FFX1A -> OUT1A
●FFX2A -> OUT1B
●FFX3A -> OUT2A
●FFX3B -> OUT2B
●FFX1A -> OUT3A
●FFX1B -> OUT3B
●FFX2A -> OUT4A
●FFX2B -> OUT4B
●FFX1A/1B configured as binary
●FFX2A/2B configured as binary
●FFX3A/3B configured as binary
●FFX4A/4B is not used
In this configuration, channel 3 has full control (volume, EQ, etc…). On OUT3/OUT4
channels, channel 1 and channel 2 PWM are replicated.
In this configuration the PWM slot phase is the following as shown in Figure 22.
Figure 22. 2.1 channels (OPER = 11) PWM slots
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1A
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
OUT1B
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2A
OUT2B
OUT2B
OUT2B
OUT2B
OUT2B
OUT2B
OUT3A
OUT3A
OUT3A
OUT3A
OUT3A
OUT3A
OUT3B
OUT3B
OUT3B
OUT3B
OUT3B
OUT3B
OUT4A
OUT4A
OUT4A
OUT4A
OUT4A
OUT4B
OUT4B
OUT4B
OUT4B
OUT4B
Doc ID 018835 Rev 753/171
Register description: New MapSTA381BW
2.1 channels, two full-bridges + one external full-bridge (OPER = 10)
●FFX1A -> OUT1A
●FFX1B -> OUT1B
●FFX2A -> OUT2A
●FFX2B -> OUT2B
●FFX3A -> OUT3A
●FFX3B -> OUT3B
●EAPD -> OUT4A
●TWARN -> OUT4B
●FFX1A/1B configured as ternary
●FFX2A/2B configured as ternary
●FFX3A/3B configured as ternary
●FFX4A/4B is not used
In this configuration, channel 3 has full control (volume, EQ, etc…). On OUT4 channel the
external bridge control signals are muxed.
In this configuration the PWM slot phase is the following as shown in Figure 23.
Figure 23. 2.1 channels (OPER = 10) PWM slots
OUT1A
OUT1A
OUT1A
OUT1A
OUT1B
OUT1B
OUT1B
OUT1B
OUT2A
OUT2A
OUT2A
OUT2A
OUT2B
OUT2B
OUT2B
OUT2B
OUT3A
OUT3A
OUT3A
OUT3A
OUT3B
OUT3B
OUT3B
OUT3B
54/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.11 FUNCT register (addr 0x0A)
D7D6D5D4D3D2D1D0
ReservedCRCAPEQPEQReservedAMDRCMDRCEDRC
00100000
Table 25.FUNCT register
BitR/WRSTNameDescription
6R/W 0 CRC
5R/W1APEQ
4R/W0PEQ
2R/W0AMDRC
1R/W0MDRCE
0R/W 0 DRC
6.11.1 Dual-band DRC
The STA381BW device provides a dual-band DRC (B2DRC) on the left and right channels
data path, as depicted in Figure 24. Dual-band DRC is activated by setting MDRCE = 1.
Figure 24. B
2
DRC scheme
‘0’: disable CRC computation and comparison
‘1’: enable CRC computation and comparison
The low-frequency information (LFE) is extracted from the left and right channels, removing
the high frequencies using a programmable biquad filter, and then computing the difference
Doc ID 018835 Rev 755/171
Register description: New MapSTA381BW
with the original signal. Limiter 1 (DRC1) is then used to control the amplitude of the
left/right high-frequency components, while limiter 2 (DRC2) is used to control the lowfrequency components (see Section 6.23: Dynamic control registers (addr 0x23 - 0x26 /
addr 0x43 - 0x46)).
The cutoff frequency of the high-pass filters can be user-defined, XO[3:0] = 0, or selected
from the pre-defined values.
DRC1 and DRC2 are then used to independently limit L/R high frequencies and LFE
channel amplitude (see Section 6.23: Dynamic control registers (addr 0x23 - 0x26 / addr
0x43 - 0x46)) as well as their volume control. To be noted that, in this configuration, the
dedicated channel 3 volume control can actually act as a bass boost enhancer as well (0.5
dB/step resolution).
The processed LFE channel is then recombined with the L and R channels in order to
reconstruct the 2.0 output signal.
Sub-band decomposition
The sub-band decomposition for B2DRC can be configured specifying the cutoff frequency.
The cutoff frequency can be programmed in two ways, using the XO bits in register 0x0C, or
using the “user programmable” mode (coefficients stored in RAM addresses 0x28 to 0x31).
For the user-programmable mode, use the formulas below to compute the high-pass filters:
b0 = (1 + alpha) / 2a0 = 1
b1 = -(1 + alpha) / 2a1 = -alpha
b2 = 0a2 = 0
where alpha = (1-sin(ω0))/cos(ω0), and ω0 is the cutoff frequency.
A first-order filter is recommended to guarantee that for every ω
the corresponding
0
low-pass filter obtained as difference (as shown in Figure 24) will have a symmetric (relative
to the HP filter) frequency response, and the corresponding recombination after the DRC
has low ripple. Second-order filters can be used as well, but in this case the filter shape
must be carefully chosen to provide good low-pass response and minimum ripple
recombination. For second-order filters, it is not possible to give a closed formula to get the
best coefficients, but empirical adjustment should be done.
DRC settings
The DRC blocks used by B2DRC are the same as those described in Section 6.23: Dynamic
control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46). B
DRC blocks in anticlipping mode. Attack and release thresholds can be selected using
registers 0x32, 0x33, 0x34, 0x35, while attack and release rates are configured by registers
0x12 and 0x14.
2
DRC configure automatically the
Band downmixing
The low-frequency band is down-mixed to the left and right channels at the B2DRC output.
Channel volume can be used to weight the bands recombination to fine-tune the overall
frequency response.
The STA381BW supports sampling rates of 32 kHz, 44.1 kHz, 48 kHz, 88.2 kHz, 96 kHz,
176.4 kHz, and 192 kHz. Therefore the internal clock is:
●32.768 MHz for 32 kHz
●45.1584 MHz for 44.1 kHz, 88.2 kHz, and 176.4 kHz
●49.152 MHz for 48 kHz, 96 kHz, and 192 kHz
Selects the ratio between the input I
frequency and the input clock.
2
S sampling
The external clock frequency provided to the XTI pin or BICKI pin (depending on the MCS
settings) must be a multiple of the input sampling frequency (f
).
s
The relationship between the input clock (either XTI or BICKI) and the input sampling rate is
determined by both the MCSx and the IR (input rate) register bits. The MCSx bits determine
the PLL factor generating the internal clock and the IR bit determines the oversampling ratio
used internally. In Ta bl e 2 8 MCS 111 and 110 indicate that BICKI has to be used as the
clock source, while XTI is used in all the other cases.
Selects internal interpolation ratio based on input I
sampling frequency
S
The STA381BW has variable interpolation (oversampling) settings such that internal
processing and FFX output rates remain consistent. The first processing block interpolates
by either 3 times (Table 83: PLL register 0x56 bits D0), 2 times or 1 time (pass-through) or
provides a 2-times downsample. The oversampling ratio of this interpolation is determined
by the IR bits.
Table 30.IR bit settings as a function of the input sampling rate
Input sampling rate fs (kHz)IR1st stage interpolation ratio
The on-chip STA381BW power output block provides feedback to the digital controller using
inputs to the power control block. The FAULT input is used to indicate a fault condition (either
overcurrent or thermal). When FAULT is asserted (set to 0), the power control block attempts
a recovery from the fault by asserting the tri-state output (setting it to 0 which directs the
power output block to begin recovery), holds it at 0 for period of time in the range of 0.1 ms
to 1 second as defined by the fault-detect recovery constant register (FDRC registers 0x3C0x3D), then toggles it back to 1. This sequence is repeated as long as the fault indication
exists. This feature is enabled by default but can be bypassed by setting the FDRB control
bit to 1.
6.14 Configuration register B (addr 0x12)
D7D6D5D4D3D2D1D0
C2IMC1IMDSCKESAIFBSAI3SAI2SAI1SAI0
10000000
6.14.1 Serial data interface
The STA381BW audio serial input was designed to interface with standard digital audio
components and to accept a number of serial data formats. The STA381BW always acts as
the slave when receiving audio input from standard digital audio components. Serial data for
two channels is provided using three inputs: left/right clock LRCKI, serial clock BICKI, and
serial data 1 and 2 SDI12.
The SAI bits (D3 to D0) and the SAIFB bit (D4) are used to specify the serial data format.
The default serial data format is I
2
S, MSB-first. Available formats are shown in the tables
that follow.
Doc ID 018835 Rev 759/171
Register description: New MapSTA381BW
6.14.2 Serial data first bit
Table 32.Serial data first bit
SAIFBFormat
0MSB-first
1LSB-first
Table 33.Support serial audio input formats for MSB-first (SAIFB = 0)
BICKISAI [3:0]SAIFBInterface format
32 * fs
00000I
00010Left/right-justified 16-bit data
00000I2S 16- to 23-bit data
00010Left-justified 16- to 24-bit data
2
S 15-bit data
48 * fs
64 * fs
00100Right-justified 24-bit data
01100Right-justified 20-bit data
10100Right-justified 18-bit data
11100Right-justified 16-bit data
00000I2S 16- to 24-bit data
00010Left-justified 16- to 24-bit data
00100Right-justified 24-bit data
01100Right-justified 20-bit data
10100Right-justified 18-bit data
11100Right-justified 16-bit data
60/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Table 34.Supported serial audio input formats for LSB-first (SAIFB = 1)
BICKISAI [3:0]SAIFBInterface format
32 * fs
11001I
11101Left/right-justified 16-bit data
01001I
01001I
10001I
11001LSB first I
00011Left-justified 24-bit data
01011Left-justified 20-bit data
48 * fs
10011Left-justified 18-bit data
11011Left-justified 16-bit data
00101Right-justified 24-bit data
01101Right-justified 20-bit data
10101Right-justified 18-bit data
11101Right-justified 16-bit data
2
S 15-bit data
2
S 23-bit data
2
S 20-bit data
2
S 18-bit data
2
S 16-bit data
00001I2S 24-bit data
2
01001I
10001I
11001LSB first I
S 20-bit data
2
S 18-bit data
2
S 16-bit data
00011Left-justified 24-bit data
01011Left-justified 20-bit data
64 * fs
10011Left-justified 18-bit data
11011Left-justified 16-bit data
00101Right-justified 24-bit data
01101Right-justified 20-bit data
10101Right-justified 18-bit data
11101Right-justified 16-bit data
To make the STA381BW work properly, the serial audio interface LRCKI clock must be
synchronous to the PLL output clock. It means that:
●the frequency of PLL clock / frequency of LRCKI = N ±4 cycles, where N depends on
the settings in Ta bl e 3 0
●the PLL must be locked.
If these two conditions are not met, and the IDE bit (reg 0x05 bit 2) is set to 1, the
STA381BW will immediately mute the I
2
S PCM data out (provided to the processing block)
and it will freeze any active processing task.
Doc ID 018835 Rev 761/171
Register description: New MapSTA381BW
To avoid any audio side effects (like pop noise), it is strongly recommended to soft mute any
audio streams flowing into the STA381BW data path before the desynchronization event
happens. At the same time any processing related to the I
2
C configuration should be issued
only after the serial audio interface and the internal PLL are synchronous again.
Note:Any mute or volume change causes some delay in the completion of the I
2
C operation due
to the soft volume feature. The soft volume phase change must be finished before any clock
desynchronization.
6.14.3 Delay serial clock enable
Table 35.Delay serial clock enable
BitR/WRSTNameDescription
0: No serial clock delay
5R/W 0DSCKE
1: Serial clock delay by 1 core clock cycle to tolerate
anomalies in some I2S master devices
6.14.4 Channel input mapping
Table 36.Channel input mapping
BitR/WRSTNameDescription
6R/W 0C1IM
7R/W 1C2IM
0: Processing channel 1 receives left I
1: Processing channel 1 receives right I
0: Processing channel 2 receives left I
1: Processing channel 2 receives right I2S input
Each channel received via I2S can be mapped to any internal processing channel via the
channel input mapping registers. This allows for flexibility in processing. The default settings
of these registers map each I
2
S input channel to its corresponding processing channel.
6.15 Configuration register C (addr 0x13)
D7D6D5D4D3D2D1D0
ReservedReservedCSZ3CSZ2CSZ1CSZ0ReservedReserved
10010111
6.15.1 FFX compensating pulse size register
Table 37.FFX compensating pulse size bits
BitR/WRSTNameDescription
2
S input
2
S input
2
S input
2R/W 1CSZ0
3R/W 1CSZ1
When OM[1,0] = 11, this register determines the
size of the FFX compensating pulse from 0 clock
4R/W 1CSZ2
ticks to 15 clock periods.
5R/W 0CSZ3
62/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Table 6:
Table 38.Compensating pulse size
CSZ[3:0]Compensating pulse size
00000 ns (0 ticks) compensating pulse size
000120 ns (1 tick) clock period compensating pulse size
……
1111300 ns (15 ticks) clock period compensating pulse size
6.16 Configuration register D (addr 0x14)
D7D6D5D4D3D2D1D0
SMEZDEReservedBQLPSLDSPBReservedReserved
00011000
6.16.1 DSP bypass
Table 39.DSP bypass
BitR/WRSTNameDescription
2R/W0DSPB
Setting the DSPB bit bypasses the EQ function of the STA381BW.
6.16.2 Post-scale link
Table 40.Post-scale link
BitR/WRSTNameDescription
3R/W1PSL
Post-scale functionality can be used for power-supply error correction. For multi-channel
applications running off the same power supply, the post-scale values can be linked to the
value of channel 1 for ease of use and in order to update the values faster.
6.16.3 Biquad coefficient link
Table 41.Biquad coefficient link
BitR/WRSTNameDescription
4R/W 1BQL
0: Normal operation
1: Bypass of biquad and bass/treble functions
0: Each channel uses individual post-scale values
1: Each channel uses channel 1 post-scale values
0: Each channel uses coefficient values
1: Each channel uses channel 1 coefficient values
For ease of use, all channels can use the biquad coefficients loaded into the channel 1
coefficient RAM space by setting the BQL bit to 1. Therefore, any EQ updates only have to
be performed once.
Doc ID 018835 Rev 763/171
Register description: New MapSTA381BW
6.16.4 Zero-detect mute enable
Table 42.Zero-detect mute enable
BitR/WRSTNameDescription
6R/W 0ZDE
Setting of 1 enables the automatic zero-detect mute
Setting of 0 disables the automatic zero-detect mute
Refer to 6.32: Enhanced zero-detect mute and input level measurement (address 0x61-
0x65, 0x3F, 0x40, 0x6F).
6.16.5 Submix mode enable
Table 43.Submix mode enable
BitR/WRSTNameDescription
7R/W 0SME
0: Submix into left/right disabled
1: Submix into left/right enabled
6.17 Configuration register E (addr 0x15)
D7D6D5D4D3D2D1D0
ReservedZCEReservedPWMSAMENSBWReservedReserved
10000010
6.17.1 Noise-shaper bandwidth selection
Table 44.Noise-shaper bandwidth selection
BitR/WRSTNameDescription
2R/W0NSBW
6.17.2 AM mode enable
Table 45.AM mode enable
BitR/WRSTNameDescription
3R/W 0AME
The STA381BW features an FFX processing mode that minimizes the amount of noise
generated in the frequency range of AM radio. This mode is intended for use when FFX is
operating in a device with an active AM tuner. The SNR of the FFX processing is reduced to
approximately 83 dB in this mode, which is still greater than the SNR of AM radio.
1: Third order NS
0: Fourth order NS
0: Normal FFX operation
1: AM reduction mode FFX operation
64/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.17.3 PWM speed mode
Table 46.PWM speed mode
BitR/WRSTNameDescription
0: Normal speed (384 kHz) all channels
4R/W 0PWMS
1: Odd speed (341.3 kHz) all channels. Not suitable for
binary BTL mode.
6.17.4 Zero-crossing enable
Table 47.Zero-crossing enable
BitR/WRSTNameDescription
6R/W 0ZCE
‘1’: Volume adjustment only occurs at digital zero-crossing
‘0’: Volume adjustment occur immediately
The ZCE bit enables zero-crossing adjustment. When volume is adjusted on digital zerocrossing, no clicks are audible
6.18 Configuration register F (addr 0x16)
D7D6D5D4D3D2D1D0
EAPDPWDNReservedLDTEBCLEIDEReservedReserved
010111
6.18.1 Invalid input detect mute enable
Table 48.Invalid input detect mute enable
BitR/WRSTNameDescription
2R/W 1IDE
Setting the IDE bit enables this function, which looks at the input I2S data and automatically
mutes if the signals are perceived as invalid.
Setting of 1 enables the automatic invalid input
detect mute
6.18.2 Binary output mode clock loss detection
Table 49.Binary output mode clock loss detection
BitR/WRSTNameDescription
3R/W1BCLEBinary output mode clock loss detection enable
This bit detects loss of input MCLK in binary mode and will output 50% duty cycle.
Doc ID 018835 Rev 765/171
Register description: New MapSTA381BW
6.18.3 LRCK double trigger protection
Table 50.LRCK double trigger protection
BitR/WRSTNameDescription
4R/W1LDTELRCLK double trigger protection enable
This bit actively prevents double triggering of LRCLK.
6.18.4 Power-down
Table 51.IC power-down
BitR/WRSTNameDescription
7R/W 1PWDN
The PWDN register is used to place the IC in a low-power state. When PWDN is written
as 0, the output begins a soft-mute. After the mute condition is reached, EAPD is asserted
to power down the power stage, then the master clock to all internal hardware except the I
block is gated. This places the IC in a very low power consumption state.The register state
is preserved once the device recovers from power-down.
6.18.5 External amplifier power-down
Table 52.External amplifier power-down
BitR/WRSTNameDescription
7R/W0EAPD
The EAPD register directly disables/enables the internal power circuitry.
When EAPD = 0, the internal power section is placed in a low-power state (disabled). This
register also controls the EAPD/FFX4B output pin when OCFG = 11.
0: IC power-down low-power condition
1: IC normal operation
0: External power stage power-down active
1: Normal operation
01Line output variable - CH3 volume effects line output, no EQ
10Line output variable with EQ - CH3 volume effects line output
11Reserved
Line output is only active when OCFG = 00. In this case LOC determines the line output
configuration. The source of the line output is always the channel 1 and 2 inputs.
Table 54.Mute configuration
BitR/WRSTNameDescription
Channel 3 mute
3R/W 0C3M
2R/W 0C2M
1R/W 0C1M
0R/W0MMUTE
0 - No mute condition. It is possible to set the channel
volume
1 - Channel 3 in hardware mute
Channel 2 mute
0 - No mute condition. It is possible to set the channel
volume
1 - Channel 2 in hardware mute
Channel 1 mute
0 - No mute condition. It is possible to set the channel
volume
1 - Channel 1 in hardware mute
Master mute
0 - Normal operation
1 - All channels are in mute condition
Doc ID 018835 Rev 767/171
Register description: New MapSTA381BW
6.19.2 Channel 3 / line output volume (addr 0x1B)
D7D6D5D4D3D2D1D0
CH3VOL
01100000
The volume structure of the STA381BW consists of individual volume registers for each
channel and a master volume register that provides an offset to each channel’s volume
setting. The individual channel volumes are adjustable in 0.5 dB steps from +48 dB to
-80 dB.
As an example, if CH3VOL = 0x00 or +48 dB and MVOL= -12 dB, then the total gain for
channel 3 = +36 dB.
The master mute, when set to 1, mutes all channels at once, whereas the individual channel
mute (CxM) mutes only that channel. Both the master mute and the channel mutes provide
a “soft mute” with the volume ramping down to mute in 4096 samples from the maximum
volume setting at the internal processing rate (approximately 96 kHz).
A “hard (instantaneous) mute” can be obtained by programming a value of 0xFF (255) to
any channel volume register or the master volume register. When volume offsets are
provided via the master volume register, any channel whose total volume is less than -80 dB
is muted.
All changes in volume take place at zero-crossings when ZCE = 1 (Section 6.17:
Configuration register E (addr 0x15)) on a per-channel basis as this creates the smoothest
possible volume transitions. When ZCE = 0, volume updates occur immediately.
Table 55.Channel 3 volume as a function of CH3VOL[7:0]
CH3VOL[7:0]Volume
00000000 (0x00)+48 dB
00000001 (0x01)+47.5 dB
00000010 (0x02)+47 dB
……
01011111 (0x5F)+0.5 dB
01100000 (0x60)0 dB
01100001 (0x61)-0.5 dB
……
11010111 (0xD7)-59.5 dB
11011000 (0xD8)-60 dB
11011001 (0xD9)-61 dB
11011010 (0xDA)-62 dB
……
11101100 (0xEC)-80 dB
11101101 (0xED)Hard channel mute
……
11111111 (0xFF)Hard channel mute
68/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.20 Audio preset registers (0x1D)
D7D6D5D4D3D2D1D0
XO3XO2XO1XO0AMAM2AMAM1AMAM0AMAME
00000000
6.20.1 AM interference frequency switching
Table 56.AM interference frequency switching bits
BitR/WRSTNameDescription
Audio preset AM enable
0R/W0AMAME
Table 57.Audio preset AM switching frequency selection
Tone control (bass/treble) can be bypassed on a per-channel basis for channels 1 and 2.
Table 60.Tone control bypass
CxTCBMode
0Perform tone control on channel x - normal operation
1Bypass tone control on channel x
70/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.21.2 EQ bypass
EQ control can be bypassed on a per-channel basis for channels 1 and 2. If EQ control is
bypassed on a given channel, the prescale and all filters (biquads, bass, treble in any
combination) are bypassed for that channel.
Table 61.EQ bypass
CxEQBPMode
0Perform EQ on channel x - normal operation
1Bypass EQ on channel x
6.21.3 Volume bypass
Each channel contains an individual channel volume bypass. If a particular channel has
volume bypassed via the CxVBP = 1 register, then only the channel volume setting for that
particular channel affects the volume setting, the master volume setting will not affect that
channel.
Table 62.Volume bypass register
CxVBPMode
0Normal volume operations
1Volume is bypassed
6.21.4 Binary output enable registers
Each individual channel output can be set to output a binary PWM stream. In this mode
output A of a channel is considered the positive output and output B is the negative inverse.
Table 63.Binary output enable registers
CxBOMode
0FFX 3-state output - normal operation
1Binary output
6.21.5 Limiter select
Limiter selection can be made on a per-channel basis according to the channel limiter select
bits. CxLS bits are not considered in case of dual-band DRC (Section 6.11.1: Dual-band
Table 64.Channel limiter mapping as a function of C3LS bits
C3LS[1:0]Channel limiter mapping
00Channel has limiting disabled
01Channel is mapped to limiter #1
10Channel is mapped to limiter #2
Doc ID 018835 Rev 771/171
Register description: New MapSTA381BW
6.21.6 Output mapping
Output mapping can be performed on a per-channel basis according to the CxOM channel
output mapping bits. Each input into the output configuration engine can receive data from
any of the three processing channel outputs.
.
Table 65.Channel output mapping as a function of C3OM bits
C3OM[1:0]Channel x output source from
00Channel1
01Channel 2
10Channel 3
6.22 Tone control register (addr 0x22)
D7D6D5D4D3D2D1D0
TTC3TTC2TTC1TTC0BTC3BTC2BTC1BTC0
01110111
6.22.1 Tone control
Table 66.Tone control boost/cut as a function of BTC and TTC bits
The STA381BW includes two independent limiter blocks. The purpose of the limiters is to
automatically reduce the dynamic range of a recording to prevent the outputs from clipping
in anticlipping mode or to actively reduce the dynamic range for a better listening
environment such as a nighttime listening mode which is often needed for DVDs. The two
modes are selected via the DRC bit in Section 6.11: FUNCT register (addr 0x0A). Each
channel can be mapped to either limiter or not mapped, meaning that the channel will clip
when 0 dBfs is exceeded. Each limiter looks at the present value of each channel that is
mapped to it, selects the maximum absolute value of all these channels, performs the
limiting algorithm on that value, and then, if needed, adjusts the gain of the mapped
channels in unison.
The limiter attack thresholds are determined by the LxAT registers if the EATHx[7] (bit D7 of
register 0x43 or 0x45) bits are set to 0, else the thresholds are determined by EATHx[6:0]. It
is recommended in anticlipping mode to set this to 0 dBfs, which corresponds to the
maximum unclipped output power of an FFX amplifier. Since gain can be added digitally
within the STA381BW it is possible to exceed 0 dBfs or any other LxAT setting. When this
occurs, the limiter, when active, automatically starts reducing the gain. The rate at which the
gain is reduced when the attack threshold is exceeded is dependent upon the attack rate
register setting for that limiter. Gain reduction occurs on a peak-detect algorithm. Setting the
EATHx[7] bits to 1 selects the anticlipping mode.
The limiter release thresholds are determined by the LxRT registers if the ERTHx[7] (bit D7
of register 0x44 or 0x46) bits are set to 0, else the thresholds are determined by
Doc ID 018835 Rev 773/171
Register description: New MapSTA381BW
ERTHx[6:0]. Setting the ERTHx[7] bits to 1 automatically selects the anticlipping mode. The
release of the limiter, when the gain is again increased, is dependent on an RMS-detect
algorithm. The output of the volume/limiter block is passed through an RMS filter. The output
of this filter is compared to the release threshold, determined by the release threshold
register. When the RMS filter output falls below the release threshold, the gain is again
increased at a rate dependent upon the release rate register. The gain can never be
increased past its set value and, therefore, the release only occurs if the limiter has already
reduced the gain. The release threshold value can be used to set what is effectively a
minimum dynamic range, this is helpful as overlimiting can reduce the dynamic range to
virtually zero and cause program material to sound “lifeless”.
In anticlipping mode, the attack and release thresholds are set relative to full-scale. In DRC
mode (bit D0 reg 0x0A set to 1), the attack threshold is set relative to the maximum volume
setting of the channels mapped to that limiter and the release threshold is set relative to the
maximum volume setting plus the attack threshold.
The extended release threshold value is determined as follows:
release threshold = -12 + ERTH2 / 4
To enable this feature, the ERTHEN2 bit must be set to 1.
Note:Attack/release threshold step is 0.125 dB in the range -12 dB to 0 dB.
6.24 User-defined coefficient control registers (addr 0x27 - 0x37)
6.24.1 Coefficient address register
D7D6D5D4D3D2D1D0
ReservedReservedCFA5CFA4CFA3CFA2CFA1CFA0
00000000
6.24.2 Coefficient b1 data register bits 23:16
D7D6D5D4D3D2D1D0
C1B23C1B22C1B21C1B20C1B19C1B18C1B17C1B16
00000000
6.24.3 Coefficient b1 data register bits 15:8
D7D6D5D4D3D2D1D0
C1B15C1B14C1B13C1B12C1B11C1B10C1B9C1B8
00000000
6.24.4 Coefficient b1 data register bits 7:0
D7D6D5D4D3D2D1D0
C1B7C1B6C1B5C1B4C1B3C1B2C1B1C1B0
00000000
78/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.24.5 Coefficient b2 data register bits 23:16
D7D6D5D4D3D2D1D0
C2B23C2B22C2B21C2B20C2B19C2B18C2B17C2B16
00000000
6.24.6 Coefficient b2 data register bits 15:8
D7D6D5D4D3D2D1D0
C2B15C2B14C2B13C2B12C2B11C2B10C2B9C2B8
00000000
6.24.7 Coefficient b2 data register bits 7:0
D7D6D5D4D3D2D1D0
C2B7C2B6C2B5C2B4C2B3C2B2C2B1C2B0
00000000
6.24.8 Coefficient a1 data register bits 23:16
D7D6D5D4D3D2D1D0
C1B23C1B22C1B21C1B20C1B19C1B18C1B17C1B16
00000000
6.24.9 Coefficient a1 data register bits 15:8
D7D6D5D4D3D2D1D0
C3B15C3B14C3B13C3B12C3B11C3B10C3B9C3B8
00000000
6.24.10 Coefficient a1 data register bits 7:0
D7D6D5D4D3D2D1D0
C3B7C3B6C3B5C3B4C3B3C3B2C3B1C3B0
00000000
6.24.11 Coefficient a2 data register bits 23:16
D7D6D5D4D3D2D1D0
C4B23C4B22C4B21C4B20C4B19C4B18C4B17C4B16
00000000
Doc ID 018835 Rev 779/171
Register description: New MapSTA381BW
6.24.12 Coefficient a2 data register bits 15:8
D7D6D5D4D3D2D1D0
C4B15C4B14C4B13C4B12C4B11C4B10C4B9C4B8
00000000
6.24.13 Coefficient a2 data register bits 7:0
D7D6D5D4D3D2D1D0
C4B7C4B6C4B5C4B4C4B3C4B2C4B1C4B0
00000000
6.24.14 Coefficient b0 data register bits 23:16
D7D6D5D4D3D2D1D0
C5B23C5B22C5B21C5B20C5B19C5B18C5B17C5B16
00000000
6.24.15 Coefficient b0 data register bits 15:8
D7D6D5D4D3D2D1D0
C5B15C5B14C5B13C5B12C5B11C5B10C5B9C5B8
00000000
6.24.16 Coefficient b0 data register bits 7:0
D7D6D5D4D3D2D1D0
C5B7C5B6C5B5C5B4C5B3C5B2C5B1C5B0
00000000
6.24.17 Coefficient write/read control register
D7D6D5D4D3D2D1D0
ReservedRAR1WAW1
00000
Coefficients for user-defined EQ, mixing, scaling, and bass management are handled
internally in the STA381BW via RAM. Access to this RAM is available to the user via an I
register interface. A collection of I
coefficient base address, five sets of three store the values of the 24-bit coefficients to be
written or that were read, and one contains bits used to control the write/read of the
coefficient(s) to/from RAM.
2
C registers is dedicated to this function. One contains a
2
C
Note:The read and write operation on RAM coefficients works only if the LRCKI pin is switching.
80/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Reading a coefficient from RAM
1.Write 6 bits of the address to I2C register 0x27.
2. Write 1 to the R1 bit in I
3. Read the top 8 bits of the coefficient in I
4. Read the middle 8 bits of the coefficient in I
5. Read the bottom 8 bits of the coefficient in I
2
C address 0x37.
2
C address 0x28.
2
C address 0x29.
2
C address 0x2A.
Reading a set of coefficients from RAM
1.Write 6 bits of the address to I2C register 0x27.
2. Write 1 to the RA bit in I
3. Read the top 8 bits of the coefficient in I
4. Read the middle 8 bits of the coefficient in I
5. Read the bottom 8 bits of the coefficient in I
6. Read the top 8 bits of coefficient b2 in I
7. Read the middle 8 bits of coefficient b2 in I
8. Read the bottom 8 bits of coefficient b2 in I
9. Read the top 8 bits of coefficient a1 in I
10. Read the middle 8 bits of coefficient a1 in I
11. Read the bottom 8 bits of coefficient a1 in I
12. Read the top 8 bits of coefficient a2 in I
13. Read the middle 8 bits of coefficient a2 in I
14. Read the bottom 8 bits of coefficient a2 in I
15. Read the top 8 bits of coefficient b0 in I
16. Read the middle 8 bits of coefficient b0 in I
17. Read the bottom 8 bits of coefficient b0 in I
2
C address 0x37.
2
C address 0x28.
2
C address 0x29.
2
C address 0x2A.
2
C address 0x2B.
2
C address 0x2C.
2
C address 0x2D.
2
C address 0x2E.
2
C address 0x2F.
2
C address 0x30.
2
C address 0x31.
2
C address 0x32.
2
C address 0x33.
2
C address 0x34.
2
C address 0x35.
2
C address 0x36.
Writing a single coefficient to RAM
1.Write 6 bits of the address to I2C register 0x27.
2. Write the top 8 bits of the coefficient in I
3. Write the middle 8 bits of the coefficient in I
4. Write the bottom 8 bits of the coefficient in I
5. Write 1 to the W1 bit in I
2
C address 0x37.
Doc ID 018835 Rev 781/171
2
C address 0x28.
2
C address 0x29.
2
C address 0x2A.
Register description: New MapSTA381BW
Writing a set of coefficients to RAM
1.Write 6 bits of the starting address to I2C register 0x27.
2. Write the top 8 bits of coefficient b1 in I
3. Write the middle 8 bits of coefficient b1 in I
4. Write the bottom 8 bits of coefficient b1 in I
5. Write the top 8 bits of coefficient b2 in I
6. Write the middle 8 bits of coefficient b2 in I
7. Write the bottom 8 bits of coefficient b2 in I
8. Write the top 8 bits of coefficient a1 in I
9. Write the middle 8 bits of coefficient a1 in I
10. Write the bottom 8 bits of coefficient a1 in I
11. Write the top 8 bits of coefficient a2 in I
12. Write the middle 8 bits of coefficient a2 in I
13. Write the bottom 8 bits of coefficient a2 in I
14. Write the top 8 bits of coefficient b0 in I
15. Write the middle 8 bits of coefficient b0 in I
16. Write the bottom 8 bits of coefficient b0 in I
17. Write 1 to the WA bit in I
2
C address 0x37.
2
C address 0x28.
2
C address 0x29.
2
C address 0x2A.
2
C address 0x2B.
2
C address 0x2C.
2
C address 0x2D.
2
C address 0x2E.
2
C address 0x2F.
2
C address 0x30.
2
C address 0x31.
2
C address 0x32.
2
C address 0x33.
2
C address 0x34.
2
C address 0x35.
2
C address 0x36.
The mechanism for writing a set of coefficients to RAM provides a method of updating the
five coefficients corresponding to a given biquad (filter) simultaneously to avoid possible
unpleasant acoustic side effects. When using this technique, the 6-bit address specifies the
address of the biquad b1 coefficient (for example, 0, 5, 10, 20, 35 decimal), and the
STA381BW generates the RAM addresses as offsets from this base value to write the
complete set of coefficient data.
82/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
6.24.18 User-defined EQ
The STA381BW can be programmed for four EQ filters (biquads) per each of the two input
channels. The biquads use the following equation:
where Y[n] represents the output and X[n] represents the input. Multipliers are 24-bit signed
fractional multipliers, with coefficient values in the range of 0x800000 (-1) to 0x7FFFFF
(0.9999998808).
Coefficients stored in the user-defined coefficient RAM are referenced in the following
manner:
CxHy0 = b
CxHy1 = b
1
2
/ 2
CxHy2 = -a1 / 2
CxHy3 = -a
2
CxHy4 = b0 / 2
where x represents the channel and the y the biquad number. For example, C2H41 is the b
coefficient in the fourth biquad for channel 2.
Additionally, the STA381BW can be programmed for a high-pass filter (processing
channels 1 and 2) and a low-pass filter (processing channel 3) to be used for bassmanagement crossover when the XO setting is 000 (user-defined). Both of these filters
when defined by the user (rather than using the preset crossover filters) are second order
filters that use the biquad equation given above. They are loaded into the C12H0-4 and
C3Hy0-4 areas of RAM noted in Tab le 7 3 .
Channel 1 and channel 2 biquads use by default the extended coefficient range (-4, +4);
Xover filters use only the standard coefficients range (-1, +1).
2
By default, all user-defined filters are pass-through where all coefficients are set to 0, except
the channel 1 and 2 b
b
/2 coefficient which is set to 0x400000 (representing 0.5).
0
6.24.19 Pre-scale
The STA381BW provides a multiplication for each input channel for the purpose of scaling
the input prior to EQ. This pre-EQ scaling is accomplished by using a 24-bit signed
fractional multiplier, with 0x800000 = -1 and 0x7FFFFF = 0.9999998808. The scale factor
for this multiplication is loaded into RAM using the same I
coefficients and the bass management. All channels can use the channel-1 pre-scale factor
by setting the biquad link bit. By default, all pre-scale factors are set to 0x7FFFFF.
6.24.20 Post-scale
The STA381BW provides one additional multiplication after the last interpolation stage and
the distortion compensation on each channel. This post-scaling is accomplished by using a
24-bit signed fractional multiplier, with 0x800000 = -1 and 0x7FFFFF = 0.9999998808. The
scale factor for this multiplication is loaded into RAM using the same I
biquad coefficients and the bass management. This post-scale factor can be used in
conjunction with an ADC-equipped microcontroller to perform power-supply error correction.
All channels can use the channel-1 post-scale factor by setting the post-scale link bit. By
/2 coefficient which is set to 0x100000 (representing 0.5) and Xover
0
2
C registers as the biquad
2
C registers as the
Doc ID 018835 Rev 783/171
Register description: New MapSTA381BW
default, all post-scale factors are set to 0x7FFFFF. When line output is being used,
channel-3 post-scale will affect both channels 3 and 4.
Table 73.RAM block for biquads, mixing, scaling and bass management
Index (decimal) Index (hex)DescriptionCoefficientDefault
The FDRC bits specify the 16-bit fault-detect recovery time delay. When FAULT is asserted,
the TRISTATE output is immediately asserted low and held low for the time period specified
by this constant. A constant value of 0x0001 in this register is approximately 0.083 ms. The
default value of 0x300C gives approximately 1 sec.
0x0000 is a reserved value.
6.26 Extended configuration register (addr 0x47)
D7D6D5D4D3D2D1D0
ReservedReservedPS48DBXAR1XAR2BQ5BQ6BQ7
0000111
The extended configuration register provides access to biquad 5, 6 and 7.
6.26.1 Extended post-scale range
Table 74.Extended post-scale range
PS48DBMode
0Post-scale value is applied as defined in the coefficient RAM
1
Post-scale value is applied with a +48 dB offset with respect to the
coefficient RAM value
Post-scale is an attenuation by default. When PS48DB is set to 1, a 48-dB offset is applied
to the coefficient RAM value, so post-scale can act as a gain too.
6.26.2 Extended attack rate
The attack rate shown in Ta bl e 67 can be extended to provide up to an 8 dB/ms attack rate
on both limiters.
Table 75.Extended attack rate, limiter 1
XAR1Mode
0Limiter1 attack rate is configured using Ta b le 6 7
1Limiter1 attack rate is 8 dB/ms
Doc ID 018835 Rev 785/171
Register description: New MapSTA381BW
Table 76.Extended attack rate, limiter 2
XAR2Mode
0Limiter2 attack rate is configured using Ta b le 6 7
1Limiter2 attack rate is 8 dB/ms
6.26.3 Extended biquad selector
Bass and treble controls can be configured as user-defined filters when the equalization
coefficients link is activated (BQL = 1) and the corresponding BQx bit is set to 1.
Table 77.Extended biquad selector, biquad 5
BQ5Mode
0Reserved
1User-defined biquad 5 coefficients are selected
Table 78.Extended biquad selector, biquad 6
BQ6Mode
0Pre-set bass filter selected as per Ta b le 6 6
1User-defined biquad 6 coefficients are selected
Table 79.Extended biquad selector, biquad 7
BQ7Mode
0Pre-set treble filter selected as per Ta b le 6 6
1User-defined biquad 7 coefficients are selected
When filters from the 5th to 7th are configured as user-programmable, the corresponding
coefficients are stored respectively in addresses 0x20-0x24 (BQ5), 0x25-0x29 (BQ6), 0x2A0x2E (BQ7) as given in Ta bl e 7 3 .
Note:The BQx bits are ignored if BQL = 0 or if DEMP = 1 (relevant for BQ5) or CxTCB = 1
By default, the STA381BW is able to configure the embedded PLL automatically depending
on the MCS bits (reg 0x00). For certain applications and to provide flexibility to the user, a
manual PLL configuration can be used (setting
PLL_DIRP to ‘1’)
The output PLL frequency formula is:
Fin
NDIV()
⎛⎞
---------------------------
×
⎝⎠
IDIV1+()
FRAC
⎛⎞
-----------------
+
⎝⎠
65536
where Fin is the input clock frequency from the pad.
The following power bridge pins short-circuit protections are implemented in the
STA381BW:
●OUTxx vs. GNDx
●OUTxx vs. VCCx
●OUT1B vs. OUT2A
The protection is enabled when reg. 0x50 bit 0 (SHEN) is set to ‘1’. The protection will check
the short-circuit when the EAPD bit is toggled from ‘0’ to ‘1’ (i.e. the power bridge is switched
on), and only if the test passes (no short), does the power bridge leave the tristate condition.
Register 0x58 (read-only registers) will give more information about the detected short type.
GNDSH equal to ‘0’ means that OUTxx is shorted to ground, while the same value on
VCCSH means that OUTxx is shorted to Vcc, finally OUTSH=’0’ means that OUT1B is
shorted to OUT2A.
To be noted that once the check is performed, and the tristate released, the short protection
is not active anymore until the next EAPD 0->1 toggling which means that shorts that
happened during normal operation cannot be detected.
To be noted that register SHOK is meaningful only after the EAPD bit is set to ‘1’ at least
once.
The short-circuit protections implemented are effective only in BTL configuration, and they
must not be activated if a single-ended application scheme is needed.
Doc ID 018835 Rev 789/171
Register description: New MapSTA381BW
Figure 26. Short-circuit detection timing diagram (no short detected)
Start out test
EAPD
OUT1A
OUT1B
OUT2A
OUT2B
GNDSH]
VCCSH
tset trohS fo dnEtset ccv tratStset dng tratS
OUTSH]
44
cycles
50005 cyc les
50005 cyc les
TBD cycles
1cycle
In Figure 26 the short protection timing diagram is shown. The time information is expressed
in clock cycles, where the clock frequency is defined as in section Section 6.13.1: Master
clock select. The gray color is used for the short status bits to indicate that the bits are
carrying the status of the previous EAPD 0->1 toggling (to be noted that after reset this state
is meaningless since no EAPD transition occurs). The GND-related SHOK bits are updated
as soon as the gnd test is completed, the VCC bits are updated after vcc test is completed,
and the SOUT bit is updated after the shorted output test is completed. The gnd test, vcc
test and output test, are always run (if the SHEN bit is active and EAPD toggled to ‘1’), and
only if both tests are successful (no short) do the bridge outputs leave the tristate (indicated
by dotted lines in the figure). If one of the three tests (or all) fail, the power bridge outputs
are kept in the tristate until the procedure is restarted with a new EAPD toggling.
In this figure EAPD is intended to be bit 7 of register 0x05.
6.29 Extended coefficient range up to -4...4 (address 0x5A)
Biquads from 1 to 7 have in the STA381BW the possibility to extend the coefficient range
from [-1,1) to [-4..4) which allows the use of high-shelf filters that may require a coefficient
dynamic greater in absolute value than 1.
Three ranges are available, [-1;1) [-2;2) [-4;4). By default, the extended range is activated.
Each biquad has its independent setting according to the following table.
90/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Table 85.Coefficients extended range configuration
CEXT_Bx[1]CEXT_Bx[0]Range
00
01
10
11Reserved
In this case the user can decide, for each filter stage, the right coefficient range. Note that for
a given biquad the same range will be applied to the left and right (channel 1 and channel
2).
The crossover biquad does not have the availability of this feature, maintaining the [-1;1)
range unchanged.
In the STA381BW, by default, the power-down pin and I2C power-down act on mute
commands to perform the fade-out. This default can be changed so that the fade-out can be
started using the master volume. The RPDNEN bit, when set, activates this feature.
6.30.2 Bridge immediately off (BRIDGOFF) bit (address 0x4B, bit D5)
A fade-out procedure is started in the STA381BW once the PWDN function is enabled, and
after 13 million clock cycles (PLL internal frequency) the bridge is put in power-down
(tristate mode). There is also the possibility to change this behavior so that the power bridge
will be switched off immediately after the PWDN pin is tied to ground, without waiting for the
13 million clock cycles. The BRIDGOFF bit, when set, activates this function. Obviously the
immediate power-down will generate a pop noise at the output, therefore this procedure
must be used only in cases where pop noise is not relevant in the application. Note that this
feature works only for hardware PWDN assertion and not for a power-down applied through
the IIC interface. Refer to Section 6.30.5 if programming a different number of clock cycles is
needed.
Doc ID 018835 Rev 791/171
Register description: New MapSTA381BW
6.30.3 Channel PWM enable (CPWMEN) bit
This bit, when set, activates a mute output in case the volume reaches a value lower
than -76 dBFS.
Pin 42 (INTLINE), normally indicating a fault condition, using the following 3 register settings
can be reconfigured as a hardware pin enabler for an external headphone or line amplifier.
In particular the LPDE bit, when set, activates this function. Accordingly, the LPD value (0 or
1) is exported on pin 42 and in case of power-down assertion, pin 42 is tied to LPDP.
The LPDP bit, when set, negates the value programmed as the LPD value, refer to the
following table.
The assertion of PWDN activates a counter that, by default, after 13 million clock cycles puts
the power bridge in tristate mode, independently from the fade-out time. Using these
registers it is possible to program this counter according to the following table.
92/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Table 87.PNDLSL bits configuration
PNDLSL[2]PNDLSL[1]PNDLSL[2]Fade-out time
00
00
01
01
10
10
11
11 1
0Default time (13M PLL clock cycles)
1Default time divided by 2
0Default time divided by 4
1Default time divided by 8
0Default time divided by 16
1Default time divided by 32
0Default time divided by 64
Default time divided by 128
6.30.6 Short-circuit check enable bit
This bit, when enabled, will activate the short-circuit checks before any power bridge
activation (EAPD bit 0->1). See section Section 6.28: Short-circuit protection mode registers
SHOK (address 0x58) for more details.
6.31 Bad PWM detection registers (address 0x5E, 0x5F, 0x60)
The STA381BW implements a detection on PWM outputs able to verify if the output signal
has no zero-crossing in a configurable time window. This check can be useful to detect the
DC level in the PWM outputs. To be noted that the checks are performed on logic level PWM
(i.e. not the power bridge ones, nor the PWM on DDX3 and DDX4 IOs).
In case of ternary modulation, the detection threshold is computed as:
TH=[(BPTH*2+1)/128]*100%
If the measured PWM duty cycle is detected greater than or equal to TH for more than
BPTIM PWM periods, the corresponding PWM bit will be set in register 0x01.
In case of binary modulation, there are two thresholds:
TH1=[(64+BPTH)/128]*100%
TH2=[(64-BPTH)/128]*100%
In this case if the measured PWM duty cycle is outside the TH1-TH2 range for more than
BPTIM PWM periods, the corresponding bit will be set in register 0x4E.
The STA381BW implements an RMS-based zero-detect function (on serial input interface
data) able to detect in a very reliable way the presence of an input signal, so that the power
bridge outputs can be automatically connected to ground.
When active, the function will mute the output PWM when the input level becomes less than
“threshold - hysteresis”. Once muted, the PWM will be unmuted when the input level is
detected greater than “threshold + hysteresis”.
The measured level is then reported (for each input channel) on registers ZCCCFG1 ZCCCFG2, ZCCCFG3 - ZCCCFG4 according to the following equation:
Value_in_dB = 20*Log
Table 88.Zero-detect threshold
ZMTH[2:0]Equivalent input level (dB)
000-78
001-84
010-90
011-96
100-102
101-108
110-114
111-114
(Reg_value/(216*0.635))
10
94/171Doc ID 018835 Rev 7
STA381BWRegister description: New Map
Table 89.Zero-detect hysteresis
HSEL[1:0]Equivalent input level hysteresis(dB)
003
014
105
116
The thresholds and hysteresis table above can be overridden and the low-level threshold
and high-level threshold can be set by the MTH[21:0] bits.
To activate the manual thresholds the FINETH bit has to be set to ‘1’.
To configure the low threshold, the WTHL bit must be set to ‘1’ so that any write operation to
the MTH bits will set the low threshold.
To configure the low threshold, the WTHH bit must be set to ‘1’ so that any write operation to
the MTH bits will set the low threshold.
If the zero-mute block does not detect mute, it will mute the output when the current RMS
value falls below the low threshold.
If the zero-mute block does not detect mute, it will unmute the output when the current RMS
value rises above the high threshold.
Table 90.Manual threshold register 0x3F, 0x40 and 0x6F
D7D6D5D4D3D2D1D0
ReservedTReservedMTH[21:16]
00000000
D7D6D5D4D3D2D1D0
MTH[15:8]
00000000
D7D6D5D4D3D2D1D0
MTH[7:0]
00000000
Doc ID 018835 Rev 795/171
Register description: New MapSTA381BW
6.33 Headphone/Line out configuration register (address 0x66)
D7D6D5D4D3D2D1D0
HPLNReservedReservedReservedCPFENCPOKABFAULTDCROK
00100NANANA
Table 91.Headphone/Line out configuration bits
BitR/WRSTNameDescription
When F3X is connected to the internal HP/Line
driver this bit selects the gain of the F3X->analog
out path.
‘0’: HP out. When the MVOL+Channel Vol is
7R/W 0HPLN
3R/W0CPFEN
2RNA CPOK
1RNAABFAULT
0RNADCROK‘1’: Core supply OK
0 dBFs, a 0 dBFs input will generate a 40 mW
output on a 32 ohm load (+/- 3.3V supply).
‘1’: Line out. When the MVOL+Channel Vol is
0 dBFs, a 0 dBFs input will generate a 2 Vrms
output (+/- 3.3 V supply)
‘0’: Charge pump auto-enable when unmute
‘1’: Charge pump is always enabled
‘0’: Charge pump is not working
‘1’: Charge pump is working and it is OK
‘0’: No fault on class-AB
‘1’: Overcurrent fault detected on class-AB
The STA381BW implements an automatic CRC computation for the biquad and
MDRC/XOver coefficient memory (Ta bl e 7 3). Memory cell contents from address 0x00 to
0x27 will be bit XORed to obtain the BQCHKE checksum, while cells from 0x28 to 0x31 will
be XORed to obtain the XCCHKE checksum. Both checksums (24-bit wide) are exported on
2
I
C registers from 0x60 to 0x65. The checksum computation will start as soon as the BCGO
(for biquad RAM bank) or the XCGO bit (for MDRC/XOver coefficients) is set to 1. The
checksum is computed at the processing sample rate if the IR bits equal “01” or “10”,
otherwise the checksum is computed to half of the processing sample rate.
When BCCMP or XCCMP is set to ‘1’, the relative checksum (BQCHKE and XCCHKE) is
continuously compared with BQCHKR and XCCHKR respectively. If the checksum matches
its own reference value, the respective result bits (BCRES and XCRES) will be set to ‘0’.
The compare bits have no effect if the respective GO bit is not set.
In case of checksum errors (i.e. the internally computed didn’t match the reference), an
automatic device reset action can be activated. This function is enabled when the BCAUTO
or XCAUTO bit is set to ‘1’. The automatic reset bits have no effect if the respective compare
bits are not set.
The recommended procedure for automatic reset activation is the following:
●Download the set of coefficients (RAM locations 0x00…0x27)
●Download the externally computed biquad checksum into registers BQCHKR
●Enable the checksum of the biquad coefficients by setting the BCGO bit. The
checksum will start to be automatically computed by the STA381BW and its value
exposed on registers BQCHECKE. The checksum value is computed and updated.
●Enable the checksum comparison by setting the BCCMP bit. The internally computed
checksum will start to be compared with the reference one and the result will be
exposed on the BCRES bit. The following operation will be executed on each audio
frame:
if ((BQCHKE == BQCHKR))
{
BC_RES = 0;// Checksum is ok, reset the error bit
}
100/171Doc ID 018835 Rev 7
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.