\n

I2S

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x18 byte (0x0)
mem_usage : registers
protection : not protected

Registers

I2SCON

I2STXFIFO

I2SRXFIFO

I2SCLKDIV

I2SIE

I2SSTATUS


I2SCON

I2S Control Register
address_offset : 0x0 Bytes (0x0)
access : read-write
reset_value : 0x0
reset_Mask : 0x0

I2SCON I2SCON read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I2SEN TXEN RXEN MUTE WORDWIDTH MONO FORMAT SLAVE TXTH RXTH MCLKEN RCHZCEN LCHZCEN CLR_TXFIFO CLR_RXFIFO TXDMA RXDMA RXLCH

I2SEN : I2S Controller Enable \n
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Disabled

#1 : 1

Enabled

End of enumeration elements list.

TXEN : Transmit Enable\n
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Data transmit Disabled

#1 : 1

Data transmit Enabled

End of enumeration elements list.

RXEN : Receive Enable\n
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

Data receiving Disabled

#1 : 1

Data receiving Enabled

End of enumeration elements list.

MUTE : Transmit Mute Enable\n
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

#0 : 0

Transmit data is shifted from buffer

#1 : 1

Transmit channel zero

End of enumeration elements list.

WORDWIDTH : Word Width\n
bits : 4 - 5 (2 bit)
access : read-write

Enumeration:

#00 : 0

data is 8-bit

#01 : 1

data is 16-bit

#10 : 2

data is 24-bit

#11 : 3

data is 32-bit

End of enumeration elements list.

MONO : Monaural Data\n
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

#0 : 0

Data is stereo format

#1 : 1

Data is monaural format

End of enumeration elements list.

FORMAT : Data Format\n
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

#0 : 0

I2S data format

#1 : 1

MSB justified data format

End of enumeration elements list.

