Hi,
The timer in nRF54L15 runs from the internal oscillator, which is only accurate to ~1% which results in 404 or 398 samples. Thus, the continuous sampling interval offset accumulates which looks like "drift" in your timestamps.
How to fix: Request the 32 MHz crystal (HFXO) from your application and keep it running while you sample. Here is LINK to set it up.
Please let us know if you need further guidance.
Best Regards,
Pallavi
Hi Pallavi,
thanks for the quick answer!
Requesting the 32 MHz crystal does solve the problem. Thanks for the link!
I'm still a bit curious though of why the rate is (was) different after each reboot, I assumed the internal oscillator mainly would change as a function of temperature, but I see the rate go up or down after a reboot which I found confusing, I have also seen cases where the timer runns at one rate for perhaps a minute and then suddenly changes to a different rate.
I do have the BT stack running as well in my code, and my understanding is that the HF clock is switched on/off by the BT implementation when the radio is used (I found the z_nrf_clock_bt_ctlr_hf_request() and z_nrf_clock_bt_ctlr_hf_release() functions). I suspect that this is what is changing the rate, is that correct?
br
Kristoffer
Hi Pallavi,
thanks for the quick answer!
Requesting the 32 MHz crystal does solve the problem. Thanks for the link!
I'm still a bit curious though of why the rate is (was) different after each reboot, I assumed the internal oscillator mainly would change as a function of temperature, but I see the rate go up or down after a reboot which I found confusing, I have also seen cases where the timer runns at one rate for perhaps a minute and then suddenly changes to a different rate.
I do have the BT stack running as well in my code, and my understanding is that the HF clock is switched on/off by the BT implementation when the radio is used (I found the z_nrf_clock_bt_ctlr_hf_request() and z_nrf_clock_bt_ctlr_hf_release() functions). I suspect that this is what is changing the rate, is that correct?
br
Kristoffer