I2S channel swapping

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I2S channel swapping

1,349件の閲覧回数
rsk2
Contributor I

We are using 4 LPC5526 FlexComm modules with shared clocks to handle 4 bidirectional audio channels. We have found that the DMA flips left and right channels intermittently. Has anyone seen this problem before?

We are wondering if we should try using the SCT module to hardware trigger the DMAs using the shared WS signal.

0 件の賞賛
返信
5 返答(返信)

1,321件の閲覧回数
rsk2
Contributor I

Thanks for your help. We need to run I2S in slave mode as the LRCLK (WS) and SCLK are synchronized to the external digital audio signals. It seems like we can get this running on the right channels for hours, but then it will intermittently flip the channels. Any other ideas?

0 件の賞賛
返信

1,309件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding your question that "it will intermittently flip the channels", I have not good idea. If you have found out that the left/right channels are swapped, you can delete a sample or add a sample to correct the swap.

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信

1,303件の閲覧回数
rsk2
Contributor I

We can not detect when the error occurs. We see that the data is in the correct channel when loaded into the buffer before the DMA transfers the ping or pong buffer to the peripheral. We do not understand what is causing the problem from there.

0 件の賞賛
返信

1,301件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi.

I think it is complicated why the left/right channels are swapped, for example, the FIFO overflowing or under-flowing all can lead to the channel swap. you can set the PAUSEDATA bit in CFG1 register, then poll the PAUSEDATA bit in status register, then clear the PAUSEDATA bit in CFG1 register to correct the swap.

Hope it can help you

BR

XiangJun Rong

 

 

xiangjun_rong_0-1654136432095.png

 

0 件の賞賛
返信

1,327件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

For LPC552x, you use the I2S in master mode, both the left and right channels use the same FIFO FIFOWR, so you can not identify or control which channel you will write.

There is a flag in I2S status register, which can reflect the current channel, but the flag is only used in debugger instead of driver.

xiangjun_rong_0-1653978036757.png

Hope it can help you

BR

XiangJun Rong

 

0 件の賞賛
返信