AnsweredAssumed Answered

STM32F4 I2S slave issue (one more time :()

Question asked by ych on Mar 19, 2015
Latest reply on Mar 22, 2015 by waclawek.jan
I try to connect audio channel of GSM module with STM32F401 throw full-duplex I2S interface which operate in PCM audio protocol. I configure DMA for rx & tx by 10ms chunk of data - and everything works fine except that incoming data shifted by random numbers of bit :(.

I read errata of I2S slave mode and understand that this issue is exactly from errata. But unfortunately GSM module can be only the master in this connection. Also the main problem in this connection that GSM module enable PCM interface only on data available, otherwise GSM module stop it. More worse in this situation, than before on and off of PCM interface GSM module generate some random clock :( (see attached images).
One of the main my idea to apply workaround of this issue was to configure EXTI interrupt on WS/SYNC ping & in this interrupt enable I2S periphery. And it's work for first audio data stream, but than I can't find proper way to correct disable I2S periphery & enable it again, on another audio data stream.
In general try enormous scheme of enabling & disabling I2S periphery, but can't get stable result. In one case I2S just stop working (if I clear I2SE bit without waiting for TXE = 1 and BSY = 0), in another it receive shifted data.

May be someone could suggest some another mechanics of proper syntonization of I2S enable & disable in this situation.