TDM on the xcore mic-array

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
JordenLuke
Member
Posts: 10
Joined: Fri Aug 11, 2017 6:21 pm
Contact:

TDM on the xcore mic-array

Post by JordenLuke »

I have been trying to get the TDM master going on the this board with no luck. I followed the example in the TDM I2S library. Is there an example or someone who has used TDM that can help make sure I got mine setup correctly.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Hi,
this is definitely possible, although personally I haven't done TDM yet (have done I2S many times). Are you looking for TDM slave or master? If the xcore side can be TDM master then lib_i2s will work. Can you confirm which mic array board you have? If it's the round one with the CS2100 on it, I'd follow AN00219 as a basis and strip out the delay and sum calc.
That will show you how to set up a basic pdm->buffer->TDM chain.
JordenLuke
Member
Posts: 10
Joined: Fri Aug 11, 2017 6:21 pm
Contact:

Post by JordenLuke »

I have the xCore Mircophone array XP-USB-UF216. I plan on doing it as a master at this point. This is because it doesn't look like the TDM slave is available via the i2s library at this point. So I don't know if it is the cs2100 on the chip it i see u1169202. So if that helps. I will look at that note. I have also been trying to get it work with our custom board. I have the mircophones working well it is the TDM part that I haven't got working. I fallowed the setup according to the library.

Thanks
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

I have the xCore Mircophone array XP-USB-UF216. I plan on doing it as a master at this point. This is because it doesn't look like the TDM slave is available via the i2s library at this point. So I don't know if it is the cs2100 on the chip it i see u1169202. So if that helps. I will look at that note. I have also been trying to get it work with our custom board. I have the mircophones working well it is the TDM part that I haven't got working. I fallowed the setup according to the library.
Ah OK - so you have the "round board" then. Yes that does have the CS2100, so in fact you do have the right hardware to recover an MCLK clock as a slave device. As you say, TDM slave is not supported in lib_i2s currently. However, TDM slave is supported by the I2S module in the USB audio firmware https://www.xmos.com/support/software/uac2. It is possible to extract the right bits from there and re-use them. The app app_usb_aud_mic_array sets up the PLL/DAC etc. too.

If there's appetite for this I don't mind working on some steps to guide how to do this.

Regarding getting TDM master from lib_i2s working - I'd recommend starting with a simple loopback such as AN00162_i2s_loopback_demo.

What does the debugger say? Is it getting stuck somewhere in particular?
JordenLuke
Member
Posts: 10
Joined: Fri Aug 11, 2017 6:21 pm
Contact:

Post by JordenLuke »

So I am really new to Xcore and the Xmos processor. I haven't really figured out the debugger.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

So I am really new to Xcore and the Xmos processor. I haven't really figured out the debugger.
Ah Ok - well welcome to Xmos! You seem to be making pretty reasonable progress. I think you'll find the debugger helpful though - you don't need to necessarily know all of the details but it can be useful to see where code is getting stuck. That is quite a common failure mode of code during development of one task is waiting on another etc. A bit of visibility into your system using the debugger will make a huge difference.

Some help for debugging using the GUI - https://www.xmos.com/download/private/U ... 90A%29.pdf

And on the command line (if that's your thing) you can simply:

Code: Select all

xrun <mybinary.xe>
then allow it to run...followed by

Code: Select all

 xrun --dump-state <mybinary.xe>
which will provide all sorts of useful info like registers, listing of where the code is and backtrace.
Post Reply