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.

I2C with CC2650 and Sensor Controller Studio

Other Parts Discussed in Thread: CC2650, OPT3001, CC1350

Greetings,

I've been looking to use the I2C line on the CC2650 development kit using Sensor Controller Studio, but I'm not seeing anything come out of the CC2650 in the form of the clock. I've run my own code and run the I2C Light Sensor Code (which was similar) but every time the I2C Status Bit ends up being 2, indicating that the clock is timing out. I've hooked up an oscilloscope to the clock and data line and am seeing a flat 0 volt signal, even with the one shot trigger. I have tripled checked my pin outs and power; everything is hooked up properly and I'm not even seeing a signal come out of the other pins (except the active low resets and such). My code is as follows:

i2cStart();

i2CTx(Address | I2C_OP_WRITE);

i2cTx(Command);

if(state.i2cStatus==0x000) {

...

}

Is there some kind of preset I am supposed to do with the CC2650 to configure the I2C accordingly? I assumed that setting the clock and timeout in Sensor Controller Studio would do it. Any insight?

Thank you,

Nick H

  • Hello Nicholas,
    Which HW kit are you using? Launchpad, SensorTag or SmartRF06EB+EM?
    The Sensor Controller (SC) is able to set up required clock/settings for it self. But you have to make sure not to assign any of the pins used by SC to the TI-RTOS pin driver table. Could that be it?
  • Eirik,

    I am using the SmartRF06EB+EM. I don't believe I'm using any pins routed to anything else; I'm using DIO_7 and DIO_6 (which are suggested as pins in Sensor Controller Studio when picking which pins are the clock and data line) and when I checked them on the user guide it just said that these pins are a GPIO signal to the EM board. I also switched to DIO_1 at some point (another GPIO signal) and it still wasn't working. I should be using the pins they suggest in Sensor Controller Studio, correct? Any ideas?

    Thank you,

    Nick H

  • Hello Nicholas,
    This example code is made for the SensorTag and uses the SensorTag board files. Have you changed to the appropriate board file since you are using 06EB+EM (CC2650DK_7ID)?

    DIO6 and DIO7 is LED4 and LED3 on the SmartRF06EB so if you disconnect the two jumpers .1-2 and 3-4 on connector P403 and add an appropriate pull up resistor you should be able to observe signals. SDA and SCL are open-drain, that is I2C master and slave devices can only drive these lines low or leave them open.
  • Eirik,

    I've been looking through the tutorial on the Sensor Controller Studio and found a section labeled "5.8: Compiling the Application in IAR and CCS". I think this will answer my question as far as my previous problem; however, I'm not sure how to compile the code I have in CCS and then use it in conjunction with the Sensor Controller Studio. Any ideas? Can you provide more elaborate instruction as far as this section goes?

    Thank you,

    Nicholas Haglof

  • Hello Nicholas,
    I updated the SCS FAQ with an entry called "Integrating Sensor Controller Driver with Application". Does it answer your question?
    FAQ: e2e.ti.com/.../495518

  • Eirik,

    That does answer my question for the most part. I guess the only other question would be, if I am using something like CCS to integrate with my Sensor Controller Studio Project, what source project would I start off with in CCS? The CCS tutorials seem to recommend something like SimpleBLEPeripheral or SimpleBLECentral, but if I'm using just I2C on the Sensor Controller is there a better source project?

    Thank you,

    Nicholas Haglof

  • Hello Nicholas,

    If you do not need BLE connectivity, either rework the example project from SCS (I2C light sensor) or for a clean TI-RTOS project in CCS make sure to install/update to the latest version of CCS and install the desired version of TI-RTOS.

    Latest version: http://www.ti.com/tool/ti-rtos-mcu

    Older versions: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/index.html

    Make sure to restart CCS after you install the TI-RTOS bundle to update the resource explorer and open the empty project.

    1)

    2)

     

  • Eirik,

    I reworked the I2C light sensor and that worked, thank you very much! (On a side note, CCS was giving build errors as it expects the February update of TI-RTOS installed instead of the one that just came out in April, I'm not sure if that was intentional or not but I ended up downloading the February update as well as the April one and that built the project, no problem.)

    Thank you,
    Nick H
  • Great,
    SCSC is under continuous development and the latest version of TI-RTOS will be supported in the next release.
  • Hi Eric,

    I am trying to reproduce the I2C Light Sensor(OPT3001) example in Sensor Controller Studio(1.4.04) using a CC1350 LauchPad. After correcting the I/O Mapping to reflect the SCL and SDA DIO Pins the code compiles but no value is recorded. The I2C state changes from 0x00 to 0x01 but does not return back to 0x00.

    I ran the device outside the CC1350 and it is running fine so the hardware is working

    Any Advice.

    Regards,

    Pushkar

  • Hello Psuhkar,
    Please post a new thread and also add information about the IDE Tools used and more details on your HW setup.