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

Frequency accurancy / frequency shift

Hello,

I use the LAIRD module BL652 with the nRF52832.

My project consist of do a synchronous between many board. Each second, I restart a timer of 1 second.

I include a pin toggle into this timer handle. And I see after 3 hours that some board are shift (some 50 ms after 3 hours…..but this time increase each time after).

The project not include a resynchronous after the starting, so each board aren't synchronous after more time.

Perhaps the problem come to the LAIRD module with a "bad" oscillator accuracy.

But I Don't know if it exist a "calibration" to this high frequency oscillator ??

Or if we can increase or decrease the high frequency ?? (some microcontroller have parameters to adjust the freqeuncy)

And I Don't find the function name to try the crystal oscillator (HFXO) or the internal oscillator (HFINT). Can you help me to find this function ??

Thank you for your helps,

Best regards,

Damien

Parents Reply Children
  • Hello,

    Thank you for your asking.

    If I take a Crystal oscillator at 32 MHz with 20 ppm (I suppose that LAIRD use a 20 ppm Crystal), after 3 hours, I can have some 216 ms more or less !!! so very high shift.

    So 50 ms after 3 hours is around 4/5 ppm !!

    But for example, when I use a "true" RTC, we use a 32.758 kHz Crystal and the shifting is not very high (20 ppm generate less than 2 sec by Month)

    It exist a module into the nRF52832 to "calibrate" the Crystal ocillator ? or to adjust the main frequency ?

    For the RTC peripheral, I use a external oscillator with 32.768 kHz as frequency (20 ppm). I generate a RTC interrupt each 125ms. If I put into this interrupt function a pin toggle, I see the same shifting. I am sure that the software use this external oscillator. The Crystal have 20 ppm and the shift is the same, some 50 ms every 3 hours.

    I find into other post, that RTC and TIMER interrupt priority can be increase (and solve the problem). I try to increase the interrupt priority but the shifting is the same.

    For my timer function, I use the "app_timer" but this function use a software timer with a lower frequency….

    It's better to use the "nrf_drv_timer" ??

    Thank you,

    Best regards.

    Damien

  • I am sorry for the late reply. I thought I answered this, but I musts have forgotten to hit the reply button. Regardless, since you have already tried to increase the interrupt priority to improve the shift, and given that the shift is within crystal spec I do not think there is anything else that can be done on the chip to improve this. i.e. you need an external rtc circuit if you require more accurate timing.

Related