nrf54L15 clock output accuracy using GRTC Clock output

Greetings,

We are using a nrf54L15 and trying to use the GRTC Clock output functionality as described in 8.10.4 of the datasheet.
We need the most accurate clock output possible, since we need to provide it to external sensors.
The code is as follows:
int main(void)
{
	/* Give control of p1.08 to GRTC */
	nrf_gpio_pin_control_select(PIN_NUM, NRF_GPIO_PIN_SEL_GRTC);

	/* Set divider to 500 (250 * 2), so we get 32000 kHz out */
	uint8_t grtc_div = 250;
	nrfy_grtc_clkout_divider_set(NRF_GRTC, grtc_div);

	nrfy_grtc_clkout_set(NRF_GRTC, NRF_GRTC_CLKOUT_FAST, true);
	k_sleep(K_FOREVER);
	return 0;
}
The entire sample is in the following ZIP file:
I build using:
 west build -b nrf54l15dk/nrf54l15/cpuapp
---------------------------------
I am measuring the output PIN with an oscilloscope, and I see that the clock is not as accurate as we would imagine it to be.
The BOM of the v0.9.1 DK says that the 32mHz crystal has an accuracy of +-10 ppm. We would then expect the clock output of the GRTC to also have +-10ppm. Is this assumption incorrect?
TEST 1 
grtc_div = 2
EXPECTED CLOCK - 1 mHz
MEASURED CLOCK - 1.0043mHz

TEST 2
grtc_div = 250
EXPECTED CLOCK - 32 kHz
MEASURED CLOCK - 32.152 kHz


TEST 3
Instead of using GRTC we use a PWM peripheral to get a 32kHz clock
EXPECTED CLOCK - 32 kHz
MEASURED CLOCK - 32.132 kHz


------------------------------------------------
Is this kind of error expected? 
Are we doing something wrong?

We are very confused why this is happening. We expected that we would be able to get a +-10ppm 32kHz clock output, but this is not the case.
Thank you and best regards,
Tjaž
  • Hi

    Just to make sure, are you working on an nRF54L15 DK when seeing this drift? If you are working on a custom board I would double check that the HF crystal is loaded correctly, and that this isn't caused by drift on the crystal itself. Can you also let me know what version of the DK you're working on, and I'll see if I can reproduce this on my end. 

    Best regards,

    Simon

  • I have tested this on a nrf54L15DK.

    It is a nRF54L15-PDK v0.8.1

    I also tested this on custom PCBs we have made, where we also observe this king of error - but the error is different across different PCBS, some are bellow 32khZ (31.887 kHz for example), some are above (similar to the DK).

    BR,
    Tjaž

Related