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

Easy way to bring LFCLK out on a GPIO?

Hello,

We're interested in measuring the precision of our external crystal, but don't have the equipment to measure off the crystal directly without affecting capacitive loading.

Some microcontrollers have the ability to drive the clock out a GPIO pin, but I haven't seen anything mentioned for the nRF51822.

I've been able to use the RTC tick event to trigger a GPIOTE task to toggle a pin, but this ends up dividing our clock by 2 and possibly introducing further jitter.

I'd like to know if there's a direct way to bring out LFCLK on a GPIO, and if there isn't, whether using the RTC tick event though PPI and GPIOTE will introduce jitter (and how much).

Thanks everybody!

Parents
  • I guess you can expect very little jitter in actual frequency and your primary focus is on the deviation of a particular piece or quartz plus the influence of the capacitive loading.

    For that, you could do best by actually counting the cycles by a test firmware over externally provided exact (do you have atomic clock? ;-)) timebase (or the other way around) - your interrupt latency would be mostly constant and quite irrelevant when done e.g. over 1M cycles (if you can afford to let the piece spend 30s on a test rig)

Reply
  • I guess you can expect very little jitter in actual frequency and your primary focus is on the deviation of a particular piece or quartz plus the influence of the capacitive loading.

    For that, you could do best by actually counting the cycles by a test firmware over externally provided exact (do you have atomic clock? ;-)) timebase (or the other way around) - your interrupt latency would be mostly constant and quite irrelevant when done e.g. over 1M cycles (if you can afford to let the piece spend 30s on a test rig)

Children
No Data
Related