I2S/TDM Library, TDM slave,Why not?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
bear118
Active Member
Posts: 37
Joined: Wed Jan 09, 2019 10:57 am

I2S/TDM Library, TDM slave,Why not?

Post by bear118 »

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 interfaces particularly appropriate for transmission of audio
data. The components in the library 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, 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.
Efficient “frame-based” versions of I2S master and slave allowing use of processor cycles in between
I2S signal handling.
Sample rate support up to 192kHz or 768kHz for “frame-based” versions.
Up to 32 channels in/32 channels out (depending on sample rate and protocol).

TDM slave mode,Can it be developed?

thx


User avatar
bear118
Active Member
Posts: 37
Joined: Wed Jan 09, 2019 10:57 am

Post by bear118 »

#define TDM_MAX_CHANNELS_PER_DATA_LINE 16
if change to 32, or even 256, can XCORE-200 support it steadily?
User avatar
akp
XCore Expert
Posts: 579
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

TDM slave is possible. I developed one based on TDM master using concepts from I2S slave. It probably can't handle quite as many channels as TDM master if you include the code to check for loss of sync (which is pretty much necessary in any slave system I suppose). I haven't used 32 ch in TDM so I can't comment on that one. It seems like it should be possible at a low enough sample rate. IIRC, I don't think a bit clock faster than 25 MHz is possible with the existing framework so for 32 ch @ 32 bits/sample you'd be looking at about 24 kHz for the sample rate, which might not be sufficient for your needs.
User avatar
bear118
Active Member
Posts: 37
Joined: Wed Jan 09, 2019 10:57 am

Post by bear118 »

akp wrote:TDM slave is possible. I developed one based on TDM master using concepts from I2S slave. It probably can't handle quite as many channels as TDM master if you include the code to check for loss of sync (which is pretty much necessary in any slave system I suppose). I haven't used 32 ch in TDM so I can't comment on that one. It seems like it should be possible at a low enough sample rate. IIRC, I don't think a bit clock faster than 25 MHz is possible with the existing framework so for 32 ch @ 32 bits/sample you'd be looking at about 24 kHz for the sample rate, which might not be sufficient for your needs.
Thank you very much!
I hope the XMOS official can provide TDM slave mode.
This is also conducive to the sale of chips.

thx.