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.

IWR6843ISK-ODS: I2C handling

Part Number: IWR6843ISK-ODS
Other Parts Discussed in Thread: MMWAVEICBOOST, , IWR6843ISK

I found a sample for the I2C slave on the IWR6843ISK-ODS and use the MMWAVEICBOOST and IWR6843ISK-ODS.

To do some tests, I added the I2C initialisation and a I2C task to the overhead_3d_people_count_68xx_mss.:

    I2CSlave_Handle     i2cHandle;
    I2CSlave_Params     i2cParams;
    
    /* Initialize the I2C Slave driver */
    I2CSlave_init();

    /* Initialize the I2C driver default parameters */
    I2CSlave_Params_init(&i2cParams);

    i2cParams.transferMode = I2CSLAVE_MODE_BLOCKING;
    i2cParams.slaveAddress = 0x65;

    /* Open the I2C Slave driver */
    i2cHandle = I2CSlave_open(0, &i2cParams);

    if (i2cHandle == NULL)
    {
       System_printf ("Error: I2C Driver Open failed\n");
    }
    System_printf ("Debug: I2C Slave Open passed\n");
    /* Configure the I2C device in expand address mode. */
    arg = 0;
    errCode = I2CSlave_control (i2cHandle, I2C_CMD_ADDR_MODE, (void* )&arg);
    if (errCode < 0)
    {
        System_printf ("Error: I2C control Set XA failed [Error code %d]\n", errCode);
    }
    set_i2c_handle(i2cHandle);

    System_printf ("Debug: I2C Slave Control passed\n");
    

static void MmwDemo_i2cTxTask(UArg arg0, UArg arg1)
{
    System_printf("MmwDemo_i2cTxTask started!\n");
    int toggle = 0;
    while(1)
    {
        Task_sleep(1000);
        System_printf("MmwDemo_i2cTxTask running still..\n");
        tranferSomeI2C_data();
    }
}

uint8_t             rxData[16];
uint8_t             txData[16];
I2CSlave_Handle     parenti2cHandle = NULL;
int init_i2c_function(void)
{
    //---- from slave.c from I2C slave example
    // IWR6843ISK-ODS, J1 pin 53 = SDA; chip IWR6843QAGABL pin F13
    // IWR6843ISK-ODS, J1 pin 55 = SCL; chip IWR6843QAGABL pin G14
    /* Setup the PINMUX to bring out the XWR68xx I2C pins */
    Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINF13_PADAH, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PINF13_PADAH, SOC_XWR68XX_PINF13_PADAH_I2C_SDA);

    Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PING14_PADAI, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PING14_PADAI, SOC_XWR68XX_PING14_PADAI_I2C_SCL);

    txData[0] = 0xDD;
    txData[1] = 0xCC;
    txData[2] = 0xBB;
    txData[3] = 0xAA;
    txData[4] = 0xEE;
    txData[5] = 0xFF;

    return 0;
}

This I2C task is blocking at tranferSomeI2C_data() => retVal = I2CSlave_read_write(parenti2cHandle, &rxData, &txData, 1); as expected.

I connected the SCL line on the MMWAVEICBOOST J14 pin 2 and the SDA line on the MMWAVEICBOOST J15 pin 2. (removed the jumpers). Dipswitch S1 is:
1,8,9 and 10 OFF, all others ON. 
Sending a I2C message from an other device is not received nor handled in the IWR6843ISK. Did I use the proper hardware pins and dipswitches here?