I2S
Introduction
The I2S controller supports Internet Information Services (IIS) protocol to interface with external audio codecs. Two 16-word deep FIFOs for read path and write path respectively are capable of handling 12-bit, 16-bit, 24-bit, and 32-bit word size. DMA controller handles the data movement between FIFO and memory.
A GR5526 series SoC has two I2S instances:
- I2S Master (I2S_M)
- I2S Slave (I2S_S)
I2S bus is used in systems that process digital audio signals, such as:
- A/D and D/A converters
- Digital signal processors
- Error correction for compact disc and digital recording
- Digital filters
- Digital I/O interfaces
I2S is a simple three-wire serial bus protocol developed by Philips to transfer stereo audio data. The bus only handles the transfer of audio data; hence, signals control and subcode need to be transferred separately using a different bus protocol (such as I2C).
Main Features
- 4-channel:
- 1 RX channel and 1 TX channel for I2S Slave Controller
- 1 RX channel and 1 TX channel for I2S Master Controller
- Full duplex communication due to the independence of transmitter and receiver
- Asynchronous clocking of APB and I2S SCLK
- Audio data resolutions of 12 bits, 16 bits, 20 bits, 24 bits, and 32 bits
- SCLK gating for power saving
- Two 16-word FIFOs: one for transmission and the other for reception
- DMA support
- Programmable FIFO thresholds
- Various sampling rates: up to 96 kHz (16-bit WS)
Protocols Introduction
Signals and Formats
- The Inter-IC Sound (I2S) bus is a simple three-wire serial bus protocol developed by Philips to transfer stereo audio data. It is used extensively in audio interfaces. It adopts the design of data and clock signal separation, avoiding the distortion induced by time difference.
- The I2S bus has three signals:
- SCLK: serial clock (also called BCLK. Each SCLK corresponds to each bit of audio data.)
- WS: word select (also called LRCK. WS is used to switch between the left and right channel data.)
- SD(SDATA): serial data (MSB → LSB: Data is transmitted from high-bit to low-bit)
- The I2S module of GR5526 adopts the I2S Philips standard (neither MSB justified standard nor LSB justified standard). For instance, when WS is low, the word being transferred is left stereo data; when WS is high, the word being transferred is right stereo data. For standard I2S formats, the MSB of a word is sent one SCLK cycle after a WS change. Serial data sent by the transmitter can be synchronized with either the negative edge or positive edge of the SCLK signal. However, the receiver must latch the serial data on the rising edge of SCLK. The formats (as receiver) are shown in 图 130.

