Other Parts Discussed in Thread: CC2640
Hy,
I try to connect a SI7006 humidity/temperature sensor to a CC2640.
For readout, I need to send an I2C command and poll ack from slave to find out, if measurement is finished.
What is the best way to realize that in TI RTOS.
I tried "bspI2cWriteRead", but apparently, the read command does not evaluate ack from slave and does not retry read when NACK from slave.
Next try was to use the following code:
SENSOR_SELECT(); // send slave address
bspI2cWriteSingle(MEASUREMENTCOMMAND); // start measurement
while(bspI2cRead(data, 2) == false) // TODO: add timeout!
{
;
}
SENSOR_DESELECT();
Is that a good way to do it? It does not work, but it still might have other reasons.
Alternatively, the sensor has a "Hold master mode"
Is there an elegant way on realizing this on master side with TI RTOS?
Regards
Harald


