AN-923: Designing a System Using the ADAU1701/ADAU1702 in Self-Boot Mode
Introduction
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.
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 self-booting, 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.
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.
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.
Software Setup
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.
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.