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.2 Receive Bit Stream Data Alignment<br />

The <strong>McASP</strong> receiver 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 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 receive bitstream<br />

format register (RFMT):<br />

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

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

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

RSSZ 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 RROT<br />

field.<br />

Table <strong>22</strong>-9 and Figure <strong>22</strong>-30 show the RRVRS and RROT fields for each serial format and for both<br />

integer and Q31 fractional internal representations.<br />

This discussion assumes that all slot size and word size options are multiples of 4; since the receive rotate<br />

right unit only supports rotation by multiples of 4. However, the bit mask/pad unit does allow for any<br />

number of significant digits. For example, a Q31 number may have 19 significant digits (word) and be<br />

transmitted in a 24-bit slot; this would be formatted as a word size of 20 bits and a slot size of 24 bits.<br />

However, it is possible to set the bit mask unit to only pass the 19 most-significant digits (program the<br />

mask value to FFFF E000h). The digits that are not significant can be set to a selected pad value, which<br />

can be any one of the significant digits, a fixed value of 0, or a fixed value of 1.<br />

The receive bit mask/pad unit operates on data as the final step of the receive format unit (see Figure <strong>22</strong>-<br />

23), and the data is aligned in the same representation as it is read from the receiver by the processor<br />

(typically Q31 or integer).<br />

Table <strong>22</strong>-9. Receive Bitstream Data Alignment<br />

Bit Stream Internal Numeric<br />

RFMT Bit<br />

Figure <strong>22</strong>-30 Bit Stream Order Alignment Representation RROT (1) RRVRS<br />

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

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

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

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

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

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

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

(h) LSB first Right aligned Integer 32 - WORD 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, select MSB first, left aligned, and also select RDATDLY = 01 (1 bit delay)<br />

3964 <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!