AVR32788: AVR 32 How to use the SSC in I2S mode. 32-bit Microcontrollers. Application Note. Features. 1 Introduction



Similar documents
AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1900: Getting started with ATxmega128A1 on STK bit Microcontrollers. Application Note. 1 Introduction

AVR32701: AVR32AP7 USB Performance. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1600: Using the XMEGA Quadrature Decoder. 8-bit Microcontrollers. Application Note. Features. 1 Introduction. Sensors

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Using CryptoMemory in Full I 2 C Compliant Mode. Using CryptoMemory in Full I 2 C Compliant Mode AT88SC0104CA AT88SC0204CA AT88SC0404CA AT88SC0808CA

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

AVR353: Voltage Reference Calibration and Voltage ADC Usage. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR2006: Design and characterization of the Radio Controller Board's 2.4GHz PCB Antenna. Application Note. Features.

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR287: USB Host HID and Mass Storage Demonstration. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

AVR1003: Using the XMEGA Clock System. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Application Note. 8-bit Microcontrollers. AVR272: USB CDC Demonstration UART to USB Bridge

AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC. 8-bit Microcontrollers. Application Note. Features.

Atmel AVR1017: XMEGA - USB Hardware Design Recommendations. 8-bit Atmel Microcontrollers. Application Note. Features.

AT91SAM ARM-based Flash MCU. Application Note

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

General Porting Considerations. Memory EEPROM XRAM

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

AVR2004: LC-Balun for AT86RF230. Application Note. Features. 1 Introduction

Application Note. Atmel ATSHA204 Authentication Modes. Prerequisites. Overview. Introduction

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

Application Note. 8-bit Microcontrollers. AVR293: USB Composite Device

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary. Features. Applications. 1. Description

USER GUIDE EDBG. Description

APPLICATION NOTE. Atmel LF-RFID Kits Overview. Atmel LF-RFID Kit. LF-RFID Kit Introduction

8051 Flash Microcontroller. Application Note. A Digital Thermometer Using the Atmel AT89LP2052 Microcontroller

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

APPLICATION NOTE. Atmel AT02985: User s Guide for USB-CAN Demo on SAM4E-EK. Atmel AVR 32-bit Microcontroller. Features. Description.

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AT04389: Connecting SAMD20E to the AT86RF233 Transceiver. Atmel SAMD20. Description. Features

Application Note. Atmel CryptoAuthentication Product Uses. Atmel ATSHA204. Abstract. Overview

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector

Application Note. C51 Bootloaders. C51 General Information about Bootloader and In System Programming. Overview. Abreviations

AVR245: Code Lock with 4x4 Keypad and I2C LCD. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

AT91 ARM Thumb Microcontrollers. AT91SAM CAN Bootloader. AT91SAM CAN Bootloader User Notes. 1. Description. 2. Key Features

256K (32K x 8) Battery-Voltage Parallel EEPROMs AT28BV256

How To Design An Ism Band Antenna For 915Mhz/2.4Ghz Ism Bands On A Pbbb (Bcm) Board

AVR32110: Using the AVR32 Timer/Counter. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AT91 ARM Thumb Microcontrollers. Application Note. Interfacing a PC Card to an AT91RM9200-DK. Introduction. Hardware Interface

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

AT88CK490 Evaluation Kit

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter

AVR ONE!... Quick-start Guide. EVK Windows 32104B AVR ONE! 02/10

Introducing a platform to facilitate reliable and highly productive embedded developments

Application Note. 1. Introduction. 2. Associated Documentation. 3. Gigabit Ethernet Implementation on SAMA5D3 Series. AT91SAM ARM-based Embedded MPU

Programming Audio Applications in the i.mx21 MC9328MX21

USER GUIDE. ZigBit USB Stick User Guide. Introduction

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

AT89C5131A Starter Kit... Software User Guide

AN3998 Application note

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

How to Calculate the Capacitor of the Reset Input of a C51 Microcontroller 80C51. Application Note. Microcontrollers. Introduction

AVR32100: Using the AVR32 USART. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

8-bit RISC Microcontroller. Application Note. AVR236: CRC Check of Program Memory

APPLICATION NOTE. Atmel AVR600: STK600 Expansion, Routing and Socket Boards. Atmel Microcontrollers. Introduction

APPLICATION NOTE. Secure Personalization with Transport Key Authentication. ATSHA204A, ATECC108A, and ATECC508A. Introduction.

