Multichannel audio board clock requirements Topic is solved
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
Multichannel audio board clock requirements
My question is is it possible to have the xmos xcore-200 MC audio board take 49.152Mhz to MCLK_XCORE, AUDIO_MCLK, MCLK_SPDIF? The Hardware manual of the board just states that there is a need for 24Mhz input on the M_CLK, but then on the clocking sheet there are 2 other clocks which can be used 24.576 MHz (FSEL high) or 22.5792MHz (FSEL low). 24Mhz is needed for USB applications so I have kept that, But I have replaced the circuit with a single oscillator which is providing 24 to the XMOS and 42.152 to another chip (also has one more currently unused programmable out).
View Solution
-
Verified
- XCore Legend
- Posts: 1153
- Joined: Thu May 27, 2010 10:08 am
49.152MHz MCLK is no problem. In fact, you can generate it from the board without any HW mods.
Change the following in customdefines.h:
from:
to:
Add the following flag to the Makefile:
What this does is switch over to the CS2100, configure it, and supply a 1MHz clock from an xcore port to the input of the CS2100 which then multiplies it up. Checkout audiohw.xc for the relevant setup, guarded with USE_FRACTIONAL_N conditional compilation.
Change the following in customdefines.h:
from:
Code: Select all
#define MCLK_441 (512*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (512*48000) /* 48, 96 etc */
Code: Select all
#define MCLK_441 (1024*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (1024*48000) /* 48, 96 etc */
Add the following flag to the Makefile:
Code: Select all
-DUSE_FRACTIONAL_N=1
Engineer at XMOS
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
-
Verified
- XCore Legend
- Posts: 1153
- Joined: Thu May 27, 2010 10:08 am
Ah OK - so it's just literally a change in MCLK. So all you need to change is:
1) Relevant I2C setup for your device to get the MCLK set
2) Tell the software that the MCLK is different
1) Relevant I2C setup for your device to get the MCLK set
2) Tell the software that the MCLK is different
#define MCLK_441 (1024*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (1024*48000) /* 48, 96 etc */
Engineer at XMOS
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
Awesome. Amazing help again, thanks