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.

CCS/CC1350STK: sensor controller,i2c with cc1350STK

Part Number: CC1350STK


Tool/software: Code Composer Studio

Hii,

I am trying to read humidity and temperature sensor data from cc350STK using sensor controller but the variable I2C_status shows always 1 and the output is zero always.

SCL = DIO6
SDA = DIO5

SCL frequency = 400 kHz
SCL stretch timeout = 10us

Below is the execution code of that.

U16 tem_resH = 0;
U16 tem_resL = 0;
U16 hum_resH = 0;
U16 hum_resL = 0;
//Humidity sensor configuration
i2cStart();
i2cTx((0x40<<1) | I2C_OP_WRITE);
i2cTx(0x02);
i2cTx(0x10);
i2cTx(0x00);
i2cStop();

fwDelayUs(100000, FW_DELAY_RANGE_100_MS);

//triggering measurment for temp 0x00
i2cStart();
i2cTx((0x40<<1) | I2C_OP_WRITE);
i2cTx(0x00);
i2cStop();

fwDelayUs(100000, FW_DELAY_RANGE_100_MS);

//if (state.i2cStatus == 0x0000) {
i2cStart();
i2cTx((0x40<<1) | I2C_OP_READ);
i2cRxAck(tem_resH);
i2cRxAck(tem_resL);
i2cRxAck(hum_resH);
i2cRxNack(hum_resL);
i2cStop();
//}

output.tempH = tem_resL;
output.tempL = tem_resH;
output.humH = hum_resH;
output.humL = hum_resL;

if(hum_resL > 0x00){
fwGenAlertInterrupt();
}

// Schedule the next execution
fwScheduleTask(1);

  • Hi,

    I don't have a CC1350STK available to try here today but i believe the I2C address should be 0x43 instead of 0x40 since ADR1/0 is tied to VDD on the CC1350STK?

    Best Regards,
    R.M
  • Hi,

    I haven’t heard from you for almost two weeks so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Regards,
    R.M