Part Number: CC1310
Other Parts Discussed in Thread: HDC1080
Tool/software: Code Composer Studio
Hello,
I'm using the sensor controller for reading out the temperature from the HDC1080, I have implemented the code for testing in a normal TIRTOS task first and everything works well. After that I commented out all code from the task and moved to Sensor Controller Ctudio.
Currently I have several issues:
- Why must be the I2C address from the slave multiplied by two, that it's getting correct ex. 0x40 to 0x80?
- Why is the fwDelaysUs funtion below not working properly between the two I2C operations? On my oscilloscope I see only the first operation and then it stops, when I remove the fwDelayUS function I see both operations.The delay between the two operations is mandatory.
//first operation
i2cStart(); i2cTx(0x80 | I2C_OP_WRITE); i2cTx(0x00); i2cStop(); fwDelayUs(4000,FW_DELAY_RANGE_5_MS);
//second operation i2cStart(); i2cTx(0x80 | I2C_OP_READ); i2cRxAck(temp); i2cRxAck(output.temperature[n]); i2cStop();