Page 1 of 1

How to implement TDM slave mode?

Posted: Wed Dec 18, 2019 10:09 am
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

Re: How to implement TDM slave mode?

Posted: Wed Dec 18, 2019 4:33 pm
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.

Re: How to implement TDM slave mode?

Posted: Thu Dec 19, 2019 9:42 am
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

Re: How to implement TDM slave mode?

Posted: Thu Dec 19, 2019 1:19 pm
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?

Re: How to implement TDM slave mode?

Posted: Fri Jun 04, 2021 10:50 pm
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?

Re: How to implement TDM slave mode?

Posted: Sun Jun 06, 2021 12:01 am
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