nRF52833 Unable to Use External 32 MHz Crystal

Hewy there:
I have a custom nRF52833 board with NCS v3.1.0, using ESB and USB CDC ACM. The external 32 MHz crystal is oscillating fine — we see a clean 32 MHz sine wave at 700 mVpp on the scope. Crystal is X201632MOB4SI (YSX211SL, CL=12 pF), with 12 pF caps on both pins.
But EVENTS_HFCLKSTARTED never fires. HFCLKSTAT still shows SRC=0 (internal RC). We also tried setting HFXODEBOUNCE to 0x40 before starting the task, no change.
The app hangs in lfclk_spinwait() when using CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y. With RC everything runs but USB fails (Windows error code 43) and ESB doesn't work.
Why would EVENTS_HFCLKSTARTED not trigger when the crystal is clearly oscillating at the right frequency and amplitude?
Thank you.
Parents
  • Is this a custom board and if so have you had a review don on this ? If not we can have a look at the design if you want, either here or in a new ticket(private if so needed). 


    From our design guide here, General PCB design guidelines for nRF52 series :  


    The load capacitors, Ccap, are connected to the crystal and the values of the Ccap are given by the formula:

    Ccap = 2*CL – C_pcb – C_pin

    CL is the load capacitance of the crystal in use and can be found in the datasheet of the crystal.

    C_pcb + C_pin is approximately 4 pF for the HFXO pins and approximately 5 pF for the LFXO pins. 

    More details can be found in the whitepaper "Crystal Oscillator Design Considerations". Please note that this paper is written for older chips (not nRF51/52) and that the input capacitance is given by: C_pcb + C_pin and not 1 pF, as it's stated in the whitepaper.



    So for you 12pF CL you would want a value of around 20pF 

    Regards,
    Jonathan

  • Hello, I tried replacing the 12pf capacitor with a 20pf model, but the USB still doesn't work properly. Is there any other way to troubleshoot the issue?

  • If you want we can have a look at the schematic, if you don't want to share the design in a public ticket you can create a new private one.  

    I would start by testing some known software again to make sure that there are no SW issues. 

    If you want to test the 32MHz you can use the radio test sample, set the device in TX and use modulated, if the output signal is at the given freq then you will see how accurate the crystal is with the load it has. 

    Alternatively, you can probe the USB lines see what is happening if there is anything there even with the USB fail error.

    Regards,
    Jonathan

Reply
  • If you want we can have a look at the schematic, if you don't want to share the design in a public ticket you can create a new private one.  

    I would start by testing some known software again to make sure that there are no SW issues. 

    If you want to test the 32MHz you can use the radio test sample, set the device in TX and use modulated, if the output signal is at the given freq then you will see how accurate the crystal is with the load it has. 

    Alternatively, you can probe the USB lines see what is happening if there is anything there even with the USB fail error.

    Regards,
    Jonathan

Children
Related