Hello, and welcome to this presentation of the STM32 Serial Audio Interface. I will present the features of this interface, which is used to connect

Similar documents
BUSES IN COMPUTER ARCHITECTURE

The World Leader in High Performance Signal Processing Solutions. Section 15. Parallel Peripheral Interface (PPI)

Parallel Peripheral Interface (PPI)

Since the early 80's, a step towards digital audio has been set by the introduction of the Compact Disc player.

Digital Audio Design Validation and Debugging Using PGY-I2C

Section 14 Parallel Peripheral Interface (PPI)

Module Introduction. Purpose This training module covers 68K/ColdFire Specific Peripherals

BLOCK CODING & DECODING

A MISSILE INSTRUMENTATION ENCODER

Introduction to Serial I/O

Page 1. Introduction to Serial I/O. Definitions. A Serial Channel CS/ECE 6780/5780. Al Davis. Today s topics: Serial I/O

TMS320VC5501/5502/5503/5507/5509/5510 DSP Multichannel Buffered Serial Port (McBSP) Reference Guide

Exercise 1-2. Digital Trunk Interface EXERCISE OBJECTIVE

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used

Application Report. Joe Quintal... Wireless Infrastructure Radio Products Group ABSTRACT

HOLITA HDLC Core: Datasheet

Generation and Measurement of Burst Digital Audio Signals with Audio Analyzer UPD

GM69010H DisplayPort, HDMI, and component input receiver Features Applications

High Speed Async to Sync Interface Converter

Display Interfaces. Display solutions from Inforce. MIPI-DSI to Parallel RGB format

Logic Devices for Interfacing, The 8085 MPU Lecture 4

SingMai Electronics SM06. Advanced Composite Video Interface: HD-SDI to acvi converter module. User Manual. Revision 0.

LS-AES. Owner s Manual

DVB Master Technical Reference Manual Version 1.05 August 12, 1999

Graduate Institute of Electronics Engineering, NTU Digital Video Recorder

Serial Peripheral Interface

EECS150 - Digital Design Lecture 10 - Interfacing. Recap and Topics

Altera JESD204B IP Core and ADI AD9144 Hardware Checkout Report

GALILEO Timing Receiver

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

Software Analog Video Inputs

Checkpoint 1 AC97 Audio

Functional Diagram: Figure 1 PCIe4-SIO8BX-SYNC Block Diagram. Chan 1-4. Multi-protocol Transceiver. 32kb. Receiver FIFO. 32kb.

PCM ENCODING PREPARATION... 2 PCM the PCM ENCODER module... 4

IEEE802.11a Based Wireless AV Module(WAVM) with Digital AV Interface. Outline

Design and Implementation of Nios II-based LCD Touch Panel Application System

PMC-SIO4 Quad Channel High Performance Serial I/O PMC CARD With up to 256Kbytes of FIFO buffering and Multiple Serial Protocols

DSP in Communications and Signal Processing

CH7053A HDTV/VGA/ DVI Transmitter

National Instruments Synchronization and Memory Core a Modern Architecture for Mixed Signal Test

MACROVISION RGB / YUV TEMP. RANGE PART NUMBER

TABLE 3. MIB COUNTER INPUT Register (Write Only) TABLE 4. MIB STATUS Register (Read Only)

Low-speed serial buses are used in wide variety of electronics products. Various low-speed buses exist in different

Design and analysis of microcontroller system using AMBA- Lite bus

Ultra ATA Implementation Guide

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

Pivoting Object Tracking System

Digital Blocks Semiconductor IP

SingMai Electronics SM06. Advanced Composite Video Interface: DVI/HD-SDI to acvi converter module. User Manual. Revision th December 2016

AI-1204Z-PCI. Features. 10MSPS, 12-bit Analog Input Board for PCI AI-1204Z-PCI 1. Ver.1.04

Instruction manual Universal Fieldbus-Gateway UNIGATE IC - RS

Audio and Other Waveforms

MULTIMIX 8/4 DIGITAL AUDIO-PROCESSING

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

AD9889B to ADV7513 Changeover Guide

AD9884A Evaluation Kit Documentation

AT780PCI. Digital Video Interfacing Products. Multi-standard DVB-T2/T/C Receiver & Recorder & TS Player DVB-ASI & DVB-SPI outputs

VLSI Chip Design Project TSEK06

Lesson 2.2: Digitizing and Packetizing Voice. Optimizing Converged Cisco Networks (ONT) Module 2: Cisco VoIP Implementations

Scans and encodes up to a 64-key keyboard. DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 V SS. display information.