Sampling and CLK frequency
As the frequency of SCLK is up to 3072 kHz, the number of SCLK cycles for which the (WS) line of I2S can be configured as 16 SCLK cycles, 24 SCLK cycles, or 32 SCLK cycles. If the 16 SCLK cycles are selected, the sampling rate is up to 96 kHz. The calculation formula is as follows:
- Sampling rate = Frequency of SCLK/[2 x Sampling depth (16,24 or 32)]
- Sampling rate = Frequency of WS
Functional Description
The I2S module of GR5526 supports full duplex communication thanks to the independence of transmitter and receiver. The module has four wires: serial data in (SDI), serial data out (SDO), word select (WS), and serial clock (SCLK).
I2S controller block diagram is illustrated in 图 131.
I2S Pin Mux
Before configuring the I2S module functions, the pin mux of four I2S interface GPIOs must be configured as I2S_M_SCLK (or I2S_S_SCLK), I2S_M_WS (or I2S_S_WS), I2S_M_SDI (or I2S_S_SDI), and I2S_M_SDO (or I2S_S_SDO).
Master and Slave
The I2S module can be used as a master or slave. The instance of master mode is I2S_M, and the instance of slave mode is I2S_S. When configured as a master, I2S controller initializes the WS signal and supplies the clock gating and clock enabling signals. Otherwise, when configured as a slave, I2S controller responds to externally generated SCLK and WS signals. When the I2S mode works in master mode, I2S clock generation must be enabled by setting the Clock Enable Register(CER) bit 0 to ‘1’.
Clock Divider
If the I2S module is used as master, the I2S Clock Configure Register (CLK_CFG) should be properly configured. The value of bit0~bit11 (div) is decided by the sampling rate, sampling depth (16, 24, or 32) and clock divider source (bit18). For example, if the CLK_CFG’s bit18 is ‘1’ (32 MHz) and the sampling rate is 48 kHz, the calculation formula is as follows:
div_TEMP0 = 32MHz *10/ (2 X Sampling Depth X Sample Rate)
if ((div_TEMP0 % 10) >=5)
{
div_TEMP1 = div_TEMP0 /10 +1;
}
else
{div_TEMP1 = div_TEMP0 /10;
}
if (div_TEMP1>= 2)
{
div = div_TEMP1: 2;
}
else
{
div = 0;
}
CLK_SRC | CLK_SRC | CLK_SRC | ||||||
---|---|---|---|---|---|---|---|---|
32000K | 64000K | 96000K | ||||||
Sampling Rate (k) | Bits | Desired Bit Clock (kHz) | Desired Divider (Value) | Actual Divider (Value) | Desired Divider (Value) | Actual Divider (Value) | Desired Divider (Value) | Actual Divider (Value) |
8 |
2*16 (left + right) |
256 |
125 |
125 |
250 | 250 | 375 |
375 |
8 |
2*24 (left + right) |
384 |
83.333333333 |
83 |
166.666666666 | 167 | 250 |
250 |
8 |
2*32 (left + right) |
512 |
62.5 |
63 |
125 | 125 | 187.5 |
188 |
16 | 2*16 (left + right) | 512 | 62.5 | 63 | 125 | 125 | 187.5 | 188 |
16 | 2*24 (left + right) | 768 | 41.666666666 | 42 | 83.33333333 | 83 | 125 | 125 |
16 | 2*32 (left + right) | 1024 | 31.25 | 31 | 62.5 | 63 | 93.75 | 94 |
48 |
2*16 (left + right) |
1,536 |
20.83333333 |
21 |
41.666666667 | 42 | 62.5 |
63 |
48 |
2*24 (left + right) |
2,304 |
13.88888889 |
14 |
27.777777778 | 28 | 41.666666667 |
42 |
48 |
2*32 (left + right) |
3072 |
10.41666667 |
10 |
20.833333333 | 21 | 31.21951 |
31 |
44.1 |
2*16 (left + right) |
1,411.2 |
22.67573696 |
23 |
45.351473923 | 45 | 68.02721088435 |
68 |
44.1 |
2*24 (left + right) |
2,116.8 |
15.1171579743 |
15 |
30.234315969 | 30 | 45.3514739229 |
45 |
44.1 |
2*32 (left + right) |
2,822.4 |
11.33786848 |
11 |
22.675736961 | 23 | 34.013605442 |
34 |
I2S Enable
You must enable the I2S controller before any data can be received or transmitted from or into the FIFOs. To enable the component, set the I2S enable (I2S_EN) bit of the I2S Enable Register (EN) to 1. When you disable the module, it acts as a global disable. To disable I2S controller, set EN[0] to 0.
After disable, the following events occur:
- TX and RX FIFOs are cleared, and read/write pointers are reset.
- Any data being transmitted or received is lost.
- All other programmable enables (such as transmitter/receiver block enables and individual TX/RX channel enables) in the component are overridden.
- Generation of master mode clock signals sclk_en, ws_out, and sclk_gate are disabled (for instance, they are held low).
When I2S controller is enabled and configured as a master, the device always starts in the left stereo data cycle (WS = 0), and one SCLK cycle after transitions to the right stereo data cycle (WS = 1). This allows for half a frame of SCLKS to write data to the TX FIFOs and to ensure that any connected slave receivers do not miss the start of the data frame (for instance, the WS 1: to-0 transition) once the SCLK restarts. (When I2S controller is configured as a slave, WS is externally supplied.) On reset, the EN[0] is set to 0 (disable).
I2S as Transmitter
I2S Master controller and I2S Slave controller support 1 I2S transmit (TX) channel. Stereo data pairs (such as, left and right audio data) written to a TX channel by CPU are shifted out serially on the appropriate serial data out line. The shifting is timed with respect to SCLK and WS.
图 132 illustrates the basic usage flow for an I2S controller when it acts as a transmitter.
I2S as Receiver
I2S Master controller and I2S Slave controller support 1 I2S receive (RX) channel. Stereo data pairs (such as, left and right audio data) are received serially from a data input line. These data words are stored in RX FIFOs until they are read by CPU. The receiving is timed with respect to SCLK and WS.
图 133 illustrates the basic usage flow for an I2S controller when it acts as a receiver.
I2S FIFO
The I2S module provides two 16-word FIFOs, one for transmission and the other for reception. By configuring the Receive FIFO Configuration Register (RX_FIFO_CFG), you can program the trigger level in the RX FIFO at which the Received Data Available Interrupt is generated. By configuring Transmit FIFO Configuration Register (TX_FIFO_CFG), you can program the trigger level in the TX FIFO at which the Empty Threshold Reached Interrupt is generated. In addition, the Interrupt Mask Register (INT_MASK) is supported to mask TX/RX FIFO overrun and empty interrupts.
I2S DMA
The I2S module supports four DMA channels for I2S slave transmit, I2S slave receive, I2S master transmit, and I2S master receive respectively. The Receiver Block DMA Register (RX_DMA), Reset Receiver Block DMA Register (RST_RX_DMA), Transmitter Block DMA Register (TX_DMA), and Reset Transmitter Block DMA Register (RST_TX_DMA) are provided to configure these channels.
Registers
EN
- Name: I2S Enable Register
- Description: This register acts as a global enable/disable for I2S.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x0
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
I2S_EN |
RW |
0x0 |
I2S enable bit. This bit enables or disables I2S. A disable on this bit overrides any other block or channel as well as enables and flushes all FIFOs. Value:
|
RX_EN
- Name: I2S Receiver Block Enable Register
- Description: This register acts as an enable/disable for the I2S receiver block.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x4
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
RX_EN |
RW |
0x0 |
Receiver block enable. This bit enables or disables the receiver. A disable on this bit overrides any individual receive channel. Value:
|
TX_EN
- Name: I2S Transmitter Block Enable Register
- Description: This register acts as an enable/disable for the I2S transmitter block.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x8
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
TX_EN |
RW |
0x0 |
Transmitter block enable. This bit enables or disables the transmitter. A disable on this bit overrides any individual transmit channel. Value:
|
CLK_EN
- Name: Clock Enable Register
- Description: This register acts as an enable/disable for the I2S clock generation block.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0xC
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
CLK_EN |
RW |
0x0 |
Clock generation enable/disable. This bit enables or disables the clock generation signals when I2S is a master. Value:
Note: When the I2S is configured as a slave, this register serves no purpose. |
SCLK_CFG
- Name: Clock Configuration Register
- Description: This register configures the WS when I2S is a master.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x10
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:5 |
RSVD |
R |
Reserved bits |
|
4:3 |
WS_SCLK |
RW |
0x0 |
These bits are used to program the number of SCLK cycles for which the word select line (ws_out) stays in the left or right sample mode. The I2S clock generation block must be disabled (CLK_EN [0] = 0) prior to any changes in this value. Value:
|
2:0 |
SCLK_GAT |
RW |
0x0 |
These bits are used to program the gating of SCLK. The programmed gating value must be less than or equal to the largest configured/programmed audio resolution to prevent the truncating of RX/TX data. The I2S clock generation block must be disabled (CLK_EN[0] = 0) before making any changes in this value. Values:
Exists: This register is only relevant when component is configured to be a master (I2S_MODE_EN = 1). |
RX_FIFO_RST
- Name: Receiver Block FIFO Reset Register
- Description: This register specifies the Receiver Block FIFO Reset Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x14
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
RX_FIFO_RST |
W |
0x0 |
Receiver FIFO reset bit. Writing a 1 to this register flushes all the RX FIFOs (this is a self clearing bit). The receiver block must be disabled before writing to this bit. Value:
|
TX_FIFO_RST
- Name: Transmitter Block FIFO Reset Register
- Description: This register specifies the Transmitter Block FIFO Reset Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x18
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
TX_FIFO_RST |
W |
0x0 |
Transmitter FIFO Reset. Writing a 1 to this register flushes all the TX FIFOs (this is a self clearing bit). The transmitter block must be disabled before writing to this bit. Value:
|
LEFT_RX_BUF
- Name: Left Receive Buffer Register
- Description: This specifies the Left Receive Buffer Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x20
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
LEFT_RX_BUF |
R |
0x0 |
The left stereo data received serially from the receive channel input (SDI) is read through this register. If the RX FIFO is full, and the two-stage read operation (for instance, a read from LEFT_RX_BUF followed by a read from RIGHT_RX_BUF) is not performed before the start of the next stereo pair, the new data is lost and an overrun interrupt occurs (data already in the RX FIFO is preserved). Note: Before reading this register again, the right stereo data must be read from RIGHT_RX_BUF; otherwise the status/interrupts will not be valid. |
LEFT_TX_HDG
- Name: Left Transmit Holding Register
- Description: This specifies the Left Transmit Holding Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x20
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
LEFT_TX_HDG |
W |
0x0 |
The left stereo data to be transmitted serially through the transmit channel output (SDO) is written through this register. Writing is a two-stage process:
Data must only be written to the FIFO when it is not full. Any attempt to write to a full FIFO results in data being lost and an overrun interrupt being generated. |
RIGHT_RX_BUF
- Name: Right Receive Buffer Register
- Description: This specifies the Right Receive Buffer Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x24
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
RIGHT_RX_BUF |
R |
0x0 |
The right stereo data received serially from the receive channel input (SDI) is read through this register. If the RX FIFO is full, and the two-stage read operation (for instance, read from LEFT_RX_BUF followed by a read from RIGHT_RX_BUF) is not performed before the start of the next stereo pair, the new data is lost and an overrun interrupt occurs (data already in the RX FIFO is preserved). Note: Before reading this register, the left stereo data MUST be read from LEFT_RX_BUF; otherwise the status/interrupts will not be valid. |
RIGHT_TX_HDG
- Name: Right Transmit Holding Register
- Description: This specifies the Right Transmit Holding Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x24
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
RIGHT_TX_HDG |
W |
0x0 |
The right stereo data to be transmitted serially through the transmit channel output (SDO) is written through this register. Writing is a two-stage process:
Data must only be written to the FIFO when it is not full. Any attempt to write to a full FIFO results in data being lost and an overrun interrupt being generated. |
RX_CH_EN
- Name: Receive Enable Register
- Description: This specifies the Receive Enable Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x28
- Reset Value: 0x00000001
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
RX_CH_EN |
RW |
0x1 |
Receive channel enable bit. This bit enables/disables a receive channel. On enable, the channel begins receiving on the next left stereo cycle. A global disable of I2S (EN [0] = 0) or the receiver block (RX_EN [0] = 0) overrides this value. Value:
|
TX_CH_EN
- Name: Transmit Enable Register
- Description: This specifies the Transmit Enable Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x2c
- Reset Value: 0x00000001
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
TX_CH_EN |
RW |
0x1 |
Transmit channel enable bit. This bit enables/disables a transmit channel. On enable, the channel begins transmitting on the next left stereo cycle. A global disable of I2S (EN [0] = 0) or transmitter block (TX_EN [0] = 0) overrides this value. Value:
|
RX_CFG
- Name: Receive Configuration Register
- Description: This specifies the Receive Configuration Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x30
- Reset Value: 0x00000005
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:3 |
RSVD |
R |
Reserved bits |
|
2:0 |
WORD_LEN |
RW |
0x5 |
These bits are used to program the desired data resolution of the receiver and enable the LSB of the incoming left (or right) word to be placed in the LSB of the LEFT_RX_BUF (or RIGHT_RX_BUF) register. Programmed data resolutions must be less than or equal to 0x5. If the selected resolution is greater than 0x5, the receive channel defaults go back to 0x5. The channel must be disabled prior to any changes in this value (RX_EN0[0] = 0). Value:
|
TX_CFG
- Name: Transmit Configuration Register
- Description: This specifies the Transmit Configuration Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x34
- Reset Value: 0x00000005
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:3 |
RSVD |
R |
Reserved bits |
|
2:0 |
WORD_LEN |
RW |
0x5 |
These bits are used to program the data resolution of the transmitter and ensure the MSB of the data is transmitted first. Programmed resolutions must be less than or equal to 0x5. If the selected resolution is greater than 0x5, the transmit channel defaults go back to 0x5. The channel must be disabled prior to any changes in this value (TX_EN [0] = 0). Value:
|
INT_STAT
- Name: Interrupt status Register
- Description: This specifies the Interrupt Status Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x38
- Reset Value: 0x00000010
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:6 |
RSVD |
R |
Reserved bits |
|
5 |
TX_FIFO_OVER |
R |
0x0 |
Status of data overrun interrupt for the TX channel. This bit specifies whether the TX FIFO write is valid or an overrun. Attempt to write to full TX FIFO. Value:
|
4 |
TX_FIFO_EMPTY |
R |
0x1 |
Status of transmit empty trigger interrupt. This bit specifies whether the TX FIFO trigger level has been reached or not. TX FIFO is empty. Value:
|
3:2 |
RSVD |
R |
Reserved bits |
|
1 |
RX_FIFO_OVER |
R |
0x0 |
Status of data overrun interrupt for the RX channel. Incoming data will be lost due to a full RX FIFO. Value:
|
0 |
RX_DATA_AVL |
R |
0x0 |
Status of receive data available interrupt. This bit denotes the status of the RX FIFO trigger level. Value:
|
INT_MASK
- Name: Interrupt Mask Register
- Description: This specifies the Interrupt Mask Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x3c
- Reset Value: 0x00000033
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:6 |
RSVD |
R |
Reserved bits |
|
5 |
TX_FOM |
RW |
0x1 |
Masks TX FIFO overrun interrupts. This bit masks or unmasks a TX FIFO overrun interrupt. Value:
|
4 |
TX_FEM |
RW |
0x1 |
Masks TX FIFO empty interrupt. This bit masks or unmasks a TX FIFO empty interrupt. Value:
|
3:2 |
RSVD |
R |
Reserved bits |
|
1 |
RX_FOM |
RW |
0x1 |
Masks RX FIFO overrun interrupt. This bit masks or unmasks an RX FIFO overrun interrupt. Value:
|
0 |
RX_DAM |
RW |
0x1 |
Masks RX FIFO data available interrupt. This bit masks or unmasks an RX FIFO data available interrupt. Value:
|
RX_OVER
- Name: Receive Overrun Register
- Description: This specifies the Receive Overrun Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x40
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
RX_CLR_FDO |
R |
0x0 |
Read this bit to clear the RX FIFO data overrun interrupt. Value:
|
TX_OVER
- Name: Transmit Overrun Register
- Description: This specifies the Transmit Overrun Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x44
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
TX_CLR_FDO |
R |
0X0 |
Read this bit to clear the TX FIFO data overrun interrupt. Value:
|
RX_FIFO_CFG
- Name: Receive FIFO Configuration Register
- Description: This specifies the Receive FIFO Configuration Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x48
- Reset Value: 0x00000008
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:4 |
RSVD |
R |
Reserved bits |
|
3:0 |
RX_FIFO_TL |
RW |
0x8 |
These bits program the trigger level in the RX FIFO at which the received data available interrupt is generated. Trigger Level = Programmed Value + 1 Value:
|
TX_FIFO_CFG
- Name: Transmit FIFO Configuration Register
- Description: This specifies the Transmit FIFO Configuration Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x4c
- Reset Value: 0x00000008
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:4 |
RSVD |
R |
Reserved bits |
|
3:0 |
TX_FIFO_TL |
RW |
0x8 |
These bits program the trigger level in the TX FIFO at which the empty threshold reached interrupt is generated. Trigger Level = TXCHET Value:
|
RX_FIFO_FLUSH
- Name: Receive FIFO Flush Register
- Description: This specifies the Receive FIFO Flush Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x50
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
RX_FIFO_RST |
W |
0x0 |
Receive channel FIFO reset. Writing a 1 to this register flushes an individual RX FIFO (this is a self clearing bit). An RX channel or block must be disabled prior to writing to this bit. Value:
|
TX_FIFO_FLUSH
- Name: Transmit FIFO Flush Register
- Description: This specifies the Transmit FIFO Flush Register.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x54
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
TX_FIFO_RST |
W |
0x0 |
Transmit channel FIFO reset. Writing a 1 to this register flushes an individual TX FIFO (this is a self clearing bit). A TX channel or block must be disabled prior to writing to this bit. Value:
|
RX_DMA
- Name: Receiver Block DMA Register
- Description: The RX_DMA register allows access to receive channel via a single point rather than through the LEFT_RX_BUF and RIGHT_RX_BUF registers. The receive channel is targeted in a cyclical fashion (starting at the lowest numbered enabled channel) and takes two reads (left and right stereo data) before the component points to the next channel.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x1c0
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
RX_DMA |
RW |
0x0 |
Receiver Block DMA Register. This bit is used to cycle repeatedly through the enabled receive channel, reading stereo data pairs. |
RST_RX_DMA
- Name: Reset Receiver Block DMA Register
- Description: The RX_DMA can be reset to the enabled channel via the RST_RX_DMA register. The RST_RX_DMA register can be written to at any stage of the RX_DMA's read cycle; however, it has no effect when the component is in the middle of a stereo pair read.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x1c4
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
RST_RX_DMA |
W |
0x0 |
Reset Receiver Block DMA Register. Writing a 1 to this self-clearing register resets the RX_DMA register mid-cycle to point to the enabled receive channel. Value:
|
TX_DMA
- Name: Transmitter Block DMA Register
- Description: The TX_DMA register functions in a similar way to the RX_DMA register and allows write accesses to all of the enabled transmit channels via a single point rather than through the LEFT_TX_HDG and RIGHT_TX_HDG registers.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x1c8
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
R |
Reserved bits |
|
0 |
TX_DMA |
RW |
0x0 |
Transmitter Block DMA Register. This bit is used to cycle repeatedly through the enabled transmit channel to allow writing of stereo data pairs. |
RST_TX_DMA
- Name: Reset Transmitter Block DMA Register
- Description: This register provides the same functionality as the RST_RX_DMA register but targets TX_DMA instead.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x1cc
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:1 |
RSVD |
W |
Reserved bits |
|
0 |
RST_TX_DMA |
W |
0x0 |
Reset Transmitter Block DMA Register. Writing a 1 to this self-clearing register resets the TX_DMA register mid-cycle to point to the enabled transmit channel. Value:
|
CLK_CFG
- Name: I2S Clock Configure Register
- Description: This register is used to configure I2S master clock.
- Base Address: 0x4000F200 (master) and 0x4000F000 (slave)
- Offset: 0x268
- Reset Value: 0x00040008
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:19 |
RSVD |
R |
Reserved bits |
|
18 |
CLK_SRC_SEL |
RW |
0x1 |
Selects a clock divider source.
|
17 |
RSVD |
R |
Reserved bit |
|
16 |
DIV_EN |
RW |
0x0 |
Enables I2S clock divider. |
15:12 |
RSVD |
R |
Reserved bits |
|
11:0 |
DIV |
RW |
0x8 |
Ratio = 1/(div + 2). Duty cycle is not 50 when the number is odd. For example: div = 0, ratio = 1/2 |
Electrical Specifications
Symbol | Description | Min. | Typ. | Max. | Unit |
---|---|---|---|---|---|
fSCK |
I2S clock frequency |
3072 |
kHz |
||
tSUSDI |
Data input setup time (from SDI to SCK) |
20 |
ns |
||
tHDSDI |
Data input hold time (from SCK to SDI change) |
15 |
ns |
||
tVSDO |
Data output valid time (from SCK to SDO valid) |
20 |
ns |
||
DCSCK |
SCK clock duty cycle |
45 |
55 |
% |
The I2S timing diagram is as below:
