01.08.2013 Views

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Functional Description www.ti.com<br />

<strong>22</strong>.3.10.3 Formatter<br />

<strong>22</strong>.3.10.3.1 Transmit Bit Stream Data Alignment<br />

The <strong>McASP</strong> transmitter supports serial formats of:<br />

• Slot (or Time slot) size = 8, 12, 16, 20, 24, 28, 32 bits.<br />

• Word size ≤ Slot size.<br />

• Alignment: when more bits/slot than bits/words, then:<br />

– Left aligned = word shifted first, remaining bits are pad.<br />

– Right aligned = pad bits are shifted first, word occupies the last bits in slot.<br />

• Order: order of bits shifted out:<br />

– MSB: most-significant bit of word is shifted out first, last bit is LSB.<br />

– LSB: least-significant bit of word is shifted out last, last bit is MSB.<br />

Hardware support for these serial formats comes from the programmable options in the transmit bitstream<br />

format register (XFMT):<br />

• XRVRS: bit reverse (1) or no bit reverse (0).<br />

• XROT: rotate right by 0, 4, 8, 12, 16, 20, 24, or 28 bits.<br />

• XSSZ: transmit slot size of 8, 12, 16, 20, 24, 28, or 32 bits.<br />

XSSZ should always be programmed to match the slot size of the serial stream. The word size is not<br />

directly programmed into the <strong>McASP</strong>, but rather is used to determine the rotation needed in the XROT<br />

field.<br />

Table <strong>22</strong>-8 and Figure <strong>22</strong>-29 show the XRVRS and XROT fields for each serial format and for both integer<br />

and Q31 fractional internal representations.<br />

This discussion assumes that all slot size (SLOT in Table <strong>22</strong>-8) and word size (WORD in Table <strong>22</strong>-8)<br />

options are multiples of 4, since the transmit rotate right unit only supports rotation by multiples of 4.<br />

However, the bit mask/pad unit does allow for any number of significant digits. For example, a Q31<br />

number may have 19 significant digits (word) and be transmitted in a 24-bit slot; this would be formatted<br />

as a word size of 20 bits and a slot size of 24 bits. However, it is possible to set the bit mask unit to only<br />

pass the 19 most-significant digits (program the mask value to FFFF E000h). The digits that are not<br />

significant can be set to a selected pad value, which can be any one of the significant digits, a fixed value<br />

of 0, or a fixed value of 1.<br />

The transmit bit mask/pad unit operates on data as an initial step of the transmit format unit (see<br />

Figure <strong>22</strong>-24), and the data is aligned in the same representation as it is written to the transmitter by the<br />

processor (typically Q31 or integer).<br />

Table <strong>22</strong>-8. Transmit Bitstream Data Alignment<br />

Bit Stream Internal Numeric<br />

XFMT Bit<br />

Figure <strong>22</strong>-29 Bit Stream Order Alignment Representation XROT (1) XRVRS<br />

(a) (2) MSB first Left aligned Q31 fraction 0 1<br />

(b) MSB first Right aligned Q31 fraction SLOT - WORD 1<br />

(c) LSB first Left aligned Q31 fraction 32 - WORD 0<br />

(d) LSB first Right aligned Q31 fraction 32 - SLOT 0<br />

(e) (2) MSB first Left aligned Integer WORD 1<br />

(f) MSB first Right aligned Integer SLOT 1<br />

(g) LSB first Left aligned Integer 0 0<br />

(h) LSB first Right aligned Integer (32 - (SLOT - WORD)) % 32 0<br />

(1) WORD = Word size rounded up to the nearest multiple of 4; SLOT = slot size; % = modulo operator<br />

(2) To transmit in I2S format, use MSB first, left aligned, and also select XDATDLY = 01 (1 bit delay)<br />

3962<strong>Multichannel</strong> <strong>Audio</strong> <strong>Serial</strong> <strong>Port</strong> (<strong>McASP</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!