How to implement TDM slave mode?

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
susanyin0501
Active Member
Posts: 45
Joined: Thu Apr 20, 2017 9:00 am

How to implement TDM slave mode?

Post by susanyin0501 »

In my project, xmos xu232 will be used to receive TDM datas ( TDM slave mode), receive 32 channels TDM16 fromat data.
In official lib_i2s(3.0.0), just provide I2s master and slave, TDM master reference code. where can i find TDM slave mode code?
would you please give some advice or document? thank a lot.

i found a reference code in xmos github, but test fail, print "sync error". please check attached file
You do not have the required permissions to view the files attached to this post.
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

What you have there is an i2s slave. It's not hard to do TDM slave but you have to combine the concepts from tdm_master.h and i2s_slave.h.
It honestly took me a few days to get it working.
susanyin0501
Active Member
Posts: 45
Joined: Thu Apr 20, 2017 9:00 am

Post by susanyin0501 »

akp wrote: Wed Dec 18, 2019 4:33 pm What you have there is an i2s slave. It's not hard to do TDM slave but you have to combine the concepts from tdm_master.h and i2s_slave.h.
It honestly took me a few days to get it working.
thanks for your reply
Last edited by susanyin0501 on Fri Dec 20, 2019 9:26 am, edited 4 times in total.
susanyin0501
Active Member
Posts: 45
Joined: Thu Apr 20, 2017 9:00 am

Post by susanyin0501 »

susanyin0501 wrote: Thu Dec 19, 2019 9:42 am
akp wrote: Wed Dec 18, 2019 4:33 pm What you have there is an i2s slave. It's not hard to do TDM slave but you have to combine the concepts from tdm_master.h and i2s_slave.h.
It honestly took me a few days to get it working.
thanks for your reply. can you share something for me?
maxmatteo
Member
Posts: 10
Joined: Wed Dec 30, 2020 8:11 pm
Location: Hamburg

Post by maxmatteo »

akp wrote: Wed Dec 18, 2019 4:33 pm What you have there is an i2s slave. It's not hard to do TDM slave but you have to combine the concepts from tdm_master.h and i2s_slave.h.
It honestly took me a few days to get it working.
Do you mind sharing any code examples of a working tdm slave with xcore?
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

I probably can't since it's pretty much tuned to my application. But it started by essentially looking at the i2s slave and i2s master and seeing what I would have to do to make the same changes to tdm master to make tdm slave by basically implementing the same changes made from i2s master to i2s slave