Hi Sudeep1310,
I would recommend migrating to the newer version of the sensor API that supports both the BME680 and BME688. Given that your platform only supports 16 byte reads, you have to achieve longer reads by modifying your I2C read to perform consecutive reads to acheive longer transactions. It would look something like below
int8_t i2c_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
{
int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */
uint16_t max_len = 16; /* BlueNRG RX FIFO depth */
uint16_t bytes_left = len;
uint16_t len_to_read = 0;
uint16_t i = 0;
for(i = 0; (i < len) && (rslt == 0);)
{
bytes_left = len - i;
len_to_read = (bytes_left < max_len) ? bytes_left : max_len;
rslt = SdkEvalI2CRead(®_data[i], dev_id, reg_addr + i, len_to_read);
i += len_to_read;
}
return rslt;
}
... View more