01-20-2021 03:29 PM
Hello, I have a problem, I am not sure what the meaning of timestamp is here, because when I run the program, in bsc_integration.c if I enter bsec_sencor_control (...) with any timestamp value, it only exits this function with the bsec_status = BESC_OK the first time I enter after bsec_iot_init (...), the next times I enter the function bsec_sencor_control (...) exits with bsec_status = BSEC_W_SC_CALL_TIMING_VIOLATION. Can someone help me understand what value I have to return in get_timestamp_us () for everything to work ok. Waiting for an answer, best regards, Luis Valseca
Solved! Go to Solution.
01-20-2021 04:16 PM
Hello 1uisvalseca,
You have to get your system time from get_timestamp_us.
For example, if your system running time is 20s, you should get 20,000,000 (us).
And then, your system running time is 40s, you should get 40,000,000 (us).
We are using this value to sleep our process.
Thanks,
01-21-2021 02:46 PM
Hi Minhwan,
I am using the LP configuration, that is, 3 seconds sleeping, but with whatever value I get from get_timestamp_us (), when I first enter bsec_sensor_control (time_stamp, & sensor_settings); the status is correct: BSEC_OK, but when I enter the second time the status it returns is: BSEC_W_SC_CALL_TIMING_VIOLATION.
i am using microcontroller CC1310 of Texas Instruments and the editor and compiler is the CCS (Code Composer Studio).
What value in microseconds should get_timestamp_us () return when I am using the LP setting of 3 seconds?
Awaiting replay, best regards
Luis Valseca
01-21-2021 11:43 PM
Hello,
As I said, get_timestamp_us () should generate system running time.
For example, if your system is running for 10s, it should generate 10,000,000.
Therefore, if CC1310 doesn't support that kind of system time, good thing is you check beginning of your source code, and its time is 0s.
Then, you can get next time in get_timestamp_us after that point.
Thanks,
01-23-2021 01:26 PM
I still don't understand what happens, if I exit the get_timestamp_us () function with a timestamp of 200 milliseconds, that is, 200,000 microseconds, I multiply by 1000 to convert into nanoseconds. Now I enter the function ret.bsec_status = bsec_sensor_control (time_stamp, & sensor_settings); for the first time. I returned
bsec_status = BSEC_OK, but the following times it returns me
bsec_status = BSEC_W_SC_CALL_TIMING_VIOLATION. I ask again, with what value should I enter bsec_sensor_control () so that it always returns bsec_status = BSEC_OK.?
pleasde, help
Luis Valseca