Page 2 of 3
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Tue Jun 07, 2022 12:28 pm
by BenR
Thanks for letting me know, hopefully fixed for you now.
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Tue Jun 07, 2022 1:15 pm
by stefan.erni
Hi Ben
Yes it's compiling now. Thanks a lot.
but.....
Reading temp ist always 33.551110
Reading humidty ist always 177.384328
First I tried adress 0x77 and config the sensor to 0x77 it's reading 33.551110
then I config just the programm to 0x76 it's reading 0.00000
then I config the modul also to 0x76 it's reading again 33.551110
I tried 100kz and 400kz clock. Always the same.
Also the parallel mode is the same.
regards
Stefan
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Tue Jun 07, 2022 8:42 pm
by BenR
Thanks Stefan,
I'll have a play with the hardware, could be my interface board was adding delays that allowed it to work correctly.
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 9:16 am
by stefan.erni
Hi Ben
My test before was i2c in softwaremode.
I tried just now with the i2c hardware, but I get a error msg on the usb port instead of of the result
regards
Stefan
ESP32 i2c hardware

- esp_i2c_2022-06-10_10-12-17.jpg (111.75 KiB) Viewed 5567 times
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 10:25 am
by BenR
Hello Stefan,
Is it possible to see the beginning of the debug log.
The initialise function should call the I2C Master init but it has some error checks for problems that can occur which might mean the i2c driver is not being installed and hopefully will give a reason as to why. Might be worth trying different IO pins if possible?
Code: Select all
if (ESP_OK == (MX_ESP_I2C_ERROR_X = i2c_param_config(...)))
{
if (ESP_OK == (MX_ESP_I2C_ERROR_X = i2c_driver_install(...)))
{
return 1;
}
}
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 10:42 am
by stefan.erni
Hi Ben
Yes, here is the error log.
I can try another pins but the pins I used are the "usual" Pins for the i2c.
regards
Stefan
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 11:53 am
by LeighM
"i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency"
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 1:30 pm
by stefan.erni
Hi Leigh
I tried all the speed, with and without stop delay, channel1 and channel2, but
no success.
What do you mean by flag? The return value from the Initialise of the component?
regards
Stefan
i2c properties:

- i2c_2022-06-10_14-19-17.jpg (55.08 KiB) Viewed 5547 times
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 7:01 pm
by LeighM
"i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency"
is from your error log.
If your MPU6886 is on Channel 1, then the BME688 should be set to Channel 2
If you still get the same error in the log, then I would suggest trying a project that only has MPU6886 or BME688.
Also try without Bluetooth, to try and narrow down what is causing the issue.
(Maybe Bluetooth is re-configuring the clocks?)
Re: BME688 ESP32 ESP8266 Rasberry PI AVR
Posted: Fri Jun 10, 2022 7:24 pm
by LeighM
Try this ...
Edit line 360 of ESP_CAL_I2C.c (found in directory C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP)
From this ...
to this ...