02-02-2020 02:15 PM
I connected the BME680 sensor using the BME680_driver (3.5.10 from 01/23/2020). The sensor works well.
I need to connect the BSEC library. I found BSEC_1.4.7.4_Generic_Release, but cannot figure out how to do this correctly. I am reading BST-BME680-Integration-Guide-AN008-47.pdf, I need to connect bsec_interface.h, bsec_datatypes.h, bsec_integration.h, bsec_integration.c. But files are found many times. For example, ..... BSEC_1.4.7.4_Generic_Release \ algo \ normal_version \ bin \ IAR7 \ Cortex_M3 and ...... BSEC_1.4.7.4_Generic_Release \ algo \ normal_version \ contains files with identical names that must be on connection?
Where to get the rest of the files?
I managed to compile the project in IAR7, but it does not work. I need files for IAR7, using STM32f103. Where to get the files, and how to connect?
Solved! Go to Solution.
05-10-2020 11:38 AM
My BME680 is located on a small board, except for it there is STM32F103 or STM32L151 installed. BME680 is connected to master I2c STM32. Data is read by an external controller connected to the I2C slave STM32. Everything works well. But the STM32 heats up, it causes the BME680 to heat up. I want to put STM32 in STOP mode. In my case, BSEC performs 2 delays
bme680_bsec_trigger_measurement (bsec_bme_settings_t * sensor_settings, sleep_fct sleep)
/ * Delay till the measurement is ready. Timestamp resolution in ms * /
sleep ((uint32_t) meas_period);
delay approximately 0.3 sec
bsec_iot_loop (sleep_fct sleep, get_timestamp_us_fct get_timestamp_us, output_ready_fct output_ready, state_save_fct state_save, uint32_t save_intvl)
if (time_stamp_interval_ms> 0)
{
sleep ((uint32_t) time_stamp_interval_ms);
}
The delay is approximately 2.7 seconds.
I want to put the microcontroller in STOP mode for 2.7 seconds. At this time, the microcontroller generators stop. The problem is that get_timestamp_us () receives incorrect data in this case and the BME680 throws an error. This is my guess.
How can this problem be solved?
If you put the microcontroller in STOP mode for 3 seconds, and then do sleep (2700); then everything works, the interval between measurements increases to 6 seconds. The BME680 provides data, although it is possible that the IQA calculation is not performed correctly. But I'm not so sure.
05-12-2020 05:07 PM
It is technically possible to put your MCU in sleep/STOP mode between samples but you need to meet some BSEC requirements: