Other Parts Discussed in Thread: CC2650, CC2650STK, CC2650RC
Tool/software: TI-RTOS
Dear All,
I'm working with smartRF06 Evaluation Board and i'm using it to upload test code to read data from a temperature and humidity sensor (SI7006-A20).
The problem is, when i run the code, to initializate the i2c transfer, appears the message that wasn't possible to transfer. The message is "Bus Fault" from a System_printf();
#define SI7006_A20_ADDR 0x40 //humidity and temperature sensor addr
// Locals
I2C_Handle i2cHandle;
I2C_Params params;
I2C_Transaction i2cTrans;
uint8_t i = 0;
uint8_t rxBuf[2]; // Receive buffer
uint8_t txBuf = 0xF3; // Transmit buffer
// Configure I2C parameters.
I2C_Params_init(¶ms);
params.bitRate = I2C_400kHz;
params.transferMode = I2C_MODE_BLOCKING;
// Initialize master I2C transaction structure
i2cTrans.writeCount = 2;
i2cTrans.writeBuf = &txBuf;
i2cTrans.readCount = 2;
i2cTrans.readBuf = &rxBuf;
i2cTrans.slaveAddress = SI7006_A20_ADDR;
// Open I2C
i2cHandle = I2C_open(Board_I2C, ¶ms);
if (i2cHandle == NULL)
{
System_abort("Error Initializing I2C on Task1 \n");
}
else
{
System_printf("I2C Initialized! on Task1 \n");
}
System_flush();
if(I2C_transfer(i2cHandle, &i2cTrans)){
System_printf("Success\n");
System_flush();
}
else{
System_printf("bus fault\n");
System_flush();}
}
Do you know what is wrong? Why I2C_transfer is returning '0' - False?
Thank you


