50.5.13.9 TDM (TDM_EN=1)

When configured for TDM protocol mode, TDM sup- ports a wide variety of serial data formats. The TDM format is typically used to transfer data to or from a DSP to the MCU. The TDM format consist of three components clock, data, and frame sync (I2S could be considered a subset of TDM). The data bits are grouped into words and slots/channels as shown in the following figure. The data in the slot can be left or right justified with any unused bits filled with 1 or 0 as defined by AUDWD_MODE[1:0], when word size is < Slot size. The configured word must be “equal” or “less than” the slot/channel length size. A frame consist of multiple slots/channels and the TDM frame is defined by the frame sync pulse. The data transfer can be continuous and periodic because the TDM format is most commonly used to communicate at a fixed sample rate.

There are no delays between slots/channels, with the last byte of the slot/channel followed immediately on the next serial clock cycle with the first bit of the next slot/channel. But the frame sync may be offset from the first bit of the first slot/channel with 0 or 1-cycle delay.

TDM mode requires the transmitter and receiver in the system to mutually agree on the number of bits per slot/channel. This agreed to number of bits per slot/channel determines the slot/channel boundary which is not determined by the frame sync pulse signal. The frame sync pulse determines the beginning of the slot/channel 0 and the beginning of a new frame. Some examples of the word sizes and slot sizes that can be configured when in TDM mode are shown in the following figure.

Figure 50-38. Examples of Word and Slot Sizes for TDM Data

Example for a 6 channel TDM with 8 bit word and slot size =8 bits set up registers FRMCNT=0011, TDMSSZ=000, TDMWSZ=000, AVDFMT=011, FRMCNT[2:0]=110, FRMSYPW=0001, FRMSYPW=0000, CPOL=0, FRMCOINC=1, FRMPOL=1, TDM_EN=1.

The following figure shows an example configuration above 6channel TDM with 8 bit word size and 8 bit slot size. The following figures show the TDM format bit delays set by FRMCOINC (1= coincident, 0=precedes by one bit clk), relative from frame sync.

Figure 50-39. TDM Format 6-Slots with 0-bit Delay From Frame Sync
Figure 50-40. TDM Format Bit Delays from Frame Sync