nRF5340 Low frequency Clock configuration when external clock is used

Hi,

I have the following scenario:

  • nrf5340
  • SDK 2.1.1
  • HFCLK: 32Mhz crystal
  • LFCLK: square wave of 32768 Hz from an external RTC, range [0 - 1.8] Volts 
  • square wave applied to XL1 pin
  • XL2 pin left unconnected

According to the Product Specification v1.5, the following register need to be configured for the LFCLK to work with the above scenario (paragraph 4.12.3):

  • OSCILLATORS.XOSC32KI.BYPASS=Enabled.
  • LFCLKSRC.SRC=LFXO

Questions

  1. By activating the BYPASS, what is really bypassed (see picture below)? 
      
  2. I suppose i dont need to use any capacitor in this configuration. Is it correct to set the XOSC32KI.INTCAP as by default ?
  3. Looking in the Zephyr Kconfig parameters, i cannot find a way to enable the BYPASS. I read that this is not even yet possible in SDK 2.8.0 but it is in the nrfx3.6.0 (see this link).
    1. Can I have your feedback about it ?
    2. In case it is not possible through Kconfig, can i set the bypass if the LFCLK is already running ? Or do i need to stop it, reconfigure it and start it again ?
    3. Can you eventually provide a recommended way of doing it ?
  4. So far, I have run the above scenario WITHOUT enabling the BYPASS. The device seems to work anyhow. Is that expected ?
  5.  In case the external source is removed or fails, what is the behaviour of the clock peripheral ? any fall-back behaviour ?

Thanks in advance for your kind availability !

Regards

Riccardo 

Parents
  • Hi Riccardo,

    By activating the BYPASS, what is really bypassed (see picture below)? 

    When enabling the BYPASS, generally the internal LFXO circuit is bypassed, and Instead, the SoC directly uses the external clock signal applied to the XL1 pin as the source for the LFCLK.

    I suppose i dont need to use any capacitor in this configuration. Is it correct to set the XOSC32KI.INTCAP as by default ?

    No, you wouldn't need any caps since the LFXO circuit is completely bypassed. Yes, you can set the XOSC32KI.INTCAP as default.

    So far, I have run the above scenario WITHOUT enabling the BYPASS. The device seems to work anyhow. Is that expected ?

    Well, it's recommended to enable BYPASS when using an external clock source. If the external signal is within the expected frequency and voltage range, the internal oscillator circuit might sometimes appear to work, but it is not a guaranteed/stable state.

     In case the external source is removed or fails, what is the behaviour of the clock peripheral ? any fall-back behaviour ?

    I don't think there's any default failsafe / fallback mechanism and the LFCLK will just stop work in case of a failure. But you can always create your own fallback method using a watchdog or interrupt etc.



    I am checking internally for the other queries and will get back to you soon.

    -Priyanka

Reply
  • Hi Riccardo,

    By activating the BYPASS, what is really bypassed (see picture below)? 

    When enabling the BYPASS, generally the internal LFXO circuit is bypassed, and Instead, the SoC directly uses the external clock signal applied to the XL1 pin as the source for the LFCLK.

    I suppose i dont need to use any capacitor in this configuration. Is it correct to set the XOSC32KI.INTCAP as by default ?

    No, you wouldn't need any caps since the LFXO circuit is completely bypassed. Yes, you can set the XOSC32KI.INTCAP as default.

    So far, I have run the above scenario WITHOUT enabling the BYPASS. The device seems to work anyhow. Is that expected ?

    Well, it's recommended to enable BYPASS when using an external clock source. If the external signal is within the expected frequency and voltage range, the internal oscillator circuit might sometimes appear to work, but it is not a guaranteed/stable state.

     In case the external source is removed or fails, what is the behaviour of the clock peripheral ? any fall-back behaviour ?

    I don't think there's any default failsafe / fallback mechanism and the LFCLK will just stop work in case of a failure. But you can always create your own fallback method using a watchdog or interrupt etc.



    I am checking internally for the other queries and will get back to you soon.

    -Priyanka

Children
Related