AnsweredAssumed Answered

21261 sometimes swaps left and right I2S data?

Question asked by Byra on Feb 6, 2014
Latest reply on Feb 10, 2014 by Harshit.Gaharwar

I have a 21261 project that uses SPORT1 to read the I2S data from a stereo codec and SPORT3 to write the I2S data to the codec.


The SPORT DMAs are in use. An ISR is used to process the I2S data on a sample by sample basis.


Normally, everything works fine. The data is read in, processed, and sent out correctly. However, occasionally the left and right I2S data gets swapped. IE the data coming in on the left channel gets written out on the right channel. It can sit and run for several hours with no problem, and then all of a sudden, the data is swapped. It will stay this way for hours and might switch back eventually, or might not. It does not always happen, in fact it usually doesnt, but it does sometimes.


I verified that the data from the codec is never swapped, so it is happening in the DSP.


Any ideas?