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

NRF52 Clock Issue

Hi,

I have a board with a NRF52 (3rd party board), there is a 32MHz crystal with the correct load capacitors on, but the crystal is outputting 1MHz on a scope (Tektronix 100MHz), the code runs fine on the DK board, it has the 32KHz also on board, so the board powers up etc, but nothing is running on the NRF, no current is being pulled, am I missing something? It seem that the crystal goes to pin 34 and 35 on the NRF IC, and there are 18pF load capacitors fitted, which according to the datasheet of the crystal (Abracon ABMM2 series) is correct.

  • You are just looking at the alias of the signal. It's a nyquist theorem thing. Just turn the sample rate up (ie, horizontal scale to a minimum) to see the real signal. On your scope the minimum will be about 10nsec/div.

    Normally, you will see a fairly square wave looking thing, but since your scope has only a 100MHz front end it will likely look like a distorted sine wave. The reason is all the harmonics that make it square are way beyond the capabilities of your scope so they will either be lost or alias back in band.

    Also, the parasitic capacitance of the scope probes might pull the crystal a bit. So it may be a little outside of its ppm accuracy. A better approach is to use the ppi to buffer the clock and route it out gpio.

    And remember the 32MHz has to be running. The SD always turns it on but normally your code will be executed with HFINT main clock for power savings. You actually have to request the 32MHz to be on in your code.

  • Hi, Well, the scope is in clock measurement mode, when I measure another circuit using the same scope setup, a PIC16 running @ 32MHz, with a similar crystal, same make, different package, I get a 32MHz burst on the screen, which accurately measures the 32MHz, the circuit should be an almost copy of the eval kit board, minus the NFC. The software is the same and works on the dev board. That is the confusing part! The scope will show at least up to 50MHz accurately as I was scoping an Ethernet ref clock not to long ago with it. I would accept that the probe is adding a bit of capacitance thus throwing the load out if the measurement was close, but it's way off, i'm using the example BLE beacon with SD 132, the current draw on the PSU is showing as 0 as though it isn't running at all (at 1MHz it wouldn't be!)

    Thanks for the reply.

  • The ble beacon app uses the power_manage(); call to disable the crystal and HFCLK most of the time. It is only enabled for very short bursts when transmitting.

  • Try using the sd_clock_hfclk_request (); call to enable the crystal oscillator. You may need to eliminate the power_manage(); call from the main loop.

  • Hi Turbo J, Thanks for the reply, i'll certainly try what you have suggested! The board programs, and verifies, but no current draw or no activity, and when I measured the clock I found 1MHz so figured that's what it was!

Related