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.

CC1310: Write a byte via I2C using the "i2ctmp007" example application provided in the SimpleLink CC1310 SDK

Part Number: CC1310


In the "i2ctmp007" example application, only a reading action is being performed because there are no commands to send to the sensor. However, in my application, I am using the BME280 humidity, pressure, and temperature sensor which needs to be configured. Consequently, I need to send commands to it via I2C.

How to read bytes from the sensor is clear to me using this I2C configuration:

/* Point to sensor data*/
txBuffer[0] = BME280_DATA_ADDR;   // sensor data address
i2cTransaction.slaveAddress = BME280_I2C_ADDR_SEC;  // I2C address
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 8;   // data length

Then the data is stored in rxBuffer and can be accessed.

Can you please quickly explain how to write data into a register?

Thank you!!