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
  • XL2 which is pin 45 of the QFN48 package is designated as an analog output which is one of the connections to a low frequency crystal.

    I do not know how much loading you can place on this pin (I assume very little) but perhaps a buffer could be attached to that pin. Alternatively, build the feedback circuit yourself and feed the nrf chip via its XL1 pin as an external reference.

    Of course prototype before committing since with too much loading, the xtal might not start up.

Reply
  • XL2 which is pin 45 of the QFN48 package is designated as an analog output which is one of the connections to a low frequency crystal.

    I do not know how much loading you can place on this pin (I assume very little) but perhaps a buffer could be attached to that pin. Alternatively, build the feedback circuit yourself and feed the nrf chip via its XL1 pin as an external reference.

    Of course prototype before committing since with too much loading, the xtal might not start up.

Children
No Data
Related