Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5458

General • Re: Calibrating LPOSC on an RP235X

$
0
0
I'm going to have to think up an algorithm to find a best trim value, and see what minimal sample time I can use, or see if my idea for a better way work.
I would think you could probably use quite a short sample time to get close and then longer to pick the last few values, though if doing it in a CPU-intensive burst like this maybe polling AON until it changes and then sampling MTIME might be better.

However, if I was approaching this I think I'd run it continuously while the app is on full power - just sample on a timer at very long intervals (1 sec?), stepping up one setting if it's slow and stepping one down if it's fast. That will have it typically flipping between two levels when it's in a steady state; you could store the last two results and then when going to sleep mode pick whichever looks the better of the two.

Statistics: Posted by arg001 — Thu Nov 14, 2024 8:40 am



Viewing all articles
Browse latest Browse all 5458

Trending Articles