10-21-2020 07:20 PM
Hi, I am integrating a BME680 with a TI CC1312 microcontroller. I can communicate fine with the sensor over I2C, from all appearances, but any time I am trying to take readings (even from the self-test from https://github.com/BoschSensortec/BME680_driver), I am getting no new data from the sensor. I have also tried a couple different units, getting the same results.
Here's some calibration info:
par_h1 unsigned short 717
par_h2 unsigned short 1022
par_h3 char 0 '\x00'
par_h4 char 45 '-'
par_h5 char 20 '\x14'
par_h6 unsigned char 120 'x'
par_h7 char -100 '\x9c'
par_gh1 char -47 '\xd1'
par_gh2 short -11597
par_gh3 char 18 '\x12'
par_t1 unsigned short 26045
par_t2 short 26419
par_t3 char 3 '\x03'
par_p1 unsigned short 36759
par_p2 short -10411
par_p3 char 88 'X'
par_p4 short 7301
par_p5 short -50
par_p6 char 30 '\x1e'
par_p7 char 51 '3'
par_p8 short -3768
par_p9 short -2137
par_p10 unsigned char 30 '\x1e'
t_fine int 0
res_heat_range unsigned char 1 '\x01'
res_heat_val char 47 '/'
range_sw_err char -1 '\xff'
And this is what comes out from the sensor when trying to read data:
[0] unsigned char 0 '\x00'
[1] unsigned char 0 '\x00'
[2] unsigned char 128 '\x80'
[3] unsigned char 0 '\x00'
[4] unsigned char 0 '\x00'
[5] unsigned char 128 '\x80'
[6] unsigned char 0 '\x00'
[7] unsigned char 0 '\x00'
[8] unsigned char 128 '\x80'
[9] unsigned char 0 '\x00'
[10] unsigned char 128 '\x80'
[11] unsigned char 0 '\x00'
[12] unsigned char 0 '\x00'
[13] unsigned char 0 '\x00'
[14] unsigned char 4 '\x04'
Any help appreciated!
Solved! Go to Solution.
10-22-2020 02:02 AM
Well, something seems a bit fishy. The registers still don't appear to have all been set. Does this look right?
0xd0: 97
0x72: 4
0x74: 0
0x75: 16
0x50: 0
0x51: 0
0x52: 0
0x53: 0
0x54: 0
0x55: 0
0x56: 0
0x57: 0
0x58: 0
0x59: 0
0x5a: 101
0x5b: 0
0x5c: 0
0x5d: 0
0x5e: 0
0x5f: 0
0x60: 0
0x61: 0
0x62: 0
0x63: 0
0x64: 0
0x65: 0
0x66: 0
0x67: 0
0x68: 0
0x69: 0
0x6a: 0
0x6b: 0
0x6c: 0
0x6d: 0
0x70: 0
0x71: 0
0x1f: 128
0x20: 0
0x21: 0
0x22: 128
0x23: 0
0x24: 0
0x25: 77
0x26: 150
0x2a: 0
0x2b: 4
0x1d: 0
10-22-2020 02:18 AM
No, the register value is not correct.
For example, the Github code set humidity oversamling as 1x, this means 0x72 register should have value 0x01. but you read out as 0x04 means humidity oversampling is humidity oversample is 8x. the register value is not matching the code.
Also register 0x74 is 0 means temperature and pressure are all skipped. But actually in the code it is set to non 0 value.
So i think your write function still have problem. the value written into sensor is not matching the setting we used in selftest code.
10-22-2020 12:41 PM
Hi Vincent, thanks for your patience and help on this. It was entirely on my end (yes i2c writes were a problem still), so apologies for the waste of bandwidth.
Results now:
T: 23.1599 degC, P: 1021.8499 hPa, H 39.4690 0.0000rH , G: 21594 ohms