The DIT transmitter works only in the following configuration:
- In the transmit frame control register (MCASP_TXFMCTL):
- 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_TXFMT), 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_TXDITCTL: The DITEN bit must be set to 0b1 to enable DIT mode. Configure other bits as desired.
- MCASP_TXMASK: Mask the desired bits, depending upon left-aligned or right-aligned internal data.
- MCASP_TXFMT: 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 26.6.4.4.1.2 .
- MCASP_TXFMCTL: 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_TXTDM: Set to FFFF FFFFh for all active slots for DIT transfers.
- MCASP_EVTCTLX: Program all fields according to the interrupts desired.
- MCASP_TXCLKCHK: Program all fields according to the clock checking desired.
- MCASP_XRSRCTLn: Set SRMOD = 1 (transmitter) for the DIT pins.
- MCASP_DITCSRAi and MCASP_DITCSRBi: Program the channel status bits as desired.
- MCASP_DITUDRAi and MCASP_DITUDRBi: Program the user data bits as desired.
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 Section 26.6.2.2.5.1).