AnsweredAssumed Answered

K66F AKU242 MIC1 levels are really low

Question asked by Aaron Minner on Apr 22, 2020
Latest reply on May 25, 2020 by Felipe García

I'm writing an application that uses the AKU242 on-board microphone to process ambient sound.  However, the input is really low.  During testing, it really only records tapping directly on top of it.  Is it a gain issue?  I see defines for gain values - such as kDA7212_DACGain12DB - but it appears they're used only for playback, not input.  Here's the relevant code, mostly taken from the SDK provided example source:


format.bitWidth = kSAI_WordWidth16bits; // kSAI_WordWidth8bits; // kSAI_WordWidth32bits; = 0U;
format.sampleRate_Hz = kSAI_SampleRate32KHz;
format.masterClockHz = OVER_SAMPLE_RATE * format.sampleRate_Hz;
format.masterClockHz = SAI_CLK_FREQ;
format.protocol = config.protocol;
format.stereo = kSAI_Stereo;
format.isFrameSyncCompact = true;
format.watermark = FSL_FEATURE_SAI_FIFO_COUNT / 2U;

CODEC_Init( &codecHandle, &boardCodecConfig );
CODEC_SetFormat( &codecHandle, format.masterClockHz, format.sampleRate_Hz, format.bitWidth );

DA7212_ChangeInput( &codecHandle, kDA7212_Input_MIC1_An );

The same code works fine if I use the AUX input channel with line level values.  So, by process of elimination, I lean toward some issue with the AKU242.