Hi, Vishai,
Regarding your question that "any delay more than 5 milli second while transferring data to codec causes the output signal to be noisy", as you know that the DMIC and I2S are data stream module, if you set up delay, the stream maybe interrupted, or distorted. There is two calledback function, you can handle the stream data in the callback function without setting up break point or delay while the LPC is running.
void dmic_Callback(DMIC_Type *base, dmic_dma_handle_t *handle, status_t status, void *userData)
{
if (s_emptyBlock)
{
s_emptyBlock--;
}
}
void i2s_Callback(I2S_Type *base, i2s_dma_handle_t *handle, status_t completionStatus, void *userData)
{
if (s_emptyBlock < BUFFER_NUM)
{
s_emptyBlock++;
}
}
Hope it can help you
BR
XiangJun Rong