xCore Array Microphone Board 24 bit pops and clicks

New to XMOS and XCore? Get started here.
Junior Member
Posts: 6
Joined: Wed May 29, 2019 1:16 pm

xCore Array Microphone Board 24 bit pops and clicks

Postby snowdog » Wed Jun 05, 2019 7:10 pm

Is it possible to configure this to run at 24 bits or is it limited to 16? I tried configuring it for 24 bits but I'm hearing pops and clicks every few seconds.

I believe I've configured this for a single PDM microphone at 24 bits/48 kHz.

I'm using this build configuration in the makefile:

Code: Select all

I modified customdefines.h as follows (apologies for the condensed formatting, I don't know how to fix that yet). Essentially a single microphone is selected, with a single USB input running at 48 kHz always:

Code: Select all

 * @file       customdefines.h
 * @brief      Defines relating to device configuration and customisation.
 *             For xCORE-200 Microphone Array board
 * @author     Ross Owen, XMOS Limited

/* Prototype for our custom genclock() task */
void genclock();

            on tile[1] : genclock();

 * Device configuration option defines to override default defines found devicedefines.h
 * Build can be customised but changing and adding defines here
 * Note, we check if they are already defined in Makefile

/* Tile defines */
#define AUDIO_IO_TILE      1
#define XUD_TILE           1
#define PDM_TILE           0

/* Enable PDM and PDM->PCM conversion code */
#define NUM_PDM_MICS       1

/* Defines relating to channel count and channel arrangement (Set to 0 for disable) */
/* Number of USB streaming channels - Default is 8 in 2 out */
#define NUM_USB_CHAN_IN    (1)         /* Device to Host */
#define NUM_USB_CHAN_OUT   (2)         /* Host to Device */

/* Number of IS2 chans to DAC..*/
#ifndef I2S_CHANS_DAC
#define I2S_CHANS_DAC      (2)

/* Number of I2S chans from ADC */
#ifndef I2S_CHANS_ADC
#define I2S_CHANS_ADC      (0)

/* Master clock defines (in Hz) */
#define MCLK_441           (256*44100)   /* 44.1, 88.2 etc */
#define MCLK_48            (256*48000)   /* 48, 96 etc */

/* Maximum frequency device runs at */
#ifndef MIN_FREQ
#if(AUDIO_CLASS == 1)
#define MIN_FREQ           (48000)
#define MIN_FREQ           (11025)

/* Maximum frequency device runs at */
#ifndef MAX_FREQ
#define MAX_FREQ           (48000)

/* Maximum frequency in full-speed mode */
#ifndef MAX_FREQ_FS
#define MAX_FREQ_FS        (48000)  /* FS can't handle 8in2out at 48000 */
And finally, I made a very simple change to pdm_user.xc where the number of microphones was hardcoded to 7 to make sure it uses the NUM_PDM_MICS define. I assume some buffer somewhere needs to increase in size but I assume this is done in the modules based on these defines.

I've spent hours looking at this and there must be a simple reason. A solution would be immensely appreciated! I figured increasing from 16 to 24 bits for a single microphone input would be the easy part :) I'm even ready to pay someone to point out whatever it is I'm missing before I give up!

Who is online

Users browsing this forum: No registered users and 0 guests