Audio. by Jeff Mazur. S/PDIF (Sony/Philips Digital Interconnect Format)

Serial Digital Interface Reference Design for Stratix IV Devices

NS8050U MICROWIRE PLUSTM Interface

Scan. This is a sample of the first 15 pages of the Scan chapter.

Sequential Logic and Clocked Circuits

Audio Watermarking (SyncNow ) Audio watermarking for Second Screen SyncNow with COPYRIGHT 2011 AXON DIGITAL DESIGN B.V. ALL RIGHTS RESERVED

Comparing JTAG, SPI, and I2C

C8188 C8000 1/10. digital audio modular processing system. 4 Channel AES/EBU I/O. features. block diagram. 4 balanced AES inputs

2.13inch e-paper HAT (D) User Manual

Fox-Bus (FxB) Protocol Timing (Version 4) 9/1/2011


Technical Description

DisplayPort 1.4 Link Layer Compliance

Kramer Electronics, Ltd. USER MANUAL. Model: FC Analog Video to SDI Converter

SHA-256 Module Specification

Technical Article MS-2714

CH7106B Brief Datasheet

Dual Link DVI Receiver Implementation

BABAR IFR TDC Board (ITB): system design

Training Note TR-06RD. Schedules. Schedule types

QSFP+ 40GBASE-SR4 Fiber Transceiver

Dual Link DVI Receiver Implementation

NT7108. Neotec Semiconductor Ltd. 新德科技股份有限公司 NT7108 LCD Driver. Copyright: NEOTEC (C)

PLEASE READ THIS PRODUCT MANUAL CAREFULLY BEFORE USING THIS PRODUCT.

PAD-2 2 Channel A-D Converter Mk2 Rev. 3 Sept. 24, 2017

DNA-STP-SYNC Synchronization and Screw Terminal Panel. User Manual

Implementing Audio IP in SDI II on Arria V Development Board

In-process inspection: Inspector technology and concept

CPCI-SIO4ARHM Quad Channel High Performance Serial I/O CPCI CARD With up to 256Kbytes of FIFO buffering and Multiple Serial Protocols

HDMI Converter. Operating Instructions(P/N of this Instructions is INSYH0101)

Major Differences Between the DT9847 Series Modules

Installation and users Manual

ADV7513 Low-Power HDMI 1.4A Compatible Transmitter

CH7520. CH7520 DisplayPort to VGA/HDTV Converter GENERAL DESCRIPTION

JESD204B IP Hardware Checkout Report with AD9250. Revision 0.5

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

RF4432 wireless transceiver module

Contents. DSP56300 Enhanced Synchronous Serial Interface (ESSI) Programming MOTOROLA. Semiconductor Application Note. By Tina M.

Report. Digital Systems Project. Final Project - Synthesizer

Course 10 The PDH multiplexing hierarchy.

Transcription:

Hello, and welcome to this presentation of the STM32 Serial Audio Interface. I will present the features of this interface, which is used to connect external audio devices 1

The Serial Audio Interface (SAI), is integrated in STM32 products to provide an interface, for communicating with external audio devices such as amplifiers, ADCs, DACs, audio codecs, and audio processors. This interface is fully configurable, supporting the most digital audio standards, allowing easy connection to any existing audio devices. Due to the internal synchronization features of the SAI, the required IO pins are reduced to a minimum. 2

The SAI can be programmed in three different modes: The Free protocol mode allows the SAI to support standards such as I2S, PCM, TDM Due to its flexibility, it is possible to customize the serial interface if needed. The SPDIF protocol mode, allows the SAI to transmit audio samples using the IEC60958 standard. The AC97 protocol is also supported by the SAI. 3

The SAI supports all the standard audio sampling rates, depending on the crystal frequency used for the application. In addition, the SAI supports MASTER and SLAVE mode, halfduplex or full duplex communication. It is also possible to synchronize several SAIs together. The SAI also provides a FIFO buffer of 8 samples, and up to two interrupt and DMA interfaces. 4

The SAI is composed of two independent sub blocks (A and B). Each sub block has: Its own APB interface, clock generator, FIFO buffer, DMA interface, and Interrupt interface. Each sub block can be configured in receive or transmit, master or slave, with its own protocol. Internal and external synchronization allows two sub blocks to be synchronized, or two SAIs to be synchronized. Each sub block can handle up to four IOs: FS_x is the frame synchronization signal SCK_x is the bitclock SD_x is the serial data line MCLK_x is the MASTER clock. 5

