Hi
NorthGuy and
Mike,
Thank you very much!
Let me please post the below image which illustrates the situation.
Between
Points <B , E> &
<F , I>, the core is in Sleep (the sleep can last hundreds of ms), therefore the
23MHz is turned Off, and only the
32KHz operates, as it's external.
The
23MHz works only when the Core is not in Sleep, i.e. between
Points <A , B> ,
<E , F> .
Say that at Time
T(B), I read the
32KHz Ticks, and then also at Time
T(E), I'd read the
32KHz, and then calculate what time it is.
Doing this, I'd think that the time at
Point E,
tE, is:
[
T(E) -
T(B) ] /
32KHz = [ 2 - 0 ] /
32KHz = 62.5 us
=>
tE =
tB + [
T(E) -
T(B) ] /
32KHz = 30us + 62.5us = 92.5us.
Meaning, while the actual time at
Point E is
64us (not
92.5us), I'd have an Error of
+28.5us .
This Delta will increase every SLEEP Period.
Do you have an idea how I could compensate for it, and keep the Delta Stable?
I can of course "decide" that every Tick is
15.625us, and that way, the Delta will either increase or decrease, "randomly".
But I bet there's a better way to handle it.
Thank you friends
**broken link removed**