TDM8 timing of USB Audio reference software

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
rkn
Member
Posts: 13
Joined: Tue Nov 18, 2014 6:23 pm

TDM8 timing of USB Audio reference software

Postby rkn » Fri Jan 12, 2018 6:30 pm

Hello,

I am working with USB Audio 2.0 Device Software on XE216-512-TQ128 (custom hardware). I've sucessfully configured it for TDM8 master operation but I am wondering about the timing specification of the TDM stream. Could not found anything in the docs but I need to configure my DACs right. Thus, can anybody specify things like rising or falling LRCK edge, rising/falling edge BCLK and data delayd by one cycle or not?

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

Postby infiniteimprobability » Mon Jan 15, 2018 10:17 am

hi,
the TDM8 master implementation uses the single sclk cycle duration high pulse per frame. The frame clock is high for the first data bit of the TDM frame.
Page 24 of the CS4384 datasheet shows this nicely.
The relevant piece of code is:


#ifdef I2S_MODE_TDM
if(frameCount == (I2S_CHANS_PER_FRAME-2))
p_lrclk <: 0x80000000;
else
p_lrclk <: 0x00000000;

ie. it will send a 31 x low and the a high at the end of each frame.

When in slave mode it syncs off the rising edge of the frame clock.

I have seen both single sclk width pulses or 50:50 (square) frame clock implementations of TDM8 master. I am not aware that there is a standard as such although the rising edge is generally the important one.
User avatar
akp
XCore Addict
Posts: 201
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Fri Jan 19, 2018 7:15 pm

data is usually output on falling edge of bclk and sampled on rising edge i am pretty sure

Who is online

Users browsing this forum: No registered users and 9 guests