K10 I2S playback togerther with record via DMA 'click' noise

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

K10 I2S playback togerther with record via DMA 'click' noise

跳至解决方案
505 次查看
yangzeyong
Contributor III

Hello!

       I use K10 to playback wav file togerther with record micphone via dma to carry sound data. there is periodic ‘click’ noise,and playback speed is faster.

     K10 is i2s master, 48KHz/16bit, MCLK is 12.288MHz,BCLK=1.536MHz

      I debug the code ,and when i remove micphone record function code,only playback running,then there is not 'click' noise,and playback speed is normal.

     Playback and record  use dma channel0 and channel1, channel0 can preempt channel1, the interrupt priority of channel0 is higher than channel1.

         I use PE and the API I2S0_SendBlock & I2S0_ReceiveBlock to playback & record sound data.

    Thank you!

////////////////////////////////////////////////////////////////////////////////

p1.png

p0.png

标签 (1)
0 项奖励
1 解答
385 次查看
yangzeyong
Contributor III

I have resolved this question.

The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal

在原帖中查看解决方案

0 项奖励
1 回复
386 次查看
yangzeyong
Contributor III

I have resolved this question.

The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal

0 项奖励