The STM32L4xx, embeds 2 SAIs. Each SAI can receive a kernel clock (SAIn_CK_x) from one of the three internal PLL or from the PADs (SAInEXTCLK). The kernel clock is used by the SAI in order to generate the timing of the serial audio interface when programmed in MASTER mode. 6

The free protocol mode, the flexible programming interface facilitates the configuration of most common audio standard interfaces. 7

The following example shows some of the possibilities of the interface, for I2S Like protocols: In I2S Like protocol, each edge of the frame synchronization signal (FS) is used to align the slots start position. The frame length, the duty cycle, and polarity can be adjusted. The clock strobing edge can be selected. The position of the slots with respect to the frame edges can be selected. The number of slots per frame: needs to be an even number in I2S Like Protocol. 8

The following example shows some of the possibilities of the interface, for the TDM Like protocols: In TDM Like protocol, only one edge of the frame synchronization (rising or falling) is used to align the slots position. The frame length, the duty cycle, and polarity can be adjusted. The clock strobing edge can be selected. The position of the slots with respect to the frame active edge can be selected. The number of slots per frame (up to 16) can be selected. 9

The slot size is always bigger than or equal to the data size. The SAI allows control of the position of the data inside each slot, and setting of the un used slots to HiZ if needed. This function can be useful when the data line is shared between several devices. 10

In MASTER mode the SAI can generate the master clock (MCLK), or use an external master clock via SAIxEXTCLK PADs. The master clock can be used to provide a reference clock to the external audio codecs. In SLAVE mode, the MCLK signal is not used. 11

In MASTER mode it is up to the SAI to generate the timing, in order to provide the correct sampling rate. In SLAVE mode, the sampling rate is provided by the external audio device. 12

The clock generator is needed for MASTER mode communications, it is used to adjust the sampling rate of the serial audio interface. The clock generator provides the root frequency for the MCLK_x, SCK_x and the FS_x. When the master clock (MCLK) needs to be generated, the frame length must be a power of two. The ratio between the FS_x frequency and the MCLK_x frequency is fixed to 256. 13

When the MCLK_x does not need to be generated, the frame length can take any value from 8 to 256. 14

The internal synchronization can be used for communication requesting two data lanes, such as full duplex I2S. The external synchronization can be used for communication requesting more than 2 data lanes (up to 4). For example when interfacing HDMI ICS. All the sub blocks synchronized together must use the same protocol characteristics. 15

In order to reduce the data size, it is possible to insert in the data path, a A law or u law compander. Note that A law and u law are not lossless compressors. Companding modes are generally used in telephony: The small data are amplified and the big data are attenuated. The SNR tends to be identical for a strong and for a weak signal. 16

The SAI also provides a MUTE function. 17

The Anticipated/Late frame error detection increases the interface reliability by detecting unexpected frame synchronization misalignment. 18

The SAI guarantees the data alignment even if an underrun or overrun occurs. 19

The SAI supports the audio IEC60958 standard in transmit mode when configured in SPDIF mode. The software has to handle the CS, U and V bits. The SAI generates the Parity bit according to the transmitted data. 20

In the IEC60958, the block structure is used to decode the Channel Status (CS), and User information (U). Each block contains 192 frames. Each frame contains 2 sub frames. Each sub frame contains 32 bits. A synchronization preamble allows the detection of the block and sub frame boundaries. 21

The Fsai_ck_x frequency must be adjusted in order to generate the proper audio sample rate. The data inside the transmit FIFO must be adjusted as shown in the slide: the MSB must always be at position 23. 22

The SAI is able to work as an AC 97 link controller. When this protocol is used, the frame length, the slot number, and slot length are fixed by the hardware. 23

Several events can be enabled in order to generate interrupts. The FIFO request event, the overrun/underrun event, the anticipated or late frame synchronization event, the codec not ready event (only in AC 97), the mute detection event. The WCKCFG event can be used in order to inform the user that the frame length of the SAI has been improperly programmed. This feature is only available in MASTER mode. 24

The SAI needs the bus interface clock (APB clock) and the kernel clock (SAIn_CK_x) to work properly.

For a full duplex MASTER mode, two data lanes are needed, so two sub blocks need to be used. The MASTER sub block A, provides the synchronization to SLAVE sub block B, using the internal synchronization feature (IO Line Management). Using internal synchronization, the number Using internal synchronization, the number of IOs required is reduced to its minimum. 26

Another example of full duplex mode use case with the TDM protocol usage. The slot 1 is inactive (not used) for sub block A, the slots 2 and 3 are inactive for sub block B. For both sub blocks, the frame structure has 4 slots. The sub block A will generate 3 samples per frame. The sub block B will receive 2 samples per frame. 27