45.7.2 I2SMCC Mode Register A
This register can only be written if WPCFEN is cleared in Inter-IC Sound Write Protection Mode Register.
The I2SMCC_MRA must only be written when the I2SMCC is stopped in order to avoid unexpected behavior on the I2SMCC_WS, I2SMCC_CK and I2SMCC_DOUTx outputs. The proper sequence is to write to I2SMCC_MRA, then write to I2SMCC_CR to enable the I2SMCC or to disable the I2SMCC before writing a new value to I2SMCC_MRA.
Name: | I2SMCC_MRA |
Offset: | 0x04 |
Reset: | 0x00000000 |
Property: | Read/Write |
Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
IWS | IMCKMODE | ISCKDIV[5:0] | |||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
TDMFS[1:0] | IMCKDIV[5:0] | ||||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
NBCHAN[2:0] | SRCCLK | TXSAME | TXMONO | RXLOOP | RXMONO | ||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
FORMAT[1:0] | WIRECFG[1:0] | DATALENGTH[2:0] | MODE | ||||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit 31 – IWS I2SMCC_WS Slot Length
See Slot Length (I2S format) .
Value | Description |
---|---|
0 | I2SMCC_WS slot is 32 bits long for DATALENGTH = 18/20/24 bits. |
1 | I2SMCC_WS slot is 24 bits long for DATALENGTH = 18/20/24 bits. |
Bit 30 – IMCKMODE Host Clock Mode
Value | Description |
---|---|
0 | No host clock generated. |
1 | Host clock generated. |
Bits 29:24 – ISCKDIV[5:0] Selected Clock to I2SMCC Serial Clock Ratio
I2SMCC_CK Serial clock output frequency is Selected Clock divided by (2 * ISCKDIV). If ISCKDIV is 0, the I2SMCC_CK Serial clock output frequency is equal to the Selected Clock frequency.
Bits 23:22 – TDMFS[1:0] TDM Frame Synchronization
Value | Name | Description |
---|---|---|
0 | SLOT | I2SMCC_WS pulse is high for one time slot at beginning of frame. |
1 | HALF | I2SMCC_WS pulse is high for half the time slots at beginning of frame. |
2 | BIT | I2SMCC_WS pulse is high for one bit period at beginning of frame, i.e., one I2SMCC_CK period. |
Bits 21:16 – IMCKDIV[5:0] Selected Clock to I2SMCC Host Clock Ratio
I2SMCC_MCK Host clock output frequency is Selected Clock divided by (2 * IMCKDIV). If IMCKDIV is 0, the I2SMCC_MCK Host clock output frequency is equal to the Selected Clock frequency.
Bits 15:13 – NBCHAN[2:0] Number of TDM Channels-1
Must be written with the number of TDM channels minus one.
Bit 12 – SRCCLK Source Clock Selection
Value | Description |
---|---|
0 | The Peripheral clock is selected as source clock for I2SMCC_MCK/WS/CK pins. |
1 | The PMC.GCLKx clock is selected as source clock (I2SMCC_MCK/WS/CK rate can be independent of system bus clock). |
Bit 11 – TXSAME Transmit Data when Underrun
Value | Description |
---|---|
0 | ‘0’ is transmitted when underrun. |
1 | Previous sample transmitted when underrun. |
Bit 10 – TXMONO Transmit Mono
Value | Description |
---|---|
0 | Stereo |
1 | Mono, with left audio samples duplicated to right audio channel by the I2SMCC. |
Bit 9 – RXLOOP Loop-back Test Mode
Value | Description |
---|---|
0 | Normal mode |
1 | I2SMCC_DOUT outputs of I2SMCC are internally connected to I2SMCC_DIN inputs. |
Bit 8 – RXMONO Receive Mono
Value | Description |
---|---|
0 | Stereo |
1 | Mono, with left audio samples duplicated to right audio channel by the I2SMCC. |
Bits 7:6 – FORMAT[1:0] Data Format
Value | Name | Description |
---|---|---|
0 | I2S | I2S format, stereo with I2SMCC_WS low for left channel, and MSB of sample starting one I2SMCC_CK period after I2SMCC_WS edge. |
1 | LJ | Left-justified format, stereo with I2SMCC_WS high for left channel, and MSB of sample starting on I2SMCC_WS edge. |
2 | TDM | TDM format, with (NBCHAN + 1) channels, I2SMCC_WS high at beginning of first channel, and MSB of sample starting one I2SMCC_CK period after I2SMCC_WS edge. |
3 | TDMLJ | TDM format, left-justified, with (NBCHAN + 1) channels, I2SMCC_WS high at beginning of first channel, and MSB of sample starting on I2SMCC_WS edge. |
Bits 5:4 – WIRECFG[1:0] Wire Configuration
Value | Name | Description |
---|---|---|
0 | I2S_1_TDM_0 |
In I2S and LJ formats, I2SMCC_DIN0 and I2SMCC_DOUT0 are used to transmit and receive I2S frames. In TDM and TDMLJ formats, I2SMCC_DIN0 and I2SMCC_DOUT0 are used to transmit and receive TDM frames. |
1 | I2S_2_TDM_1 |
In I2S and LJ formats, I2SMCC_DIN[1:0] and I2SMCC_DOUT[1:0] are used to transmit and receive 2 I2S frames. In TDM and TDMLJ formats, I2SMCC_DIN1 and I2SMCC_DOUT1 are used to transmit and receive TDM frames. |
2 | I2S_4_TDM_2 |
In I2S and LJ formats, I2SMCC_DIN[3:0] and I2SMCC_DOUT[3:0] are used to transmit and receive 4 I2S frames. In TDM and TDMLJ formats, I2SMCC_DIN2 and I2SMCC_DOUT2 are used to transmit and receive TDM frames. |
3 | TDM_3 |
In I2S and LJ formats, reserved for future use, do not use. In TDM and TDMLJ formats, I2SMCC_DIN3 and I2SMCC_DOUT3 are used to transmit and receive TDM frames. |
Bits 3:1 – DATALENGTH[2:0] Data Word Length
Value | Name | Description |
---|---|---|
0 | 32_BITS | Data length is set to 32 bits. |
1 | 24_BITS | Data length is set to 24 bits. |
2 | 20_BITS | Data length is set to 20 bits. |
3 | 18_BITS | Data length is set to 18 bits. |
4 | 16_BITS | Data length is set to 16 bits. |
5 | 16_BITS_COMPACT | Data length is set to 16-bit compact stereo. Left sample in bits [15:0] and right sample in bits [31:16] of same word. |
6 | 8_BITS | Data length is set to 8 bits. |
7 | 8_BITS_COMPACT | Data length is set to 8-bit compact stereo. Left sample in bits [7:0] and right sample in bits [15:8] of the same word. |
Bit 0 – MODE I2SMCC Mode
Value | Name | Description |
---|---|---|
0 | SLAVE | Client mode. I2SMCC_CK and I2SMCC_WS pin inputs used as bit clock and word select/frame synchronization. |
1 | MASTER | Host mode. Bit clock and word select/frame synchronization generated by I2SMCC from Peripheral Clock or GCLK if I2SMCC_MCK/WS/CK rates must be independent of system bus clock (See I2SMCC_MR.SRCCLK) and output to I2SMCC_CK and I2SMCC_WS pins. MCK is output as host clock on I2SMCC_MCK if I2SMCC_MRA.IMCKMODE is set. |