nRF52832 BLE not working in CIAA package with LF CLK = RC

I have code which works on the nRF52DK and on the Fanstel BT832 module, which does not work on our custom board with the CIAA package.  Our custom board does not have an external LF oscillator, and I have configured it to use the RC oscillator (configuration shown below).  When debugging on the custom board, the code appears to work correctly with no errors in any of the soft device calls, including advertising start.  All debugging messages are the same on the dev board as well as the custom board. However, we are getting no RF from the output pin, as measured using a spectrum analyzer, both with an antenna next to the board and with coax directly connected to the board.  We have several boards with the same behavior.  We have verified our spectrum analyzer configuration using the dev board and see strong signal from it.

Is there a configuration or system call that I am missing either for the CIAA package or the LF CLK, even though it appears to be working correctly while debugging?

Also, what is the sleep current consumption difference between having an external LF CLK oscillator and using RC for the LF CLK?

The project was initially based off the BLE_NUS example.

The sdk_config.h as follows, and before these modifications it was not running:

// <e> NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver
//==========================================================
#ifndef NRFX_CLOCK_ENABLED
#define NRFX_CLOCK_ENABLED 1
#endif
// <o> NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source

// <0=> RC
// <1=> XTAL
// <2=> Synth
// <131073=> External Low Swing
// <196609=> External Full Swing

#ifndef NRFX_CLOCK_CONFIG_LF_SRC
#define NRFX_CLOCK_CONFIG_LF_SRC 0
#endif

// <e> NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer
//==========================================================
#ifndef NRF_CLOCK_ENABLED
#define NRF_CLOCK_ENABLED 1
#endif
// <o> CLOCK_CONFIG_LF_SRC - LF Clock Source

// <0=> RC
// <1=> XTAL
// <2=> Synth
// <131073=> External Low Swing
// <196609=> External Full Swing

#ifndef CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0
#endif

// <q> CLOCK_CONFIG_LF_CAL_ENABLED - Calibration enable for LF Clock Source

#ifndef CLOCK_CONFIG_LF_CAL_ENABLED
#define CLOCK_CONFIG_LF_CAL_ENABLED 0
#endif

// <o> CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority

// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7

#ifndef CLOCK_CONFIG_IRQ_PRIORITY
#define CLOCK_CONFIG_IRQ_PRIORITY 6
#endif

//==========================================================
// <o> NRF_SDH_CLOCK_LF_SRC - SoftDevice clock source.

// <0=> NRF_CLOCK_LF_SRC_RC
// <1=> NRF_CLOCK_LF_SRC_XTAL
// <2=> NRF_CLOCK_LF_SRC_SYNTH

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval.
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature.
// <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
// <i> if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// <o> NRF_SDH_CLOCK_LF_ACCURACY - External clock accuracy used in the LL to compute timing.

// <0=> NRF_CLOCK_LF_ACCURACY_250_PPM
// <1=> NRF_CLOCK_LF_ACCURACY_500_PPM
// <2=> NRF_CLOCK_LF_ACCURACY_150_PPM
// <3=> NRF_CLOCK_LF_ACCURACY_100_PPM
// <4=> NRF_CLOCK_LF_ACCURACY_75_PPM
// <5=> NRF_CLOCK_LF_ACCURACY_50_PPM
// <6=> NRF_CLOCK_LF_ACCURACY_30_PPM
// <7=> NRF_CLOCK_LF_ACCURACY_20_PPM
// <8=> NRF_CLOCK_LF_ACCURACY_10_PPM
// <9=> NRF_CLOCK_LF_ACCURACY_5_PPM
// <10=> NRF_CLOCK_LF_ACCURACY_2_PPM
// <11=> NRF_CLOCK_LF_ACCURACY_1_PPM

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif

Parents
  • I just got some more information.  It is outputting RF at ~2.0GHz (we weren't scanning that low with the spectrum analyzer), and it isn't a stable output frequency.  Instead of three discrete advertising frequencies, it is outputting in a range, so it looks like clock instability or something similar.  Could there be a software configuration that would cause that?

  • Kcecil said:
     so it looks like clock instability or something similar. 

    This seems likely.

    Can you share the datasheet of the 32MHz crystal? and what capacitor values are you suing to load it?


    Seems like the rest of the custom board is working fine\as expected, so you don't see any other issues.


    You can use the Radio test sample to test the radio, using a constant carrier and a un-modulated signal you can check how accurate the crystal is.

    We can do a review of you design if you want

    Regards,
    Jonathan

Reply
  • Kcecil said:
     so it looks like clock instability or something similar. 

    This seems likely.

    Can you share the datasheet of the 32MHz crystal? and what capacitor values are you suing to load it?


    Seems like the rest of the custom board is working fine\as expected, so you don't see any other issues.


    You can use the Radio test sample to test the radio, using a constant carrier and a un-modulated signal you can check how accurate the crystal is.

    We can do a review of you design if you want

    Regards,
    Jonathan

Children
  • Jonathon,

    I have made a little progress.  I have gotten the sd_clock_hfclk_is_running() to return true on the dev board by looping the call to it, and the HF CLK is not running on our custom board.

     I’ve attached the crystal datasheet.  The initially loaded cap values are 12pF, and we’ve also tried 18pF and 6pF.

    The crystal part number is ECS-320-8-47-CKM-TR3, which should be:

    32.000MHz,

    CL=8pF,

    TOLERANCE:  C=10ppm,

    STABILITY:  K=+/-10ppm,

    TEMP RANGE:  -20 to +70C,

    all devices are:  Co=5pF, 100uW, ESR=80 (for 32MHz)

     The design is based off your reference design, but the crystal is different since the crystal used in your reference design was unavailable.ECX-1247.pdf

  • Sorry for the delay,

    Crystal and capacitors seem perfectly fine.

    You can test the radio in a different way, On the custom board load up the radio test sample and run a un-modulated carrier on any channel that you want, then use a DK and the RSSI viewer(shows a gif of interface) from the nrf connect for desktop app. If you have the two boards on your desk then you should see if on of the channels (the one that you select to transmit a un-modulated carrier on) is increasing in the RSSI viewer app.

    If you have a spectrum analyzer then that is a better option, but it is not something that is as easily accessible.

    To properly tune the HFXO you would need a spectrum analyzer but you should be able to see if there is anything going on and if the RF is working some what. 

    Regards,
    Jonathan

Related