This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

LFRC calibration without soft device or external 32MHz crystal

Hi,

I am working on an application using NRF52810/NRF52832 without Soft Device (I don't need BLE for this app), on a custom board. I am using the SDK15.

There is no external 32MHz crystal on the board (HFCLKINT is used as a source for HFCLK), and there is no 32kHz crystal either. LFRC is used as a source for LFCLK.

The LFCLK is used for periodic wake-up and data logging. I'd like to improve its accuracy.

One of the NRF52 GPIO is connected to an accurate 32MHz digital clock signal generated by a sensor IC. I'd like to use this 32MHz reference to calibrate the LFRC. 

Is there a way to use the LFRC calibration registers to perform the calibration "manually" instead of using the calibration task? I can't use the calibration task since I don't have the HFXO running.

Thanks!

Parents
  • Hi,

    Sorry no, you may however do something similar in software. If you could reduce the the digital input to for instance 8MHz (or less), then you could use this input to work as a counter to a timer, and for instance count the numbers of RTC periods over 10ms (timer), and then based on that estimate how long an RTC period is and adjust the wakeup interval for the RTC correspondingly. This adjusting could for instance be done every 4-8seconds.

    Best regards,
    Kenneth

  • Thanks Kenneth,

    Yes I can set the digital input to e.g. 1MHz, and I already have code to measure the LFRC versus this reference input clock.

    The thing is I have multiple application timers running (using the SDK15 app timer library, so using RTC1). Timer timeouts are ranging from a few seconds up to several hours.

    Would you recommend adjusting the timeout ticks for all the running timers each time the calibration is done? It sounds like a hassle but I don't see any other way.

    Thanks

  • If the timeout exceed 4 seconds then I likely would have updated the timer before it expires.

    Best regards,
    Kenneth

Reply Children
No Data
Related