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

Related