Other Parts Discussed in Thread: MSP430FR2433, HDC2080, CC1352R, CC1352P, , TMP006
Dear Experts,
Currently, i am trying to read the data from msp430fr2433 through I2C with the CC1352 Sensor tag,
here i have used msp430fr243x_eusci_i2c_standard_slave.c example for MSP430fr2433 and i2c example in cc1352,
i have changed the slave address to 0x03,
i have shared a code snippet for your reference please check and let me know what i am doing wrong....
/* Create I2C for usage */
I2C_Params_init(&i2cParams);
i2cParams.bitRate = I2C_100kHz;
i2c= I2C_open(CONFIG_I2C_TMP, &i2cParams);
if (i2c == NULL)
{
Display_printf(display, 0, 0, "Error Initializing I2C\n");
while (1) {}
}
else
{
Display_printf(display, 0, 0, "I2C Initialized!\n");
}
/* Common I2C transaction setup */
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 0;
/*
* Determine which I2C sensors are present by querying known I2C
* slave addresses.
*/
txBuffer[0] =0x00;
i2cTransaction.slaveAddress=MSP430;//HDC2080 ADDR;
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 1;
if (I2C_transfer(i2c, &i2cTransaction))
{
Display_printf(display,0,0,"Detected I2C\r\n");
}
else
{
i2cErrorHandler(&i2cTransaction, display);
}
Regards
Surya