The DIT transmitter works only in the following configuration:
- In the transmit frame control register (MCASP_AFSXCTL):
- Internally generated transmit frame sync, FSXM = 1
- Rising-edge frame sync, FSXP = 0
- Bit-width frame sync, FXWID = 0
- 384-slot TDM, XMOD = 1 1000 0000b
- In the transmit clock control register
(MCASP_ACLKXCTL), ASYNC = 1
- In the transmit bitstream format register (MCASP_XFMT), XSSZ = 1111 (32-bit slot size)
All combinations of AHCLKX and ACLKX are supported.
The following summarizes the register configurations required for DIT mode. DIT mode-specific bit fields are in bold face:
- MCASP_PFUNC: The data pin - AXRn must be
configured for MCASP function. If AHCLKX is used, it must also be configured for
MCASP function. Other pins can be configured to function as GPIOs, if
desired.
- MCASP_PDIR: The data pin must be configured as
output. If internal clock source AUXCLK is used as the reference clock, it may
be output as the AHCLKX device level signal by configuring AHCLKX pin as an
output.
- MCASP_GBLCTL: Global initialization
- MCASP_AMUTE: Leave this register at default
state.
- MCASP_DITCTL: The DITEN bit must be set to 0b1 to enable DIT mode. Configure other bits as desired.
- MCASP_XMASK: Mask the desired bits, depending upon left-aligned or right-aligned internal data.
- MCASP_XFMT: XDATDLY = 0. XRVRS = 0. XPAD = 0. XSSZ = Fh (32-bit slot). XBUSEL = configured as desired. The XROT bit is configured, as described in the Section 12.5.2.3.5.1.2 .
- MCASP_AFSXCTL: Configure the bits according to former discussions.
- MCASP_ACLKXCTL: ASYNC = 1. Program the CLKXDIV
bits to obtain the bit clock rate desired. CLKXM = 1.
- MCASP_AHCLKXCTL: Program the HCLKXDIV bits to
obtain the high-frequency bit clock rate desired.
- MCASP_XTDM: Set to FFFF FFFFh for all active slots for DIT transfers.
- MCASP_XINTCTL: Program all fields according to the interrupts desired.
- MCASP_XCLKCHK: Program all fields according to the clock checking desired.
- MCASP_SRCTLn: Set SRMOD = 1 (transmitter) for the DIT pins (n = 0 to 15).
- MCASP_DITCSRAi and MCASP_DITCSRBi: Program the channel status bits as desired (i = 0 to 5).
- MCASP_DITUDRAi and MCASP_DITUDRBi: Program the user data bits as desired (i = 0 to 5).
Note: In DIT mode, the transmitter can support a 192 kHz
frame rate (stereo) on up to 2 serial data pins
simultaneously (note that the internal bit clock
for DIT runs two times faster than the equivalent
bit clock for TDM (I2S) mode, due to the need to
generate Biphase Mark Encoded Data - see
Biphase-Mark Code).