Functional Description
22.3.10.3.2 Receive Bit Stream Data Alignment
The McASP receiver supports serial formats of:
•
Slot or time slot size = 8, 12, 16, 20, 24, 28, 32 bits.
•
Word size
≤
Slot size.
•
Alignment when more bits/slot than bits/words, then:
–
Left aligned = word shifted first, remaining bits are pad.
–
Right aligned = pad bits are shifted first, word occupies the last bits in slot.
•
Order of bits shifted out:
–
MSB: most-significant bit of word is shifted out first, last bit is LSB.
–
LSB: least-significant bit of word is shifted out last, last bit is MSB.
Hardware support for these serial formats comes from the programmable options in the receive bitstream
format register (RFMT):
•
RRVRS: bit reverse (1) or no bit reverse (0).
•
RROT: rotate right by 0, 4, 8, 12, 16, 20, 24, or 28 bits.
•
RSSZ: receive slot size of 8, 12, 16, 20, 24, 28, or 32 bits.
RSSZ should always be programmed to match the slot size of the serial stream. The word size is not
directly programmed into the McASP, but rather is used to determine the rotation needed in the RROT
field.
and
show the RRVRS and RROT fields for each serial format and for both
integer and Q31 fractional internal representations.
This discussion assumes that all slot size and word size options are multiples of 4; since the receive rotate
right unit only supports rotation by multiples of 4. However, the bit mask/pad unit does allow for any
number of significant digits. For example, a Q31 number may have 19 significant digits (word) and be
transmitted in a 24-bit slot; this would be formatted 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 pass the 19 most-significant digits (program the
mask value to FFFF E000h). The digits that are not significant can be set to a selected pad value, which
can be any one of the significant digits, a fixed value of 0, or a fixed value of 1.
The receive bit mask/pad unit operates on data as the final step of the receive format unit (see
), and the data is aligned in the same representation as it is read from the receiver by the processor
(typically Q31 or integer).
Table 22-9. Receive Bitstream Data Alignment
RFMT Bit
Bit Stream
Internal Numeric
Bit Stream Order
Alignment
Representation
RROT
(1)
RRVRS
(a)
(2)
MSB first
Left aligned
Q31 fraction
SLOT
1
(b)
MSB first
Right aligned
Q31 fraction
WORD
1
(c)
LSB first
Left aligned
Q31 fraction
(32 - (SLOT - WORD)) % 32
0
(d)
LSB first
Right aligned
Q31 fraction
0
0
(e)
(2)
MSB first
Left aligned
Integer
SLOT - WORD
1
(f)
MSB first
Right aligned
Integer
0
1
(g)
LSB first
Left aligned
Integer
32 - SLOT
0
(h)
LSB first
Right aligned
Integer
32 - WORD
0
(1)
WORD = Word size rounded up to the nearest multiple of 4; SLOT = slot size; % = modulo operator
(2)
To transmit in I2S format, select MSB first, left aligned, and also select RDATDLY = 01 (1 bit delay)
3807
SPRUH73H – October 2011 – Revised April 2013
Multichannel Audio Serial Port (McASP)
Copyright © 2011–2013, Texas Instruments Incorporated