VS1011e
VS1011e - MP3 AUDIO DECODER
Features
•
Decodes MPEG 1.0 & 2.0 audio layer
III (MP3: CBR, VBR, ABR); layers I &
II (MP1, MP2) optional; WAV (PCM +
IMA ADPCM)
•
320 kbit/s MP3 with 12.0 MHz external
clock
•
Streaming support for all audio formats
•
Bass and treble controls
•
Operates with single 12..13 MHz or
24..26 MHz external clock
•
Internal clock doubler
•
Low-power operation
•
High-quality stereo DAC with no phase
error between channels
•
Stereo earphone driver capable of driv-
ing a 30
Ω
load
•
Separate 2.5..3.6 V operating voltages
for analog and digital
•
Serial control and data interfaces
•
Can be used as a slave co-processor
•
5.5 KiB On-chip RAM for user code /
data
•
SPI boot for standalone applications
•
New functions may be added with soft-
ware and 4 GPIO pins
•
Lead-free and RoHS-compliant packages
LQFP-48 and SOIC-28
Description
VS1011e is a single-chip MPEG audio (MP3)
decoder IC. It contains a high-performance,
low-power DSP core VS_DSP
4
, working mem-
ory, 5 KiB instruction RAM and 0.5 KiB data
RAM for user applications, serial control and
input data interfaces, 4 general purpose I/O
pins, as well as a high-quality variable-sample-
rate stereo DAC, followed by an earphone am-
plifier and a common buffer.
VS1011e receives its input bitstream through
a serial input bus, which it listens to as a
system slave. The input stream is decoded
and passed through a digital volume control
to an 18-bit oversampling, multi-bit, sigma-
delta DAC. The decoding is controlled via a
serial control bus. In addition to basic decod-
ing, it is possible to add application specific
features, like DSP effects, to the user RAM
memory.
VS1011e can boot directly from SPI EEPROM
to run standalone applications without a sep-
arate microcontroller.
VS1011
GPIO
4
GPIO
Stereo
DAC
Stereo Ear−
phone Driver
audio
L
R
output
X ROM
DREQ
SO
SI
SCLK
XCS
XDCS
Serial
Data/
Control
Interface
VSDSP
4
X RAM
Y ROM
Y RAM
Instruction
RAM
Instruction
ROM
Version: 1.23, 2017-09-08
1
VS1011e
Contents
VS1011
Table of Contents
List of Figures
1 Licenses
2 Disclaimer
3 Definitions
4 Characteristics & Specifications
4.1 Absolute Maximum Ratings . . . . . . . . .
4.2 Recommended Operating Conditions . . . .
4.3 Analog Characteristics . . . . . . . . . . . .
4.4 Power Consumption . . . . . . . . . . . . .
4.5 Digital Characteristics . . . . . . . . . . . . .
4.6 Switching Characteristics - Boot Initialization
5 Packages and Pin Descriptions
5.1 Packages . . . . . . . . . . . . . . .
5.1.1 LQFP-48 . . . . . . . . . .
5.1.2 SOIC-28 . . . . . . . . . .
5.2 Pin Descriptions . . . . . . . . . . . .
5.2.1 LQFP-48 Pin Descriptions
5.2.2 SOIC-28 Pin Descriptions
6 Connection Diagram, LQFP-48
CONTENTS
1
2
5
6
6
6
7
7
7
8
8
9
9
10
10
10
12
13
13
14
15
16
16
16
16
16
17
17
17
18
19
19
19
20
20
21
22
22
22
23
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7 SPI Buses
7.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2 SPI Bus Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2.1 VS10xx Native Modes (New Mode, recommended) . . . . . . . . . .
7.2.2 VS1001 Compatibility Mode (deprecated, do not use in new designs)
7.3 Serial Protocol for Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . .
7.3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.3.2 SDI in VS10xx Native Modes (New Mode, recommended) . . . . . .
7.3.3 SDI in VS1001 Compatibility Mode . . . . . . . . . . . . . . . . . . .
7.4 Data Request Pin DREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5 Serial Protocol for Serial Command Interface (SCI) . . . . . . . . . . . . . . . .
7.5.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5.2 SCI Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5.3 SCI Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.6 SPI Timing Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.7 SPI Examples with SM_SDINEW and SM_SDISHARED set . . . . . . . . . . .
7.7.1 Two SCI Writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.7.2 Two SDI Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.7.3 SCI Operation in Middle of Two SDI Bytes . . . . . . . . . . . . . . .
Version: 1.23, 2017-09-08
2
VS1011e
8 Functional Description
8.1 Main Features . . . . . . . . . . . . . . . . . . . . . .
8.2 Supported Audio Codecs . . . . . . . . . . . . . . . .
8.2.1 Supported MP1 (MPEG layer I) Formats .
8.2.2 Supported MP2 (MPEG layer II) Formats .
8.2.3 Supported MP3 (MPEG layer III) Formats
8.2.4 Supported RIFF WAV Formats . . . . . . .
8.3 Data Flow of VS1011e . . . . . . . . . . . . . . . . .
8.4 Serial Data Interface (SDI) . . . . . . . . . . . . . . .
8.5 Serial Control Interface (SCI) . . . . . . . . . . . . .
8.6 SCI Registers . . . . . . . . . . . . . . . . . . . . . .
8.6.1 SCI_MODE (RW) . . . . . . . . . . . . . .
8.6.2 SCI_STATUS (RW) . . . . . . . . . . . . .
8.6.3 SCI_BASS (RW) . . . . . . . . . . . . . .
8.6.4 SCI_CLOCKF (RW) . . . . . . . . . . . . .
8.6.5 SCI_DECODE_TIME (RW) . . . . . . . .
8.6.6 SCI_AUDATA (RW) . . . . . . . . . . . . .
8.6.7 SCI_WRAM (RW) . . . . . . . . . . . . . .
8.6.8 SCI_WRAMADDR (RW) . . . . . . . . . .
8.6.9 SCI_HDAT0 and SCI_HDAT1 (R) . . . . .
8.6.10 SCI_AIADDR (RW) . . . . . . . . . . . . .
8.6.11 SCI_VOL (RW) . . . . . . . . . . . . . . .
8.6.12 SCI_AICTRL[x] (RW) . . . . . . . . . . . .
9 Operation
9.1 Clocking . . . . . . . . .
9.2 Hardware Reset . . . . .
9.3 Software Reset . . . . .
9.4 SPI Boot . . . . . . . . .
9.5 Play/Decode . . . . . . .
9.6 Feeding PCM data . . .
9.7 SDI Tests . . . . . . . .
9.7.1 Sine Test . . .
9.7.2 Pin Test . . .
9.7.3 Memory Test .
9.7.4 SCI Test . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
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VS1011e Memory Map . . . . . .
10.4 SCI Registers . . . . . . . . . . .
10.5 Serial Data Registers . . . . . . .
10.6 DAC Registers . . . . . . . . . . .
10.7 GPIO Registers . . . . . . . . . .
10.8 Interrupt Registers . . . . . . . .
10.9 System Vector Tags . . . . . . . .
10.9.1 AudioInt, 0x20 . . . . .
10.9.2 SciInt, 0x21 . . . . . .
10.9.3 DataInt, 0x22 . . . . .
10.9.4 UserCodec, 0x0 . . . .
Version: 1.23, 2017-09-08
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
VS1011e
10.10 System Vector Functions . . . .
10.10.1 WriteIRam(), 0x2 . .
10.10.2 ReadIRam(), 0x4 . .
10.10.3 DataBytes(), 0x6 . .
10.10.4 GetDataByte(), 0x8 .
10.10.5 GetDataWords(), 0xa
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
.
.
.
.
.
.
44
44
44
44
45
45
46
46
46
47
49
11 VS1011 Version Changes
11.1 Changes Between VS1011b and VS1011e, 2005-07-13 . . . . . . . . . . . . .
11.2 Migration Checklist from VS1011b to VS1011e, 2005-07-13 . . . . . . . . . . .
12 Document Version Changes
13 Contact Information
Version: 1.23, 2017-09-08
4
VS1011e
List of Figures
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Pin Configuration, LQFP-48. . . . . . . . . . . .
Package Outline, LQFP-48. . . . . . . . . . . . .
Pin Configuration, SOIC-28. . . . . . . . . . . . .
Typical Connection Diagram Using LQFP-48. . .
SDI Timing Diagram. . . . . . . . . . . . . . . . .
BSYNC Signal - one byte transfer. . . . . . . . .
BSYNC Signal - two byte transfer. . . . . . . . .
SCI Word Read . . . . . . . . . . . . . . . . . . .
SCI Word Write . . . . . . . . . . . . . . . . . . .
SPI Timing Diagram. . . . . . . . . . . . . . . . .
Two SCI Operations. . . . . . . . . . . . . . . . .
Two SDI Bytes. . . . . . . . . . . . . . . . . . . .
Two SDI Bytes Separated By an SCI Operation. .
Data Flow of VS1011e. . . . . . . . . . . . . . .
User’s Memory Map. . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
LIST OF FIGURES
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10
11
12
15
17
18
18
20
20
21
22
22
23
27
40
Version: 1.23, 2017-09-08
5