SLAVE : Slave Mode\nI2S can operate as master or slave. For Master mode, I2S_BCLK and I2S_LRCLK pins are output mode and send bit clock from NuMicro( NUC200 series to Audio CODEC chip. In Slave mode, I2S_BCLK and I2S_LRCLK pins are input mode and I2S_BCLK and I2S_LRCLK signals are received from outer Audio CODEC chip.\n
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

#0 : 0

Master mode

#1 : 1

Slave mode

End of enumeration elements list.

TXTH : Transmit FIFO Threshold Level\nIf remaining data word (32 bits) in transmit FIFO is the same or less than threshold level then TXTHF flag is set.\n
bits : 9 - 11 (3 bit)
access : read-write

Enumeration:

#000 : 0

0 word data in transmit FIFO

#001 : 1

1 word data in transmit FIFO

#010 : 2

2 words data in transmit FIFO

#011 : 3

3 words data in transmit FIFO

#100 : 4

4 words data in transmit FIFO

#101 : 5

5 words data in transmit FIFO

#110 : 6

6 words data in transmit FIFO

#111 : 7

7 words data in transmit FIFO

End of enumeration elements list.

RXTH : Receive FIFO Threshold Level\nWhen received data word(s) in buffer is equal to or higher than threshold level then RXTHF flag is set.\n
bits : 12 - 14 (3 bit)
access : read-write

Enumeration:

#000 : 0

1 word data in receive FIFO

#001 : 1

2 word data in receive FIFO

#010 : 2

3 word data in receive FIFO

#011 : 3

4 word data in receive FIFO

#100 : 4

5 word data in receive FIFO

#101 : 5

6 word data in receive FIFO

#110 : 6

7 word data in receive FIFO

#111 : 7

8 word data in receive FIFO

End of enumeration elements list.

MCLKEN : Master Clock Enable\nIf MCLKEN is set to 1, I2S controller will generate master clock on I2SMCLK pin for external audio devices.\n
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

#0 : 0

Master clock Disabled

#1 : 1

Master clock Enabled

End of enumeration elements list.

RCHZCEN : Right Channel Zero Cross Detect Enable\nIf this bit is set to 1, when right channel data sign bit change or next shift data bits are all 0 then RZCF flag in I2SSTATUS register is set to 1. This function is only available in transmit operation.\n
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

#0 : 0

Right channel zero cross detect Disabled

#1 : 1

Right channel zero cross detect Enabled

End of enumeration elements list.

LCHZCEN : Left Channel Zero Cross Detect Enable\nIf this bit is set to 1, when left channel data sign bit changes or next shift data bits are all 0 then LZCF flag in I2SSTATUS register is set to 1. This function is only available in transmit operation.\n
bits : 17 - 17 (1 bit)
access : read-write

Enumeration:

#0 : 0

Left channel zero cross detect Disabled

#1 : 1

Left channel zero cross detect Enabled

End of enumeration elements list.

CLR_TXFIFO : Clear Transmit FIFO\nWrite 1 to clear transmit FIFO, internal pointer is reset to FIFO start point, and TXFIFO_LEVEL[3:0] returns to 0 and transmit FIFO becomes empty but data in transmit FIFO is not changed. \nThis bit is cleared by hardware automatically. Returns 0 on read.
bits : 18 - 18 (1 bit)
access : read-write

CLR_RXFIFO : Clear Receive FIFO\nWrite 1 to clear receive FIFO, internal pointer is reset to FIFO start point, and RXFIFO_LEVEL[3:0] returns 0 and receive FIFO becomes empty.\nThis bit is cleared by hardware automatically. Returns 0 on read.
bits : 19 - 19 (1 bit)
access : read-write

TXDMA : Enable Transmit DMA\nWhen TX DMA is enables, I2S request DMA to transfer data from SRAM to transmit FIFO if FIFO is not full.\n
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

#0 : 0

TX DMA Disabled

#1 : 1

TX DMA Enabled

End of enumeration elements list.

RXDMA : Enable Receive DMA\nWhen RX DMA is enabled, I2S requests DMA to transfer data from receive FIFO to SRAM if FIFO is not empty.\n
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

#0 : 0

RX DMA Disabled

#1 : 1

RX DMA Enabled

End of enumeration elements list.

RXLCH : Receive Left Channel Enable\n
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

#0 : 0

Receive right channel data in Mono mode

#1 : 1

Receive left channel data in Mono mode

End of enumeration elements list.


I2STXFIFO

I2S Transmit FIFO Register
address_offset : 0x10 Bytes (0x0)
access : write-only
reset_value : 0x0
reset_Mask : 0x0

I2STXFIFO I2STXFIFO write-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TXFIFO

TXFIFO : Transmit FIFO Register\nI2S contains 8 words (8x32 bits) data buffer for data transmit. Write data to this register to prepare data for transmit. The remaining word number is indicated by TX_LEVEL[3:0] in I2SSTATUS register
bits : 0 - 31 (32 bit)
access : write-only


I2SRXFIFO

I2S Receive FIFO Register
address_offset : 0x14 Bytes (0x0)
access : read-only
reset_value : 0x0
reset_Mask : 0x0

I2SRXFIFO I2SRXFIFO read-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RXFIFO

RXFIFO : Receive FIFO Register\nI2S contains 8 words (8x32 bits) data buffer for data receive. Read this register to get data in FIFO. The remaining data word number is indicated by RX_LEVEL[3:0] in I2SSTATUS register.
bits : 0 - 31 (32 bit)
access : read-only


I2SCLKDIV

I2S Clock Divider Control Register
address_offset : 0x4 Bytes (0x0)
access : read-write
reset_value : 0x0
reset_Mask : 0x0

I2SCLKDIV I2SCLKDIV read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 MCLK_DIV BCLK_DIV

MCLK_DIV : Master Clock Divider\nIf MCLKEN is set to 1, I2S controller will generate master clock for external audio devices. The master clock rate, F_MCLK, is determined by the following expressions.\nF_I2SCLK is the frequency of I2S clock.\nIn general, the master clock rate is 256 times sampling clock rate.
bits : 0 - 2 (3 bit)
access : read-write

BCLK_DIV : Bit Clock Divider\nThe I2S controller will generate bit clock in Master mode. The bit clock rate, F_BCLK, is determined by the following expression.\n
bits : 8 - 15 (8 bit)
access : read-write


I2SIE

I2S Interrupt Enable Register
address_offset : 0x8 Bytes (0x0)
access : read-write
reset_value : 0x0
reset_Mask : 0x0

I2SIE I2SIE read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RXUDFIE RXOVFIE RXTHIE TXUDFIE TXOVFIE TXTHIE RZCIE LZCIE

RXUDFIE : Receive FIFO Underflow Interrupt Enable\nIf software read receive FIFO when it is empty then RXUDF flag in I2SSTATUS register is set to 1.\n
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

RXOVFIE : Receive FIFO Overflow Interrupt Enable\n
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

RXTHIE : Receive FIFO Threshold Level Interrupt Enable\nWhen data word in receive FIFO is equal to or higher then RXTH[2:0] and the RXTHF bit is set to 1. If RXTHIE bit is enabled, interrupt occurs.\n
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

TXUDFIE : Transmit FIFO Underflow Interrupt Enable\nInterrupt occurs if this bit is set to 1 and the transmit FIFO underflow flag is set to 1.\n
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

TXOVFIE : Transmit FIFO Overflow Interrupt Enable\nInterrupt occurs if this bit is set to 1 and the transmit FIFO overflow flag is set to 1\n
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

TXTHIE : Transmit FIFO Threshold Level Interrupt Enable\nInterrupt occurs if this bit is set to 1 and data words in transmit FIFO is less than TXTH[2:0].\n
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

RZCIE : Right Channel Zero-cross Interrupt Enable\nInterrupt occurs if this bit is set to 1 and right channel zero-cross.\n
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

LZCIE : Left Channel Zero-cross Interrupt Enable\nInterrupt occurs if this bit is set to 1 and left channel zero-cross.\n
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.


I2SSTATUS

I2S Status Register
address_offset : 0xC Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

I2SSTATUS I2SSTATUS read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I2SINT I2SRXINT I2STXINT RIGHT RXUDF RXOVF RXTHF RXFULL RXEMPTY TXUDF TXOVF TXTHF TXFULL TXEMPTY TXBUSY RZCF LZCF RX_LEVEL TX_LEVEL

I2SINT : I2S Interrupt Flag\nIt is wire-OR of I2STXINT and I2SRXINT bits.\nThis bit is read only.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

No I2S interrupt

#1 : 1

I2S interrupt

End of enumeration elements list.

I2SRXINT : I2S Receive Interrupt\nThis bit is read only
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

No receive interrupt

#1 : 1

Receive interrupt

End of enumeration elements list.

I2STXINT : I2S Transmit Interrupt\nThis bit is read only
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

No transmit interrupt

#1 : 1

Transmit interrupt

End of enumeration elements list.

RIGHT : Right Channel\nThis bit indicates current transmit data is belong to right channel\nThis bit is read only
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

#0 : 0

Left channel

#1 : 1

Right channel

End of enumeration elements list.

RXUDF : Receive FIFO Underflow Flag\nRead receive FIFO when it is empty, this bit set to 1 indicate underflow occurs.\nWrite 1 to clear this bit to 0.
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

#0 : 0

No underflow

#1 : 1

Underflow

End of enumeration elements list.

RXOVF : Receive FIFO Overflow Flag\nWhen receive FIFO is full and receive hardware attempt to write data into receive FIFO then this bit is set to 1, data in 1st buffer is overwrote.\nWrite 1 to clear this bit to 0.
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

#0 : 0

No overflow

#1 : 1

Overflow

End of enumeration elements list.

RXTHF : Receive FIFO Threshold Flag\nWhen data word(s) in receive FIFO is equal to or higher than threshold value set in RXTH[2:0] the RXTHF bit becomes to 1. It keeps at 1 till RXFIFO_LEVEL[3:0] is less than RXTH[1:0] after software read RXFIFO register.\nThis bit is read only
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

#0 : 0

Data word(s) in FIFO is lower than threshold level

#1 : 1

Data word(s) in FIFO is equal to or higher than threshold level

End of enumeration elements list.

RXFULL : Receive FIFO Full\nThis bit reflects data words number in receive FIFO is 8\nThis bit is read only.
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not full

#1 : 1

Full

End of enumeration elements list.

RXEMPTY : Receive FIFO Empty\nThis bit reflects data words number in receive FIFO is 0\nThis bit is read only.
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not empty

#1 : 1

Empty

End of enumeration elements list.

TXUDF : Transmit FIFO Underflow Flag\nWhen transmit FIFO is empty and shift logic hardware read data from transmit FIFO causes this set to 1.\nSoftware can write 1 to clear this bit to 0
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

#0 : 0

No underflow

#1 : 1

Underflow

End of enumeration elements list.

TXOVF : Transmit FIFO Overflow Flag\nThis bit will be set to 1 if writes data to transmit FIFO when transmit FIFO is full.\nWrite 1 to clear this bit to 0
bits : 17 - 17 (1 bit)
access : read-write

Enumeration:

#0 : 0

No overflow

#1 : 1

Overflow

End of enumeration elements list.

TXTHF : Transmit FIFO Threshold Flag\nWhen data word(s) in transmit FIFO is equal to or lower than threshold value set in TXTH[2:0] the TXTHF bit becomes to 1. It keeps at 1 till TXFIFO_LEVEL[3:0] is higher than TXTH[1:0] after software writes TXFIFO register.\nThis bit is read only
bits : 18 - 18 (1 bit)
access : read-write

Enumeration:

#0 : 0

Data word(s) in FIFO is higher than threshold level

#1 : 1

Data word(s) in FIFO is equal to or lower than threshold level

End of enumeration elements list.

TXFULL : Transmit FIFO Full\nThis bit reflects data word number in transmit FIFO is 8\nThis bit is read only
bits : 19 - 19 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not full

#1 : 1

Full

End of enumeration elements list.

TXEMPTY : Transmit FIFO Empty\nThis bit reflects data word number in transmit FIFO is 0\nThis bit is read only.
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not empty

#1 : 1

Empty

End of enumeration elements list.

TXBUSY : Transmit Busy\nThis bit is cleared to 0 when all data in transmit FIFO and shift buffer is shifted out. And set to 1 when 1st data is load to shift buffer. \nThis bit is read only.
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

#0 : 0

Transmit shift buffer is empty

#1 : 1

Transmit shift buffer is busy

End of enumeration elements list.

RZCF : Right Channel Zero-cross Flag\nIt indicates right channel next sample data sign bit is changed or all data bits are 0.\nWrite 1 to clear this bit to 0
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

#0 : 0

No zero-cross

#1 : 1

Right channel zero-cross is detected

End of enumeration elements list.

LZCF : Left Channel Zero-cross Flag\nIt indicates left channel next sample data sign bit is changed or all data bits are 0.\nWrite 1 to clear this bit to 0.
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

#0 : 0

No zero-cross

#1 : 1

Left channel zero-cross is detected

End of enumeration elements list.

RX_LEVEL : Receive FIFO Level\nThese bits indicate word number in receive FIFO\n
bits : 24 - 27 (4 bit)
access : read-write

Enumeration:

#0000 : 0

No data

#0001 : 1

1 word in receive FIFO

#1000 : 8

8 words in receive FIFO

End of enumeration elements list.

TX_LEVEL : Transmit FIFO Level\nThese bits indicate word number in transmit FIFO\n
bits : 28 - 31 (4 bit)
access : read-write

Enumeration:

#0000 : 0

No data

#0001 : 1

1 word in transmit FIFO

#1000 : 8

8 words in transmit FIFO

End of enumeration elements list.



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.