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

How to output 32768Hz external crystal LFCLK at a GPIO pin?

For synchronizing an external sensor i need to output a 32768Hz clock at a GPIO pin. For this case i want to use LFCLK from the external cyrstal.

My setup: I use RTC0 to generate a tick event with prescaler set to "0". The tick event is connected to PPI Event End Point EEP, the PPI Task End Point TEP is connected to a GPIOTE Task Out which toggles the GPIO pin polarity.

This setup works for me except in one point. The output clock is 16384Hz and not 32768Hz as desired.

Due to the tick event occurs only on the rising edge on LFLCLK and so the pin toggles only at one edge and not at both edges of LFCLK the clock out is only half of LFCLK. (as seen in the attached picture)

My question: Is there a way to get LFCLK as clock output at a GPIO pin with 32768Hz? Preferred is a hardware only solution. I want to use the 32768Hz crystal due to better accuracy and lower power.

2014-01-10_172045.png

Parents
  • Hi Buergervrm,

    As Syntroniks already suggested, you can tap the XL2 and get the crystal signal from there. If your sensor need a crystal clock signal, you should be fine. If your sensor expect to have full swing clock signal then you may need to buffer the signal.

    The other solution is good also. You can feed the XL1 with external 32768kHz from external oscillator and leave XL2 open. This has been described at section 12.1.1 in the nRF51 Series Reference.

Reply
  • Hi Buergervrm,

    As Syntroniks already suggested, you can tap the XL2 and get the crystal signal from there. If your sensor need a crystal clock signal, you should be fine. If your sensor expect to have full swing clock signal then you may need to buffer the signal.

    The other solution is good also. You can feed the XL1 with external 32768kHz from external oscillator and leave XL2 open. This has been described at section 12.1.1 in the nRF51 Series Reference.

Children
No Data
Related