FSM "dual" timer for fail-safe
Hi.
I'm working with the FSM in LSM6DSO. I'm able to program detection which I want, but I struggle to do something like "fail-safe" to avoid the algorithm to stuck in the middle of the detection.
For example, I want to do a "throw" detection of a thing. The accelerometer is in the thing.
I can simply wait for enough acceleration in -X (in my case it will be always in this axis), then wait for the "fly" of the thing, where simply I can use norm V, which must be almost 0, as it's almost free fall, and it must fly for some time.
But I struggle to do some timeout to jump out of the fly detection, when there is no any, after e.g. 1s.
The problem is, that I can't use 2 timers (there is only single TC), because from manual, every time when comparison is done, the TC is loaded automatically and even when setting SCTC1, it loads anyway when I do comparison of 2 different timers.
Here is the example in the MEMS studio:
Now the FSM is able to stuck at S4, where it will wait for the "fly" detection, which must be detected at least for 200ms. I need to add something like "reset to start after 1s if no fly was detected".
Any idea how to implement it using these limitations?
Thank you

