11-16-2020 03:12 AM
I already import in BSEC library in my code. (platform:IDE: Simplicity StudioMCU: EFM32LG332F128G-F-QFP64). However, after execute the "bsec_do_steps" routine, no VOC output result is found. The result is attached. (Remark: NO sensor id = '4' ,BSEC_OUTPUT_BREATH_VOC_EQUIVALENT)
Thank!
12-02-2020 07:46 AM
12-02-2020 06:56 PM
Hello hihith,
In your source, you changed some code as below, you used 100 instead of get_timestamp_us.
bsec_iot_loop(sleep, 1000, output_ready, state_save, 10000);
get_timestamp_us isn't just 1000, it's function to get some timestamp for getting interval time.
Therefore, you should implement same function for it.
int64_t get_timestamp_us()
{
return (int64_t) millis() * 1000;
}
Then, could you please let me know the result?
Thanks,
02-01-2021 08:32 AM
Sorry late reply, today i just try input the timing. I'm using the xTaskGetTickCount() in FreeRTOS. However, the result still not change.
Or could you send the sample code which including the setting of heatup, gas_wait , nb_conv ,and etc.?
02-01-2021 04:51 PM
Hello hihith,
If you are using our official source, it should be enough to get right value.
https://www.bosch-sensortec.com/software-tools/software/bsec/
I have some question.
As you said, you are using xTaskGetTickCount() . When you set get_timestamp_us function using xTaskGetTickCount, can you get right time?
And what is the output type of xTaskGetTickCount?
We are using get_timestamp_us return type as int64, it means our system time lasts 2^64 us.
Thanks,
02-02-2021 02:12 AM
Yes, i modified the code from https://www.bosch-sensortec.com/software-tools/software/bsec/
I have use xTaskGetTickCount() which is in ms. I using the value x 1000000 to archieve nano second. Although it is not very accurate, i think it should be a little bit change value. Is it? Is it any other thing set wrong in my code?