Hi i have some trouble with configuring BME680. I am able to read all data and write to all registers except most important registers, gas registers. I communicate with bme680 using SPI from hal library on STM32. Data i get from gas registers except from config registers(par_g) are just zeros. Here is my code. I was looking to working arduino library and i did the same things like in this library. I tried changing modes to force mode before writing, but it seems it doesnt work. I also followed datasheet and i wrote to registers in same order like in sensor configuration flow, but it still wasnt working.
If you would have an oscilloscope or logic analyzer available, it would be helpful to share the capture when reading these registers. In general, it is strongly advised to try our official sensor API (available here for the BME680), then eventually base your own implementation from these.
A few comments from a very brief comparison with our sensor API:
I rewrote bme680 api. Still cant get data from gas. I followed step by step arduino library and Bosch api which works for reading gas data. Am i doing something wrong? I cant figure out whats wrong with my code. Working code: https://github.com/adafruit/Adafruit_BME680.
It is quite difficult to compare what your main code is doing since you are editing our official sensor API.
If you managed to get gas data read-outs with third-party software, my suggestion would be to compare for both projects which data is written to the BME680, and not only that similar data is written, but also in the same order and timings.