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.

CC3200 Camera Example - I2C Interrupt Issue

Other Parts Discussed in Thread: CC3200

Hello:

I'm using the CC3200 Launch Pad (Rev. 4.1) and trying to get the camera application up and running (which is provided as part of the SDK). I have built up my own Cam Boost board and connected it to the Launch Pad. I am able to compile and load the code just fine, but when I check the I2C interface to the camera with an oscilloscope, I see that only one bit of data is shifted out from the CC3200 to the camera.

When I investigate the issue in the code, I see that the data byte is loaded into the I2C data register and the I2C Master Interrupt is cleared with these functions (i2cconfig.c, line 212):

   // Write the first byte to the controller. 
    MAP_I2CMasterDataPut(I2CA0_BASE,ucBuffer[0]);
    MAP_I2CMasterIntClearEx(I2CA0_BASE, I2C_INT_MASTER);

Then at line 225, the code waits until the interrupt flag is set:

// Wait until the current byte has been transferred. while((MAP_I2CMasterIntStatusEx(I2CA0_BASE, false) & I2C_INT_MASTER) == 0) { }

The flag is read and returned in i2c.c at line 814 in the function I2CMasterIntStatusEx(uint32_t ui32Base, bool bMasked).

The problem appears that the interrupt flag is never getting set, so the code sits in the while loop at line 225 in i2cconfig.c. My guess is that the I2C interrupt is not getting enabled. I have not been able to find where the interrupt should get enabled, and since this application should work as is I though maybe this is a configuration issue. Has anyone seen this issue before, or can someone at TI shed some light on why the I2C function isn't working?

LP Rev. 4.1
SDK 1.0.0 with Service Pack 1.0.0.1.2

Thanks,
Will

  • Hi Will,

    Which device pins are you using for I2C. Pls make sure these lines have external weak pull ups added.


    Thanks and Regards,

    Praveen

  • Hi Praveen:

    Thank you for your response. I have essentially recreated the TI CAMBOOST board (based on the TI schematic) and I am using the MT9D111 camera module. I have 2.2k resistors pulling up both the SDA and SCL lines to 2.8V. I can see that the I2C transmission is started, but only one bit is shifted out. I can see that the code is hung up as described in my earlier post - it appears that the byte to be transmitted is loaded into the transmit buffer but only one bit is sent out. After that, it looks like the code is waiting for the I2C interrupt to be set (internally?) but this never happens.

    Thanks,
    Will
  • Will,

    What is the state of the I2C pins when its looping in the while ?

    Thanks and Regards,
    Praveen
  • Hi Praveen:

    I have found the solution thanks to one of your earlier posts:
    http://e2e.ti.com/support/wireless_connectivity/f/968/p/370966/1309331#pi239031348=2

    I needed to add the following code to the pinmux.c file:
    //
    // Configure PIN_01 for GPIO
    //
    MAP_PinTypeI2C(PIN_01, PIN_MODE_0);

    Thanks for your help and prompt replies.

    Regards,
    Will