12-08-2021 02:16 AM
Hello,
I'm currently working to get the gas results from BME 688 in force mode.
I have followed the steps in the datasheet, by setting up the Gas_wait register to 0x59 and the res_heat register to the calculated value, in my particular case 0xEC.
I am able to get Temp, Pressure, and Humidity data but, so far, Gas ADC registers keep at 0x00.
I have tried to increase the Gas_wait register values but had no luck yet.
I would appreciate any input or suggestions.
Attached is a screenshot with part of my code.
Thank you very much,
Joao
12-08-2021 03:22 AM
Hello joaogarretto,
You could refer attachment example code that runs well.
https://github.com/BoschSensortec/BME68x-Sensor-API
10-26-2022 08:17 PM - edited 10-26-2022 08:18 PM
Hi, I started working with the sensor again in SPI mode and am facing a NO NEW DATA FOUND issue. My SPI transactions are correct as I can set the sensor configurations, and read the parameters and Chip ID correctly.
However, when using the get_data function and reading the values, at the end it gives me the NO NEW DATA FOUND error. I visited other posts concerning the same problem but they were not useful. I've been using API for I2C and it worked, just now for SPI this issue is appearing. Attached is a file with the .c file with the code. Below are the SPI transaction results
Thanks
Initializing BME.
SPI open passed.
----- Length: 0x1. -----
SPI Read Address: 0xf3.
SPI Read Data: 0x0.
Tmp buf set regs: 0x60 0xb6
SPI Write Address: 0x60.
SPI Write Data: 0xb6.
----- Length: 0x1. -----
SPI Read Address: 0xf3.
SPI Read Data: 0x0.
----- Length: 0x1. -----
SPI Read Address: 0xd0.
SPI Read Data: 0x61.
----- Reg data 0x61-----
Chip ID: 61
----- Length: 0x1. -----
SPI Read Address: 0xf0.
SPI Read Data: 0x1.
----- Reg data 0x1-----
----- Length: 0x17. -----
SPI Read Address: 0x8a.
SPI Read Data: 0x7f.
SPI Read Data: 0x67.
SPI Read Data: 0x3.
SPI Read Data: 0xf0.
SPI Read Data: 0x16.
SPI Read Data: 0x8d.
SPI Read Data: 0x55.
SPI Read Data: 0xd7.
SPI Read Data: 0x58.
SPI Read Data: 0x0.
SPI Read Data: 0x2e.
SPI Read Data: 0x22.
SPI Read Data: 0x3f.
SPI Read Data: 0xff.
SPI Read Data: 0x1d.
SPI Read Data: 0x1e.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x9a.
SPI Read Data: 0xfb.
SPI Read Data: 0x6d.
SPI Read Data: 0xf3.
SPI Read Data: 0x1e.
----- Reg data 0x1e-----
----- Length: 0xe. -----
SPI Read Address: 0xe1.
SPI Read Data: 0x3f.
SPI Read Data: 0xf4.
SPI Read Data: 0x2c.
SPI Read Data: 0x0.
SPI Read Data: 0x2d.
SPI Read Data: 0x14.
SPI Read Data: 0x78.
SPI Read Data: 0x9c.
SPI Read Data: 0x85.
SPI Read Data: 0x66.
SPI Read Data: 0x44.
SPI Read Data: 0xda.
SPI Read Data: 0xbe.
SPI Read Data: 0x12.
----- Reg data 0x12-----
----- Length: 0x1. -----
SPI Read Address: 0xf3.
SPI Read Data: 0x0.
SPI Write Address: 0x73.
SPI Write Data: 0x10.
----- Length: 0x5. -----
SPI Read Address: 0x80.
SPI Read Data: 0x2c.
SPI Read Data: 0xaa.
SPI Read Data: 0x16.
SPI Read Data: 0x4b.
SPI Read Data: 0xf3.
----- Reg data 0xf3-----
----- Length: 0x1. -----
SPI Read Address: 0xf4.
SPI Read Data: 0x0.
----- Reg data 0x0-----
----- Length: 0x1. -----
SPI Read Address: 0xf4.
SPI Read Data: 0x0.
----- Reg data 0x0-----
----- Length: 0x5. -----
SPI Read Address: 0xf1.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x10.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
----- Reg data 0x0-----
Tmp buf set regs: 0x71 0x80
SPI Write Address: 0x71.
SPI Write Data: 0x80.
SPI Write Data: 0x72.
SPI Write Data: 0x5.
SPI Write Data: 0x73.
SPI Write Data: 0x0.
SPI Write Data: 0x74.
SPI Write Data: 0x44.
SPI Write Data: 0x75.
SPI Write Data: 0x0.
----- Length: 0x1. -----
SPI Read Address: 0xf4.
SPI Read Data: 0x44.
----- Reg data 0x44-----
Tmp buf set regs: 0x5a 0x9e
SPI Write Address: 0x5a.
SPI Write Data: 0x9e.
Tmp buf set regs: 0x64 0x59
SPI Write Address: 0x64.
SPI Write Data: 0x59.
----- Length: 0x2. -----
SPI Read Address: 0xf0.
SPI Read Data: 0x1.
SPI Read Data: 0x0.
----- Reg data 0x0-----
Tmp buf set regs: 0x70 0x0
SPI Write Address: 0x70.
SPI Write Data: 0x0.
SPI Write Data: 0x71.
SPI Write Data: 0x20.
-----------------
Inside main loop.
-----------------
GET DATA!!!
--------Set Operation Mode ------
----- Length: 0x1. -----
SPI Read Address: 0xf4.
SPI Read Data: 0x44.
----- Reg data 0x44-----
Tmp buf set regs: 0x74 0x45
SPI Write Address: 0x74.
SPI Write Data: 0x45.
-------- Calculate Delay ------
-------- Get Data Function ------
----- Into get data API function. -----
----- Into Read field Data API function -----
----- Length: 0x11. -----
SPI Read Address: 0x9d.
SPI Read Data: 0xfb.
SPI Read Data: 0x6d.
SPI Read Data: 0xf3.
SPI Read Data: 0x1e.
SPI Read Data: 0x85.
SPI Read Data: 0x36.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x0.
SPI Read Data: 0x33.
SPI Read Data: 0x0.
12-16-2022 04:06 PM
Hello joaogarretto,
From your code, the SPI read and write functions(bme68x_spi_read(), bme68x_spi_write()) in your code are different from those in my previous example code(SensorAPI_SPIx_Read(), SensorAPI_SPIx_Write()). I don't know your MCU platform. You can check these two functions and run them again.