mic_array board and adc out time usage

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
aclassifier
Respected Member
Posts: 483
Joined: Wed Apr 25, 2012 8:52 pm
Contact:

Post by aclassifier »

I queried at Stack Exchange, Electrical Engineering. Don't know if it has a higher success rate then this forum. Here it is:I have an XMOS 7-mic board using the CS43L21 for ADC output. I get it working at 48 kHz, but not at 8 kHz, following the example of XMOS AN00219

I have tried to alter some parameters, but with the sheer possibilities and a round trip on my old 2010 Mac Mini (for xTIMEcomposer 14.4.1 only) of at least 3 minutes, I'm already exhausted. Should I also present it here?

Code: Select all

// By the way, the 

#define MASTER_TO_PDM_CLOCK_DIVIDER 4
#define MASTER_CLOCK_FREQUENCY      24576000
#define PDM_CLOCK_FREQUENCY         (MASTER_CLOCK_FREQUENCY/(2*MASTER_TO_PDM_CLOCK_DIVIDER))
#define OUTPUT_SAMPLE_RATE          (PDM_CLOCK_FREQUENCY/(32*DECIMATION_FACTOR))
//
i2s_config.mclk_bclk_ratio = (MASTER_CLOCK_FREQUENCY/OUTPUT_SAMPLE_RATE)/64;

// is reduced to (not that it matters):

i2s_config.mclk_bclk_ratio = DECIMATION_FACTOR * MASTER_TO_PDM_CLOCK_DIVIDER; // 8 for 48 kHz (works), 48 for 8 kHz (silent)


--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
CousinItt
Respected Member
Posts: 360
Joined: Wed May 31, 2017 6:55 pm

Post by CousinItt »

I don't know if the i2s_master will work correctly if the mclk-bclk ratio is not a power of 2, or if it's greater than 32. You might want to try a different ratio to check.
User avatar
aclassifier
Respected Member
Posts: 483
Joined: Wed Apr 25, 2012 8:52 pm
Contact:

Post by aclassifier »

Ok, that's a thought. I tested 8, 16, 24, 36, 48, 60, 72, 96 - but only 8 worked (48 kHz)
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
User avatar
aclassifier
Respected Member
Posts: 483
Joined: Wed Apr 25, 2012 8:52 pm
Contact:

Post by aclassifier »

Sigh.. Sorry for the misleading heading here, the three letters danced in my brain! ADC -> DAC all over the place
--
Øyvind Teig
Trondheim (Norway)
https://www.teigfam.net/oyvind/home/
Post Reply