XU316 and I2S/TDM Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
alex4d1
Member++
Posts: 26
Joined: Mon May 13, 2024 11:38 pm

XU316 and I2S/TDM

Post by alex4d1 »

Hi all,

I've been trying to find the limitation of the I2S/TDM library.

My application requires 10 output channels at 96ksps.
Each channel plays continuously a corresponding 50ms sample that is read into RAM on bootup. This means no input channels are required.

Looking through the documentation of the lib_i2s library I noticed the tables "Known working I²S controller configurations ..." which do not contain a configuration with 10 output channels at 96ksps.
I haven't selected a DAC yet, so both I2S and TDM are viable options.

Will I be able to use a XU316 and drive 10x output channels at 96ksps with it?

Thanks
Alex
View Solution
User avatar
fabriceo
XCore Addict
Posts: 246
Joined: Mon Jan 08, 2018 4:14 pm

Post by fabriceo »

Hi Alex
so you need to drive 10 Analog outputs at 96khz sample rate from the xu316 with a static pattern of data in ram.
Assuming you would have 5 stereo dacs (or one stereo and one 8 channels) the preferred solution is to use I2S with 5 lines of data and 1 for bclk , 1 for lrclk , 1 for mclk master clock.
at 96khz, blckk will be 6.144mhz and master clock should be the standard 12.288mhz or 24.576mhz to be chosen depending on the characteristics of the DACs. All of this is perfectly compatible with xu316 and such low frequencies are easy to deal with.
you have to chose an xu316 package which will offer at least 8 pins connected to 1bit ports on tile 1 (tile 0 is usually for usb where the number of 1 bit port is constrained).

using the lib_I2s is an option but otherwise configuring the ports and the clocks for such a project can be done in few lines easily, and delivering 4800samples of data to each of the 5 DATA lines with an LRCLK pattern is probably easier to implement than accomodating the lib_i2s api.

going TDM is also a valid option for 8 channels with a bit clock at 96k x 8 x 32 = 24.576mhz but then you need to add a single I2S and its own bclk/lrclk for the remaining stereo dac, which bring more complexity and you have to deal with more sensitive frequencies.

hope this helps
alex4d1
Member++
Posts: 26
Joined: Mon May 13, 2024 11:38 pm

Post by alex4d1 »

Thank you for quick response