nRF51822 external crystal problems

I have searched your forum and have found several references to my issue; however, I have not been able to get anything resolved.
I am using the nRF51822 which is part of the RAYTAC MDBT40 module.
I am using your ble_app_uart_pca1028_s130 as my base code and have not modified anything critical, only the nus_data_handler to process the data received from the smart phone.
The code is working perfectly on your nRF51 Development Kit and if I upload to the RAYTAC development board with the nRF51822 on their module, it continues to work perfectly.
When I mount the RAYTAC MDBT40 module on our board, the problems begin.  When the board is powered up, a 32KHz sine wave appears on XL1, but when I upload our code, the sinewave stops.  I am able to do other uploads, but the chip appears to be dead otherwise.
We are using the exact same EPSON crystal as RAYTAC, 32.768kHz, load capacitance of 9pF with two 12pF caps going to ground at XL1 and XL2. The traces to the crystal are as short as possible and equal length, and there are no parallel traces in the crystal circuit.
I have used crystals on other processors, tone generators, precision oscillators etc., but have never experienced a problem like this.
Any assistance would be appreciated.
Parents
No Data
Reply
  • Hello, 

    When I mount the RAYTAC MDBT40 module on our board, the problems begin.  When the board is powered up, a 32KHz sine wave appears on XL1, but when I upload our code, the sinewave stops.

     What code is running before you upload your code? 

    Have you ensured that LF Clock Source is configured correctly in your code?

    The LFCLK-source can be configured to these three:

    * Internal RC oscillator

    * External 32 kHz oscillator

    * Synthesized from 16M Xtal

    In sdk_config.h

    // <o> CLOCK_CONFIG_LF_SRC  - LF Clock Source
     
    // <0=> RC 
    // <1=> XTAL 
    // <2=> Synth 
    
    #ifndef CLOCK_CONFIG_LF_SRC
    #define CLOCK_CONFIG_LF_SRC 1
    #endif

    If that does not help, I will need more information regarding your board and the Raytac module.  

Children