Closed Ferag-AG closed 3 months ago
Hi
Here what I found out today:
As the reading of my sensor is activated by an OS timer, I searched for a possible reason for the gap at this level. I noticed that the OS timer task was set to 20 (TX_TIMER_THREAD_PRIORITY) whereas most of the other tasks have a higher priority (resp. a lower value). I set the timer priority to 2 and since then the error seems to be gone.
It would be wise to review the distribution of OS priorities to ensure that this change does not have any further impact.
Regards Ludwig
Hi
As I already mentioned in the issue https://github.com/STMicroelectronics/fp-sns-datalog2/issues/11#issuecomment-1947921869 there are sporadic recording gaps occuring.
This only applies to sensors that are read periodically using an OS timer, i.e. in the case of the basic FW implementation, the temperature sensor STTS22H and it seems to depend on the device configuration. When I define the configuration to use only the STTS22H, no gaps appear, but using the configuration as below, the time between each execution of the timer function may randomly exceed one second.
I modified the
STTS22HTaskTimerCallbackFunction
to detect this condition as follows:As the following log file shows, during recodring the console output the message
STTS22H: timer interval exceeded 1.02
.STWIN.box.log
Here is the recorded data: DL2_00001.zip
Remark
Setup
Device : STWIN.box (USB or battery powered) Device Config: device_config.json IDE: µVision V5.38.0.0 Compiler: V6.19