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.

TIDA-01012: two I2C

Part Number: TIDA-01012
Other Parts Discussed in Thread: BQ27426, SYSCONFIG, CC2640, CC2642R

Dear Expert,

i am learning this project, i found use two I2C one for BQ27426 another for RF430, but when use the sysconfig tools set the CC2642, set the two I2C, has the following as follow:

i check the datasheet, the CC2640 and CC2642, only one I2C module

  • I am not familiar with this TI Design but you are correct that the CC2640/CC2642 only has one hardware I2C.  If you review the TIDA-01012 Firmware provided then you will see that both instances use the same I2C hardware peripheral and that only either the BQ27426 or RF430 are connected at any time.  If you want to create a second instance for both devices to be connected at the same time, then you will need to utilize a software solution which bit-bangs the SDA/SCL lines.  Such solutions are also available using the Sensor Controller.  You will most likely encounter several difficulties porting this legacy CC2640 code to a SimpleLink CC2642R solution, however you can review the Migration Guide to get started.

    Regards,
    Ryan

  • in board.c file, the BoardGpioInitTable souce code as follows:

    BQ27426_SCL | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH| PIN_PUSHPULL | PIN_DRVSTR_MAX,
    BQ27426_SDA | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    ENABLE_BQ27426 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_OPENDRAIN | PIN_DRVSTR_MED,
    RF430_SCL | PIN_INPUT_EN | PIN_PULLUP,
    RF430_SDA | PIN_INPUT_EN | PIN_PULLUP,

    const I2CCC26XX_HWAttrs i2cCC26xxHWAttrs[WDMM_I2CCOUNT] = {
    {
    .baseAddr = I2C0_BASE,
    .powerMngrId = PERIPH_I2C0, //PowerCC26XX_PERIPH_I2C0,
    .intNum = INT_I2C, //INT_I2C_IRQ,
    //.intPriority = ~0,
    //.swiPriority = 0,
    .sdaPin = RF430_SDA,
    .sclPin = RF430_SCL,
    },
    {
    .baseAddr = I2C0_BASE,
    .powerMngrId = PERIPH_I2C0, //PowerCC26XX_PERIPH_I2C0,
    .intNum = INT_I2C, //INT_I2C_IRQ,
    //.intPriority = ~0,
    //.swiPriority = 0,
    .sdaPin = BQ27426_SDA,
    .sclPin = BQ27426_SCL,
    }
    };

    /* I2C configuration structure */
    const I2C_Config I2C_config[] = {
    {
    .fxnTablePtr = &I2CCC26XX_fxnTable,
    .object = &i2cCC26xxObjects[0],
    .hwAttrs = &i2cCC26xxHWAttrs[0]
    },
    {
    .fxnTablePtr = &I2CCC26XX_fxnTable,
    .object = &i2cCC26xxObjects[1],
    .hwAttrs = &i2cCC26xxHWAttrs[1]
    },
    {NULL, NULL, NULL}
    };