VS1002d
VS1002
D
VS1002d - MP3 AUDIO CODEC
Features
•
Decodes MPEG 1.0 & 2.0 audio layer III (CBR
+ VBR); WAV and PCM files
•
Encodes ADPCM from microphone input
•
Streaming support for MP3 and WAV
•
Bass control
•
Operates with single a clock 12..13 MHz or
24..26 MHz.
•
Internal clock doubler
•
Low-power operation
•
High-quality on-chip stereo DAC with no
phase error between channels
•
Stereo earphone driver capable of driving a
30Ω load
•
Separate 2.5 V..3.6 V operating voltages for
analog and digital
•
7.5 KiB On-chip RAM for user code / data
•
Serial control and data interfaces
•
Can be used as a slave co-processor
•
SPI flash boot for special applications
•
UART for debugging purposes
•
New functions may be added with software
and 4 GPIO pins
•
Lead-free RoHS-compliant packages
Description
VS1002d is a single-chip MP3 audio decoder. It
contains a high-performance, low-power DSP pro-
cessor core VS DSP
4
, working data memory, 5
KiB instruction RAM and 2.5 KiB data RAM for
user applications, serial control and input data in-
terfaces, 4 general purpose I/O pins, an UART, as
well as a high-quality variable-sample-rate mono
ADC and stereo DAC, followed by an earphone
amplifier and a ground buffer.
VS1002d 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 over-
sampling, multi-bit, sigma-delta DAC. The decod-
ing is controlled via a serial control bus. In addi-
tion to the basic decoding, it is possible to add
application specific features, like DSP effects, to
the user RAM memory.
audio
VS1002
MIC AMP
4
GPIO
Mono
ADC
Stereo
DAC
Stereo Ear−
phone Driver
audio
L
R
output
GPIO
X ROM
DREQ
SO
SI
SCLK
XCS
XDCS
Serial
Data/
Control
Interface
X RAM
VSDSP
4
Y ROM
RX
TX
UART
Y RAM
Instruction
RAM
Instruction
ROM
Version 1.0,
2005-04-27
1
VLSI
Solution
y
VS1002d
VS1002
D
CONTENTS
Contents
1 License
9
2
Disclaimer
9
3
Definitions
9
4
Characteristics & Specifications
4.1
4.2
4.3
4.4
4.5
4.6
Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recommended Operating Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Digital Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Switching Characteristics - Boot Initialization . . . . . . . . . . . . . . . . . . . . . . .
10
10
10
11
11
12
12
5
Packages and Pin Descriptions
5.1
Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1
5.1.2
5.2
LQFP-48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BGA-49 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
13
13
13
14
LQFP-48 and BGA-49 Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Connection Diagram, LQFP-48
15
7
SPI Buses
7.1
7.2
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Bus Pin Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2.1
VS1002 Native Modes (New Mode) . . . . . . . . . . . . . . . . . . . . . . . .
16
16
16
16
Version 1.0,
2005-04-27
2
VLSI
Solution
y
VS1002d
7.2.2
VS1002
D
CONTENTS
VS1001 Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
17
17
17
17
18
18
18
19
19
20
21
21
21
21
7.3
7.4
Data Request Pin DREQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Protocol for Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . . . . . .
7.4.1
7.4.2
7.4.3
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SDI in VS1002 Native Modes (New Mode) . . . . . . . . . . . . . . . . . . . .
SDI in VS1001 Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . .
7.5
Serial Protocol for Serial Command Interface (SCI) . . . . . . . . . . . . . . . . . . . .
7.5.1
7.5.2
7.5.3
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.6
7.7
SPI Timing Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Examples with SM SDINEW and SM SDISHARED set . . . . . . . . . . . . . . .
7.7.1
7.7.2
7.7.3
Two SCI Writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two SDI Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Operation in Middle of Two SDI Bytes . . . . . . . . . . . . . . . . . . . .
8
Functional Description
8.1
8.2
Main Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Supported Audio Codecs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.2.1
8.2.2
8.3
8.4
8.5
8.6
Supported MP3 (MPEG layer III) Formats . . . . . . . . . . . . . . . . . . . .
Supported RIFF WAV Formats . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
22
22
22
23
23
24
25
25
Data Flow of VS1002d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Data Interface (SDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Control Interface (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Version 1.0,
2005-04-27
3
VLSI
Solution
y
VS1002d
8.6.1
8.6.2
8.6.3
8.6.4
8.6.5
8.6.6
8.6.7
8.6.8
8.6.9
VS1002
D
CONTENTS
SCI MODE (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI STATUS (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI BASS (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI CLOCKF (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI DECODE TIME (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI AUDATA (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI WRAM (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI WRAMADDR (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI HDAT0 and SCI HDAT1 (R) . . . . . . . . . . . . . . . . . . . . . . . . .
26
28
28
28
29
29
29
30
30
32
32
32
8.6.10 SCI AIADDR (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.6.11 SCI VOL (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.6.12 SCI AICTRL[x] (RW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Operation
9.1
9.2
9.3
9.4
9.5
9.6
9.7
Clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SPI Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Play/Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Feeding PCM data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SDI Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7.1
9.7.2
9.7.3
9.7.4
Sine Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pin Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCI Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
33
33
33
34
34
34
35
35
35
36
36
Version 1.0,
2005-04-27
4
VLSI
Solution
y
VS1002d
VS1002
D
CONTENTS
10 VS1002d Registers
10.1 Who Needs to Read This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 The Processor Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.3 VS1002d 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 A/D Modulator Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.10Watchdog
v1.0 2002-08-26
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.10.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11UART
v1.0 2002-04-23
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.2 Status UARTx STATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.3 Data UARTx DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.4 Data High UARTx DATAH . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.5 Divider UARTx DIV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.11.6 Interrupts and Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12Timers
v1.0 2002-04-23
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12.2 Configuration TIMER CONFIG . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12.3 Configuration TIMER ENABLE . . . . . . . . . . . . . . . . . . . . . . . . . .
10.12.4 Timer X Startvalue TIMER Tx[L/H] . . . . . . . . . . . . . . . . . . . . . . .
37
37
37
37
37
38
39
39
40
41
42
42
43
43
43
44
44
44
45
46
46
46
47
47
Version 1.0,
2005-04-27
5