Flexible Active Shutter Control Interface using the MC1323x

8-bit Microcontroller. Application Note. AVR314: DTMF Generator

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

Software Real Time Clock Implementation on MC9S08LG32

APPLICATION NOTE. Authentication Counting. Atmel CryptoAuthentication. Features. Introduction

AN3332 Application note

APPLICATION NOTE. AT03155: Real-Time-Clock Calibration and Compensation. SAM3 / SAM4 Series. Scope

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

AVR1324: XMEGA ADC Selection Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR442: PC Fan Control using ATtiny13. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AN3252 Application note

64K (8K x 8) Parallel EEPROM with Page Write and Software Data Protection AT28C64B

Atmel AVR4027: Tips and Tricks to Optimize Your C Code for 8-bit AVR Microcontrollers. 8-bit Atmel Microcontrollers. Application Note.

Atmel SMART ARM Core-based Embedded Microprocessors

8-bit Microcontroller. Application Note. AVR222: 8-point Moving Average Filter

Quick Start Guide. CAN Microcontrollers. ATADAPCAN01 - STK501 CAN Extension. Requirements

APPLICATION NOTE. RF System Architecture Considerations ATAN0014. Description

Quest vworkspace Virtual Desktop Extensions for Linux

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary

AN4646 Application note

Atmel Norway XMEGA Introduction

Transcription:

AVR32788: AVR 32 How to use the SSC in I2S mode Features I²S protocol overview I²S on the AVR32 I²S sample rate configurations Example of use with AT32UC3A on EVK1105 board 32-bit Microcontrollers Application Note 1 Introduction This application note describes how the I²S protocol is handled on AVR32 devices and gives important information about how to get the best configuration for different sample rates. Rev.

2 I²S protocol overview Inter-IC Sound bus (I²S) is a serial bus interface that is used to transport digital sound samples between different devices like A/D converters or digital signal processors. The protocol uses 3 lines to transport the data from a device to another (clock line, data line and word select line). As in most communication protocols, this protocol needs a master and a slave to operate. The role of the master is to provide the clock and word select lines. Figure 2-1 I²S protocol signal routing The Master is the transmitter The Slave is the transmitter The Controller is the master Master D C WS Slave Master D C WS Slave Slave D C WS Slave C: Clock line, WS: Word Select line, D: Data line Controller The clock is operating at a frequency which is a multiple of the sample rate of the audio stream. This frequency depends also on the number of bits per sample and the number of channels. For example, a stereo audio stream with samples using 16 bits of precision and with a sampling frequency of 44.1KHz would have to use a clock rated at 1,4112 MHz to transport this audio stream. (2 (stereo) x 16 (precision) x 44100 (Fs) = 1411200 Hz). The data is fed on the data line at the rate of the clock line with one bit clock delay. It is transmitted in Little-Endian format (MSB first) and there is no limitation on the sample length but usually it uses a 16/20/24 or 32 bits format. The word select line is used as a control signal. It tells the slave which channel the sample is designed for (left or right channel). During the transmission of one sample this line is either high or low with one clock ahead. This allows both the transmitting and receiving devices to have different sample length but also to not care about the audio precision of the remote device. Figure 2-2 I²S protocol waveforms 2 AVR32788 Note that the word select line can have a different length (in term of bit clock), than the data resolution (sample precision). If the word select s length is smaller, then the

AVR32788 data will be truncated and only the most significant bits will be kept on the data line. In opposite, if the word select s length is greater, the rest of the data bit will be fed with zeros, which will automatically cast the sample precision to the appropriate resolution thanks to the endianness of the data. This feature makes it possible to mix and match components of varying precision without reconfiguration. Figure 2-3 I²S protocol waveforms WS length smaller than Data length Figure 2-4 I²S protocol waveforms WS length greater than Data length 3 I²S interface 3.1 Basic interface The basic interface consists of three signals: Bit-clock Data line: Word select line: This line has the frequency of the sample rate since it toggles between the left and the right channel data. This interface can be provided by the SSC module on AVR32 devices. 3.2 Systems with master clock In addition to the basic I²S interface very often a master clock is required that must run at a multiple of the sample rate. Common ratios are e.g. 256 and 384. The master clock must be synchronous to the other signals of the I²S interface but there is usually no phase relationship. This means that the clock can be generated by other hardware modules that have no relation to the I²S protocol handling but they their clock must be synchronous. 3

