![Texas Instruments AM1808 Technical Reference Manual Download Page 1098](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581098.webp)
32
32
32
32
XPBIT
XPAD
XMASK
Bit mask/pad
Bus (peripheral configuration bus or DMA bus)
XROT
Programmable rotate by:
0, 4, 8, 12, 16, 20, 24, 28
Bit reverse
XRVRS
Parallel load
to XRBUF[n]
1098
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Multichannel Audio Serial Port (McASP)
Figure 24-20. Transmit Format Unit
The bit mask and pad stage includes a full 32-bit mask register, allowing selected individual bits to either
pass through the stage unchanged, or be masked off. The bit mask and pad then pad the value of the
masked off bits by inserting either a 0, a 1, or one of the original 32 bits as the pad value. The last option
allows for sign-extension when the sign bit is selected to pad the remaining bits.
The rotate right stage performs bitwise rotation by a multiple of 4 bits (between 0 and 28 bits),
programmable by the (R/X)FMT register. Note that this is a rotation process, not a shifting process, so bit
0 gets shifted back into bit 31 during the rotation.
The bit reversal stage either passes all 32 bits directly through, or swaps them. This allows for either MSB
or LSB first data formats. If bit reversal is not enabled, then the McASP will naturally transmit and receive
in an LSB first order.
Finally, note that the (R/X)DATDLY bits in (R/X)FMT also determine the data format. For example, the
difference between I2S format and left-justified is determined by the delay between the frame sync edge
and the first data bit of a given time slot. For I2S format, (R/X)DATDLY should be set to a 1-bit delay,
whereas for left-justified format, it should be set to a 0-bit delay.
The combination of all the options in (R/X)FMT means that the McASP supports a wide variety of data
formats, both on the serial data lines, and in the internal CPU representation.
provides more detail and specific examples. The examples use internal representation
in integer and Q31 notation, but other fractional notations are also possible.
24.0.21.3 State Machine
The receive and transmit sections have independent state machines. Each state machine controls the
interactions between the various units in the respective section. In addition, the state machine keeps track
of error conditions and serial port status.
No serial transfers can occur until the respective state machine is released from reset. See initialization
sequence for details (
).
The receive state machine is controlled by the RFMT register, and it reports the McASP status and error
conditions in the RSTAT register. Similarly, the transmit state machine is controlled by the XFMT register,
and it reports the McASP status and error conditions in the XSTAT register.