This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC3200-LAUNCHXL: Confilict between I2S and I2C

Part Number: CC3200-LAUNCHXL

Tool/software: Code Composer Studio

Hi E2E,

I'm working on a RTOS project using both I2S and I2C (I2S for two 32-bit mircrophones while I2C for MPU6050).

I've tested them seperatedly and they worked well. However, when I tried to combine them together, something weird happened. Last, step by step, I found that HWREG(ulBase + MCASP_O_TXFMCTL) = 0x113; may cause this issue. If I comment this sentence out, the I2C can work well, say, I can read te data out using I2C_IF_Write and I2C_IF_Read (or say I2C_IFReadFrom), but the I2S can't work, say, I can't read the data from the microphone, vice versa. Could you please give me some suggestion? Why there is such a conflict? I just want use RX part of the I2S, and why I can't delete that sentence, which is relavent to TX part?

It's really urgent!!!

best,

Yuequn

  • Hi Yuequn,

    What pins are you using for I2C and I2S? Are you trying to share a pin between the I2S and I2C peripherals?

    Also, are you able to get the I2S interface working separate from the I2C peripheral?

    Finally, have you taken a look at the wifi_audio_app example from the SDK? That demo shows off a very similar use case as yours, with I2C and I2S running at the same time. I suggest you take a look and compare it against your code to see if there might be any differences which could explain the behavior you are seeing.

    Regards,

    Michael

  • Hi Michael,

    This project is just modified from wifi_audio_app. And I know in this demo I2C and I2S both appear, but it seems they don't run at the same time, say the I2C is just used to configure the codec and the configuration happens before the I2S was configured.

    From the wifi_audio_app example to mine, I just delete the codec configuration (using two I2S microphone directly, so codec is not neccessary), delete the control task and the Speaker task and so on...

    After all, I think the issue is not caused by DMA, RTOS or something else, cause I have done a test programme without RTOS, without DMA. The programme is like below:

    I2C_IF_Open(I2C_MASTER_MODE_FST);
    /*the MPU6050 configuration is not shown*/ MAP_PRCMI2SClockFreqSet(30720000); MAP_I2SConfigSetExpClk(I2S_BASE,3072000,307200,I2S_SLOT_SIZE_32| I2S_PORT_DMA); MAP_I2SSerializerConfig(I2S_BASE,I2S_DATA_LINE_0,I2S_SER_MODE_RX,I2S_INACT_LOW_LEVEL); /*the network configuration is not shown*/ while(1){ I2C_IF_ReadFrom(...); /* send data using udp*/ MAP_UtilsDelay(133334); }

    The I2C_IF_ReadFrom can just work well for the first several times, after that the return value will always or sometimes be -1 and I can notice the data read from the IMU is wrong.  I can assure that there's not pin conflict.  (PIN_01: I2C_SCL PIN_02: I2C_SDA PIN_63:McAFSX PIN_64: McAXR0 PIN_53:McACLK)

    Once I comment those 3 sentences (about I2S configuration) out, the I2C can work properly.

     

  • Hi Michael,

    Briefly speaking, the I2S module can work well after appropriate configuration no mattter if the I2C is used. However, the I2C can't work nomally after the I2S module is configured. (you can notice that in the wifi_audio_app demo, I2C is only used before the I2S is configured).

    Best,

    Yuequn

  • By the way, I'm sure that it's not a RTOS problem, the problem still happen in a non-RTOS project.

  • Hi Michael,

    I've tested more yesterday, and found that the key point is MAP_I2SEnable(I2S_BASE,I2S_MODE_RX_ONLY); sentence.   After this sentence, the I2S module is enabled thoroughly and the I2C module could not work well.

    Yuequn