I need to switch four mclk oscillators.

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
Biquad
Member++
Posts: 20
Joined: Wed May 24, 2017 11:38 am

I need to switch four mclk oscillators.

Post by Biquad »

Hello.
i my application i need different selectable mclks 22, 24,45,49 MHz.
I need the 45, 49Mhz set only to support 356kHz and above. XU208 TQ64
Problems is that the xmos audio software costumdefines.h have defines for
only two mclks tasks.
EG 45,49 MHZ
/* Master clock defines (in Hz) */
#define MCLK_441 (1024*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (1024*48000) /* 48, 96 etc */
EG 22,24 MHZ
/* Master clock defines (in Hz) */
#define MCLK_441 (512*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (512*48000) /* 48, 96 etc */

Normally i do the oscillator selection in the audiohw.xc
If(samplerate % 22050 ) = 0 -> Switch on via GPIO

How can i switch between eg 22 and 45 Mhz ? if i use one set of defines the clock calculation went wrong.

Best regards
Andreas


mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

Locate define using and replace with variable code...
Biquad
Member++
Posts: 20
Joined: Wed May 24, 2017 11:38 am

Post by Biquad »

Good idea. Thanks. I will have a look next week.
Post Reply