I2S/TDM Library
I2S/TDM Library
A software library that allows you to control an I2S or TDM (time division multiplexed) bus via xCORE ports. I2S and TDM are digital data streaming interface particularly appropriate for transmission of audio data. The components in the libary are controlled via C using the XMOS multicore extensions (xC) and can either act as I2S master, TDM master or I2S slave.
Features
- I2S master (sample and frame-based), TDM master and I2S slave modes.
- Handles multiple input and output data lines.
- Support for standard I2S, left justified or right justified data modes for I2S.
- Support for multiple formats of TDM synchronization signal.
- Sample rate support up to 192KHz.
- Up to 32 channels in/32 channels out (depending on sample rate)
Resource Usage
This following table shows typical resource usage in some different configurations. Exact resource usage will depend on the particular use of the library by the application.
Configuration |
Pins |
Ports |
Clocks |
Ram |
Logical cores |
---|---|---|---|---|---|
I2S Master |
3 + data lines |
3 x (1-bit) + data lines |
2 |
~2.1K |
1 |
I2S Master (frame-based) |
3 + data lines |
3 x (1-bit) + data lines |
2 |
~1.6K |
1 |
I2S Slave |
2 + data lines |
2 x (1-bit) + data lines |
1 |
~1.5K |
1 |
TDM Master |
2 + data lines |
2 x (1-bit) + data lines |
1 |
~1.8K |
1 |
Software version and dependencies
This document pertains to version 2.2.0 of this library. It is known to work on version 14.2.3 of the xTIMEcomposer tools suite, it may work on other versions.
This library depends on the following other libraries:
- lib_xassert (>=3.0.0)
- lib_logging (>=2.1.0)
Related application notes
The following application notes use this library:
- AN00162 - Using the I2S library