xCore 200 I2S and USB master clock?

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
niektb
Member++
Posts: 28
Joined: Tue Mar 26, 2019 8:38 am

xCore 200 I2S and USB master clock?

Post by niektb »

Hi all!

I'm designing a USB-I2S bridge to be used in Audio DACs but I'm having some difficulties figuring out how to connect the master clocks!
It seems that I need to use a 24MHz clock for the USB PHY to work but I need 24.576MHz for I2S. Does anyone have an idea how I can make this work? (pretty sure others have found a solution)
(note that the DAC i'm currently using has a built-in PLL and doesn't need a master clock but I assume the XMOS needs something to generate the I2S from)

Thanks in advance!

Regards,

Niek


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. First, my disclaimer, not an audio developer but best for you to review the assorted kits by XMOS, etc. to see what they are doing for the required clock generation.

Have seen the audio kits use a custom (factory) programmed PLL from Silabs with p/n Si5351A. Another is a PLL that was by formerly Micrel and now by Microchip (who bought out Micrel).

This XMOS defined PLL that is used on assorted audio kits / tools is available through Digikey & Mouser:

Si5351A-B04486-GT

; you MUST reference this EXACT p/n and then you will receive a factory programmed PLL that upon power will emit the clock frequencies that are suitable for your audio project. See the attached datasheet for this component. Already see that Digikey and Mouser are messing up the links to the datasheet for this version of the part. Brutal....

So the premise is to use this power up clock source and either divide by externally OR use I2C bus master code to tweak the clock output for any customization.

We use the Si5351A on assorted designs and they work well (not audio related but still a suitable and reliable clock source). We created a custom version of the PLL where CLK0 is a different value. Some quick background details are that yes 24 Mhz or multiple of is required for USB support (common to the industry). Keep in mind that while you are dialing up your custom clock, you CANNOT disturb your CPU clock else you will have a lockup!! Pretty sure that there are 2 independent clock generators inside this PLL where CLK0 is separate to the CLK1, CLK2 and that is an expected feature for a working design :)

See this thread for some additional details (including our source code on how to work with the above PLL):

https://www.xcore.com/viewtopic.php?t=4599

So in your design, place down say a 3225 footprint 25.00 Mhz CRYSTAL (clock oscillators are not supported for this exact PLL device) and wire up like XMOS does in their kits. This way, you can literally drag & drop their IP / firmware onto your widget.

Hope this helps.
Attachments
Si5351A-B04486-GT_datasheet_addendum.pdf
(6.32 KiB) Downloaded 128 times
Si5351A-B04486-GT_datasheet_addendum.pdf
(6.32 KiB) Downloaded 128 times
niektb
Member++
Posts: 28
Joined: Tue Mar 26, 2019 8:38 am

Post by niektb »

Okay, that only answers my question partially... What if I don't need a clock source for the DAC? Can't the XMOS do some kind of clock conversion himself such that the i2s clocks are generated from a 24MHz master?
niektb
Member++
Posts: 28
Joined: Tue Mar 26, 2019 8:38 am

Post by niektb »

(I already ordered the PCBs so I'm hoping I can get away with using USB ánd I2S using one clock source (without having to redo the layouting) :P
Post Reply