Other Parts Discussed in Thread: CC1310
Tool/software: TI-RTOS
Hi,
I'm trying to track clock drift on a cc1310.
My application has a fairly complex interaction between long-running radio commands and periods of sleep, and I'm trying to measure the drift that occurs when regularly switching between clock domains. Measuring clock drift of each crystal independently without characterising errors from regularly changing between clock domains would be worthless for my application.
The problem I'm experiencing is that both RF_getTime() and Clock_getTicks() occasionally jump to a lower value in situations that are NOT integer rollover (at just shy of 18 minutes and 12 hours respectively) - I can easily handle integer rollover.
RF_getTime() will sometimes go backwards by the entire length of the sleep period which, during clock drift testing is ~30 seconds.
Clock_getTicks() seems to only jump back by the wake period, ~1-2 seconds.
This happens every few minutes to half an hour, seemingly at random.
If I prevent the cc1310 from sleeping (eg by never ending my radio command), there are no jumps from either clock source, but then I can only measure the drift of the XOSC and not the combined drift when regularly waking and sleeping.
Are there any known race conditions in the clock save/restore code that might cause this behaviour?