4 I²S on AVR32 4.1 Basic I²S interface 4.1.1 Bit-clock generation The basic I²S interface can be emulated by the SSC module on the AVR32. This module is capable to handle the I²S protocol in hardware. The bit-clock for the I²S protocol is generated in the SSC module and is based on a counter. The input to the counter can be an internal or external source. The internal source is provided by the bus the SSC module is connected to which is e.g. PBA on the UC3A. If the clock divider is used it divides the clock first by ½ and this is fed into the counter. The pre-scaling is done to ensure a 50% duty cycle. Figure 4-1 SSC clock generation Following relative error rates are expected if a clock of 62.0928 MHz (5.5 * 11.2896MHz) is used as the input to the SSC module and the stereo samples are 16- bits. Relative error % Musical interval (semitones Table 4-1 Relative error rates for the bit-clock Sample rate (Hz) Bit-clock (Hz) Actual generated bitclock 8000 256000 256582 0.23 0.039 11025 352800 352800 0 0 16000 512000 508957-0.59-0.130 22050 705600 705600 0 0 32000 1024000 1034880 1.06 0.138 44100 1411200 1411200 0 0 48000 1536000 1552320 1.06 0.138 88200 2822400 2822400 0 0 96000 3072000 3104640 1.06 0.138 4.2 Generating a master clock for I²S The SSC module that is used to emulate the I²S protocol does not provide a master clock. Because of that this clock must be generated elsewhere. Some possible clock sources are a generic clock, a timer/counter or a PWM module. The generic clock is the recommended way to generate the master clock since it offers more options to choose from source clocks like oscillators and PLLs. 4 AVR32788

AVR32788 Because the master clock must be synchronous to the sample rate both clock sources to the generic clock and to the SSC module must have the same source. This inflexibility leaves to a higher relative error rate as shown in. The table assumes that the external DAC needs a master clock that is 256 times the sample rate (implies 16-bit samples) and the source clock of the SSC and the generic clock is 45.1584MHz. Table 4-2 Relative error rates Sample Actual rate (Hz) generated Relative error % Musical interval (semitones sample rate (Hz) 8000 8018 0.23 0.04 11025 11025 0 0 16000 14700-8.13-1.47 22050 22050 0 0 32000 29400-8.13-1.47 44100 44100 0 0 48000 44100-8.13-1.47 88200 88200 0 0 96000 88200-8.13-1.47 Since the SSC module derives its clock internally only from the peripheral bus, a change to other clock sources is not the best approach to provide better error rates for other sampling rates, since the whole system clock needs to be changed. This will affect most of the modules that are connected to the different system clocks and these would need a re-configuration. 4.3 Generating a master clock and an I²S clock with the same oscillator A better solution is to output the generic clock on a pin and route the clock to the RX- Clock pin or even the TX-Clock pin (bit-clock output) of the of the SSC module. The TX-Clock pin can only be used if the external DAC device does not need the bit-clock. This approach makes the SSC module independent of the peripheral clock and now it is possible to generate sample rates from different system clocks. Note that on the AVR32, this will involve the use of 2 internal generic clocks fed by the same oscillator: one to generate the master clock and one to feed the RX-Clock pin. Figure 4-2 Optimal I²S generation with the AVR32 For example a system has the following constellation: Oscillator 0 (OSC0) with 12MHz 5

Oscillator 1 (OSC1) with 11.289600MHz PLL0 fed from OSC1 with 62.092MHz PLL1 fed from OSC0 with 48MHz These settings are not optimum but they are available on the EVK1105 and shall serve as an example. Table 4-2 Relative error rates for the bit-clock using 12MHz (OSC0) and 11.2896MHz (OSC1) crystals Sample Actual rate (Hz) generated Used clock Relative error % Musical interval (semitones sample rate (Hz) 8000 8085 PLL0 1.06 0.04 11025 11025 OSC1 0 0 16000 15625 PLL1-2.34-0.14 22050 22050 OSC1 0 0 24000 24255 PLL0 1.06 0.04 32000 31250 PLL1-2.34-0.14 44100 44100 OSC1 0 0 48000 46875 PLL1-2.34-0.14 By replacing the 12MHz crystal by a 14.7456MHz crystal, the settings are optimum for common sampling rates. Then the oscillators configuration becomes: Oscillator 0 (OSC0) with 14.7456MHz Oscillator 1 (OSC1) with 11.289600MHz PLL0 fed from OSC0 with 110.592 MHz PLL1 fed from OSC0 with 47.9232MHz Table 4-3 Relative error rates for the bit-clock using 14.7456MHz (OSC0) and 11.2896MHz (OSC1) crystals Sample Actual rate (Hz) generated Used clock Relative error % sample rate (Hz) 8000 8000 PLL0 0 0 11025 11025 OSC1 0 0 16000 16000 PLL0 0 0 22050 22050 OSC1 0 0 24000 24000 PLL0 0 0 32000 32000 PLL0 0 0 44100 44100 OSC1 0 0 48000 48000 PLL0 0 0 Musical interval (semitones Note that with this configuration, the USB can be fed with a 47.9232MHz clock signal using PLL1. The closet achievable CPU frequency which can be generated is 55.296MHz. 6 AVR32788

AVR32788 4.4 Software configuration 4.4.1 Using the I²S driver from the Software Framework On the AVR32, the SSC peripheral is used to emulate the I²S protocol. The SSC to I²S driver provides a basic interface to initialize, control and send a sample through the serial bus line. This driver is located in the Software Framework under /DRIVERS/SSC/I2S/. At first the module has to be initialized with the function ssc_i2s_init. This function takes in parameters the sample frequency of the audio stream (usually 32000/44100 or 48000Hz), the data bit resolution, also called the sample precision (usually 16/20/24 or 32 bits), the frame bit resolution which is the word select bit clock count (usually the same length as the data bit resolution) and also the PBA frequency. An I²S mode must also be specified to configure the SSC module and it can be one of the following modes: SSC_I2S_MODE_STEREO_OUT: Two output channels. SSC_I2S_MODE_STEREO_OUT_EXT_CLK: Two output channels sampled with an external clock received from the RX Clock line. For this particular mode, the PBA frequency passed in parameter to the ssc_i2s_init function will be ignored. SSC_I2S_MODE_SLAVE_STEREO_OUT: Two output channels controlled by the DAC. SSC_I2S_MODE_STEREO_OUT_MONO_IN: Two output, one input channel. This mode uses two I²S buses. SSC_I2S_MODE_RIGHT_IN: Right channel in. Used because one SSC only can manage one input channel at a time. A simple API can be used to send a sample on the I²S bus, ssc_i2s_transfer, but it is recommended to use a PDCA channel in order to free CPU resources. This can be done using the following routine: // Disable interrupts if ((global_interrupt_enabled = Is_global_interrupt_enabled())) Disable_global_interrupt(); // Wait for the next frame synchronization event // to avoid channel inversion if the previous PDCA transfer // is already completed if (pdca_get_transfer_status(ssc_tx_pdca_channel) & PDCA_TRANSFER_COMPLETE) { while (gpio_get_pin_value(ssc_tx_frame_sync_pin)); while (!gpio_get_pin_value(ssc_tx_frame_sync_pin)); } // Load the data to be transferred onto the PDCA channel pdca_reload_channel(ssc_tx_pdca_channel, data, sizeof(data)); // Re-enable the interrupts if (global_interrupt_enabled) Enable_global_interrupt(); 7

4.4.2 Configuring the I²S on the EVK1105 board For a complete list of the functions provided by this driver, please refer directly to the ssc_i2s.h file. The EVK1105 board uses a TLV320AIC23B I²S audio codec to output the audio stream. By default, the audio player application (please refer to the application note AVR32709 for more information) is configured to use the PBA frequency in order to generate the I²S clock signal while a generic clock is used to generate the master clock signal to feed the I²S audio codec. 4.4.2.1 Using the TLV320AIC23B codec with the 11.2896MHz crystal This is the default configuration. It provides optimal settings to the codec to handle 44.1 KHz sampling rates. All the other main sampling rates can be generated with a low relative error rate (see Table 4-3 Relative error rates for the bit-clock for more details). This mode is set by using the following configuration (in /APPLICATIONS/EVK1105-AUDIO- PLAYER-MASS-STORAGE/):./CONF/conf_tlv320aic23b.h o AIC23B_MCLK_HZ 11289600 o AIC23B_DAC_USE_RX_CLOCK DISABLED Use./CLOCKS/clocks_fosc0_12000000_fosc1_11289600.c Figure 4-3 EVK1105 default I²S clock configuration Note that on the audio player application, this mode still requires the 12MHz crystal to support the USB protocol. 4.4.2.2 Using the TLV320AIC23B codec in USB mode with only one crystal The TLV320AIC23B audio codec also provides a USB mode interface, which means it can be used directly with a 12MHz crystal. The main sampling frequency are then supported by this mode but gives some small error on non-12mhz-multiple frequencies such as the 44.1KHz. Therefore this mode is not optimal to play such sampling rates but it has the advantage to use only one 12MHz crystal which can also be used to feed other modules such as the USB IP. This mode is set by using the following configuration (in /APPLICATIONS/EVK1105-AUDIO- PLAYER-MASS-STORAGE/): 8 AVR32788./CONF/conf_tlv320aic23b.h

o AIC23B_MCLK_HZ 12000000 o AIC23B_DAC_USE_RX_CLOCK DISABLED Use./CLOCKS/clocks_fosc0_12000000.c AVR32788 Figure 4-4 The TLV320AIC23B audio codec used in USB mode with 1 crystal 4.4.2.3 Using the TLV320AIC23B codec in USB mode with two crystals This mode combines the advantage of the USB mode by supporting every main sample frequency and of the 11.2896MHz crystal to generate accurate sampling rates. This mode is set by using the following configuration (in /APPLICATIONS/EVK1105-AUDIO- PLAYER-MASS-STORAGE/):./CONF/conf_tlv320aic23b.h o AIC23B_MCLK_HZ 12000000 o AIC23B_DAC_USE_RX_CLOCK DISABLED Use./CLOCKS/clocks_fosc0_12000000_fosc1_11289600.c Figure 4-5 The TLV320AIC23B audio codec used in USB mode with 2 crystals 4.4.2.4 Switching clock source with the TLV320AIC23B codec Some DAC don t have this USB mode feature to handle multiple frequency rates with the same oscillator. Therefore the application must be able to switch clocks while it is running. The audio player application on the EVK1105 implements this feature by using 2 generic clocks to generate both the master clock and the TX Clock. Please read the Generating a master clock and an I²S clock with the same oscillator section for more information. This mode is set by using the following configuration (in /APPLICATIONS/EVK1105-AUDIO- PLAYER-MASS-STORAGE/):./CONF/conf_tlv320aic23b.h o AIC23B_DAC_USE_RX_CLOCK ENABLED Use one of the following files (depending on the hardware configuration): 9

o./clocks/clocks_fosc0_12000000_fosc1_11289600.c o./clocks/clocks_fosc0_14745600_fosc1_11289600.c PB30 (pin #21) must be linked with PA18 (pin #62). 10 AVR32788

AVR32788 5 Table of Contents AVR[appnote nr]: [title]... 1 Features... 1 1 Introduction... 1 2 I²S protocol overview... 2 3 I²S interface... 3 3.1 Basic interface... 3 3.2 Systems with master clock... 3 4 I²S on AVR32... 4 4.1 Basic I²S interface... 4 4.1.1 Bit-clock generation... 4 4.2 Generating a master clock for I²S... 4 4.3 Generating a master clock and an I²S clock with the same oscillator... 5 4.4 Software configuration... 7 4.4.1 Using the I²S driver from the Software Framework... 7 4.4.2 Configuring the I²S on the EVK1105 board... 8 4.4.2.1 Using the TLV320AIC23B codec with the 11.2896MHz crystal... 8 4.4.2.2 Using the TLV320AIC23B codec in USB mode with only one crystal... 8 4.4.2.3 Using the TLV320AIC23B codec in USB mode with two crystals... 9 4.4.2.4 Switching clock source with the TLV320AIC23B codec... 9 5 Table of Contents... 11 Disclaimer... 12 11

Disclaimer Headquarters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Atmel Asia Unit 1-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong Tel: (852) 2245-6100 Fax: (852) 2722-1369 Atmel Europe Le Krebs 8, Rue Jean-Pierre Timbaud BP 309 78054 Saint-Quentin-en- Yvelines Cedex France Tel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11 Atmel Japan 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 Japan Tel: (81) 3-3523-3551 Fax: (81) 3-3523-7581 Product Contact Web Site www.atmel.com Technical Support Avr32@atmel.com Sales Contact www.atmel.com/contacts Literature Request www.atmel.com/literature Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. 2009 Atmel Corporation. All rights reserved. Atmel, Atmel logo and combinations thereof, AVR and others, are the registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.