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)