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

the clock function is not working in esb_ptx example for nRF52832

Hi, 

as I said before I am working with nRF52832. I can connect with nrf and program it. for example I can make an LED to blink. but when I run the esb_ptx example the program doesn't pass through the clock_initialize() line. I am using the CX2016DB32000D0WZRC1 chip as the crystal. can you help me to find the problem.   

Parents
  • All pins have ESD protection, so it you can't measure the diode to VDD or GND, the device is broken. 

    The input signal is too high, try with a ~300 mVpp signal instead. A too high signal won't break it as long as it's within rails but will clip or distort the signal.

    Try reflow or resolder the crystal again.

  • Hi, now, crystal is oscillating with the NRF but the problem is that the nrf can not pass through the loop which indicate that the HFCLK is running, I mean the loop below:

    void clocks_start( void )
    {
        NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
    
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    }

    what can cause this problem? the signal that I am seeing in the oscilloscope is:

    I know that the probe may reduce its amplitude, but even without the probe it can not pass from the loop. 

  • Hi,

    The loop waits for the HFCLKSTARTED event, which has the following condition: "A HFCLKSTARTED event will be generated when the HFXO has started and its frequency is stable.". So we need to look more at your crystal circuitry.

    One potential issue we have not discussed before is that C22 shard ground with DEC2 and DEC3. This could be enough to affect the clock. Can you try to connect C22 directly between pin 1 and 4 on the crystal?

Reply
  • Hi,

    The loop waits for the HFCLKSTARTED event, which has the following condition: "A HFCLKSTARTED event will be generated when the HFXO has started and its frequency is stable.". So we need to look more at your crystal circuitry.

    One potential issue we have not discussed before is that C22 shard ground with DEC2 and DEC3. This could be enough to affect the clock. Can you try to connect C22 directly between pin 1 and 4 on the crystal?

Children
  • Finally I was able to see the crystal working. The problem was because of the fact that the input and output pins of the inverter in nrf (XC1 , XC2) damaged during the soldering process or in any other situation, which is very odd since they should not be broken that easily. The problem now is that the RF part is not working. I am using the Chip antenna now. it is the 2450AT18B100. what factors may interfere in this part? does the cap load of the crystal matters?

  • Hi,

    Masoumeh said:
    The problem now is that the RF part is not working. I am using the Chip antenna now. it is the 2450AT18B100. what factors may interfere in this part? does the cap load of the crystal matters?

    There are several factors that affect the RF performance. First of all, the antenna must be properly matched and tuned. This is the case also for a chip antenna. The load caps of the HF crystal also has a significant impact on the RF performance. If the load caps are off, the RF frequency will be off, and thus RF communication will not work.

  • Finally it worked. As you said it was because of the Cap load of the crystal. they were off. Thanks for all the time that you spend for answering my questions. 

Related