AN-923 APPLICATION NOTE

advertisement
AN-923
APPLICATION NOTE
One Technology Way • P.O. Box 9106 • Norwood, MA 02062-9106, U.S.A. • Tel: 781.329.4700 • Fax: 781.461.3113 • www.analog.com
Designing a System Using the ADAU1701/ADAU1702 in Self-Boot Mode
by Jerad Lewis
The ADAU1701/ADAU1702 can be used in a system without a
microcontroller by using the self-boot feature. This allows the
ADAU1701/ADAU1702 to boot itself as an I2C master from an
external EEPROM at power-up or reset. In the absence of a microcontroller, real-time control of the DSP is achieved by using the
multipurpose pins with buttons, switches, potentiometers, or other
control devices. When designing a self-booting system with these
ICs, some consideration must be taken for in-system programming
and tuning from the SigmaStudio™ graphical programming tool.
HARDWARE SETUP
The circuit in Figure 3 shows the ADAU1701/ADAU1702 set
up in self-boot mode in an application circuit connected to an
EEPROM. The maximum necessary memory size for the
program, parameters, and interface registers of the ADAU1701
is 9248 bytes, or just over 8.5 kB. The ADAU1702 can use a
maximum of 6688 bytes for its program, parameters, and
interface registers. These numbers do not include register
settings or overhead bytes, but such factors do not add a
significant number of bytes. In addition, this much memory is
only needed if the program RAM (1024 × five bytes), parameter
RAM (1024 × four bytes), and interface registers (8 × four bytes)
are completely full. Most applications do not use the full program
and parameter RAMs; therefore, 8 kB EEPROM is sufficient.
The ADAU1701/ADAU1702 reads from EEPROM Chip
Address 0xA1. The LSBs of the addresses of some EEPROMs
are pin configurable; in most cases, these pins should be tied
low to set this address.
The ADDRx pins have different functions when the chip is in
this mode; therefore, these pins’ settings are ignored.
The ADAU1701/ADAU1702 does not self-boot if WP is set low.
Holding this pin low allows the EEPROM to be programmed
in-circuit. The WP pin is pulled low (it typically has a resistor
pull-up) to enable writes to the EEPROM, but this in turn
disables the self-boot function until the WP pin is returned
high. When the application circuit is in operation, as it will be
in the final product, the WP pin should be pulled high, as
shown in Figure 1.To program the ADAU1701/ADAU1702 and
burn the EEPROM, the WP signal should be set low when
SigmaStudio is connected to the I2C bus through the USB
adapter board. The PC-connected setup is illustrated in Figure 2.
When designing an application schematic, a jumper header
should be put on the WP trace so that it can be easily tied to
ground, and a 3-pin (SDA, SCL, GND) header should be
connected to the I2C port for the programming connection.
3.3V
ADAU1701/
ADAU1702
3.3V
SELFBOOT
WP
WP
EEPROM
I2 C
SDA
CONTROL
SCL
PORT
SDA
06819-001
INTRODUCTION
SCL
Figure 1. ADAU1701/ADAU1702 Self-Boot Application Circuit
3.3V
ADAU1701/
ADAU1702
Rev. 0 | Page 1 of 4
SELFBOOT
WP
WP
EEPROM
I2C
SDA
CONTROL
SCL
PORT
SDA
SCL
Figure 2. ADAU1701/ADAU1702 Self-Boot Circuit with PC Connected
06819-002
A self-boot operation is triggered on the rising edge of RESET
when the SELFBOOT and WP pins are set high. The ADAU1701
reads the program, parameters, and register settings from the
EEPROM. After the ADAU1701/ADAU1702 finishes selfbooting, additional messages can be sent to the ADAU1701/
ADAU1702 on the I2C bus, although this typically is not
necessary in a self-booting application. In self-booting mode,
the I2C device address is 0x68 for a write and 0x69 for a read.
3.3V
AN-923
The writeback feature of the ADAU1701/ADAU1702 allows
parameter data to be saved in the EEPROM before power-down
so that settings can be retained from one power cycle to the
next. A writeback occurs when the WB pin is triggered and data
is written to the EEPROM from the ADAU1701/ADAU1702.
This function is typically used to save the volume setting and
other parameter settings to the EEPROM just before power is
removed from the system. A rising edge on the WB pin triggers
a writeback when the device is in self-boot mode, unless a
message to set the WB to the falling edge sensitive is contained
in the self-boot message sequence. Only one writeback takes place
unless a message to set multiple writebacks is contained in the
self-boot message sequence. The WP pin of the ADAU1701/
ADAU1702 is pulled low when a writeback is triggered to allow
writing to the EEPROM.
The ADAU1701/ADAU1702 is only capable of writing back
the contents of the interface registers to the EEPROM. These
registers are usually set by the DSP program but can also be
written to directly after setting Bit 6 of the core control register.
The parameter settings that should be saved are configured in
SigmaStudio.
The maximum number of bytes that is written back from the
ADAU1701/ADAU1702 is 35 (eight 4-byte interface registers
plus three bytes of EEPROM-addressing overhead). With SCL
running at 384 kHz, the writeback operation takes approximately
729 μs to complete after being triggered. Ensure that sufficient
power is available to the system to allow enough time for a
writeback to complete, especially if the WB signal is triggered
from a falling power supply voltage. See the ADAU1701 data
sheet and the ADAU1702 data sheet for more in-depth
information about writeback.
The ADAU1701 is a master on the I2C bus during self-boot and
writeback. Although it is uncommon for an application using
self-boot to also have a microcontroller connected to the
control lines, care should be taken that no other device tries to
write to the I2C bus during self-boot or writeback. The ADAU1701
generates SCL at 8 × fs; therefore, for a fs of 48 kHz, SCL runs at
384 kHz. SCL has a duty cycle of 3/8 in accordance with the I2C
specification.
Rev. 0 | Page 2 of 4
AN-923
DVDD
C11
C15
+
100nF
C12
10µF
C16
100nF
C13
100nF
C17
100nF
C14
+
100nF
10µF
DVDD
C18
C
+
10µF
C19
22pF
MP0
MP1
MP2
MP3
MP4
MP5
MP6
MP7
MP8
MP9
MP10
MP11
100Ω
11
10
29
28
8
9
15
14
27
26
16
19
31
32
R3
MP0
MP1
MP2
MP3
MP4
MP5
MP6
MP7
MP8
MP9
MP10
MP11
C5
100nF
+
17
34
36
48
13
24
PVDD
AVDD
AVDD
DVDD
DVDD
U1
ADAU1701/
ADAU1702
VOUT0
VOUT1
VOUT2
VOUT3
ADDR0
ADDR1/CDATA/WB
CLATCH/WP
SDA/COUT
SCL/CCLK
SELFBOOT
RESET
RSVD
PLL_MODE0
PLL_MODE1
OSCO
MCLKI
CM
C4
10µF
VDRIVE
ADC1
ADC0
3
ADC_RES
47
40 FILTA
18kΩ
C3
100nF
+
4
R5
1kΩ
46
45
44
43
7
20
21
22
23
DAC0_OUT
DAC1_OUT
DAC2_OUT
DAC3_OUT
DVDD
R7
2kΩ
DVDD
R8
2kΩ
R9
2kΩ
WB_TRIGGER
5
6
7
8
6
5
30
38
39
RESET
FILTD 41
PLL_LF 35
C9
3.3nF
C1
100nF
+
C10
56nF
R6
475Ω
C6
47µF
J1
SELF-BOOT
EEPROM
E2PROM
SDA GND
A2
SCL
A1
WP
A0
VCC
4
3
2
1
U2
C2
10µF
DVDD
06819-003
22pF
Y1
C8 12.288MHz
18kΩ
2
DVDD
E
1
AGND
37 AGND
42 AGND
12
DGND
25
DGND
33
PGND
18kΩ
R2
AIN1
R4
18
R1
AIN0
C7
B
IOVDD
100nF
Q1
Figure 3. ADAU1701/ADAU1702 Self-Boot Schematic
Rev. 0 | Page 3 of 4
AN-923
Both the audio signal flow design and downloading and
EEPROM programming are done in the SigmaStudio graphical
programming tool. When a PC is connected to an application
circuit, users can write to and control the SigmaDSP® just as is
done on the evaluation board (see Figure 2). When the signal
flow is finalized, it can be loaded directly into the EEPROM
over this connection. Once the PC is disconnected and the
connection between WP and ground is broken, the system
operates in self-boot mode the next time it comes out of reset.
The EEPROM can be easily loaded from SigmaStudio. After a
design is compiled and downloaded, right-click the ADAU1701/
ADAU1702 IC in the Hardware Configuration window and
select Write Latest Compilation to E2PROM, as shown in
Figure 4. A progress bar appears and when it completes, the full
program, parameters, and register set are saved in the E2PROM
on the board.
06819-004
SOFTWARE SETUP
Figure 4. SigmaStudio Project
The EEPROM image file can also be written from the EEPROM
Loader/Reader tool in SigmaStudio.
OTHER DOCUMENTATION
Further information about the ICs used can be found in their
respective data sheets. The ADAU1701/ADAU1702 data sheets
include a full explanation of how to use the IC in SPI and I2C
control modes. A full help file is included in the SigmaStudio
tool. This describes how to use the software, explains the
included signal processing blocks, and helps the user to
integrate the software with the hardware applications.
©2007 Analog Devices, Inc. All rights reserved. Trademarks and
registered trademarks are the property of their respective owners.
AN06819-0-7/07(0)
Rev. 0 | Page 4 of 4
Download