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

Laird BLE654 with Segger embedded Studio and NRF SDK

Hi!

I am using the Segger embedded Studio with PCA10056 successfully. Now I have to evaluate LARD DVK-BL654 (because it has external antenna). I found a guide which says to use eclipse (Junu version, which is old?).

So I was wondering if I could use Embedded Studio also for LAIRD? Is this just something like a board configuration thing?

I already changed  the clock according to the guide i found:

"By default, the BL654 uses the nRF52840’s on-chip RC oscillator as its clock source, as opposed to the nRF52840 development kits which use an external crystal. The difference in oscillator source should therefore be reflected in the SDK".

It compiles and I can select debug (connection to device via j-link is done) but after that nothing happens...

Can somebody help?

Thanks,

Andreas

Parents Reply Children
  • Thank you for the reply. 

    I mean that I can run the sample projects on the nordic nrf52840-dk but not on the DVK-BL654. I can select "Debug->Go" but after Downloading the app nothing happens on the LAIRD board:

  • When you do Debug > Go, it will download the code and then stop at the start of main():

  • That is, what it normally does. But not with the LAIRD Board. My screenshot above is after I hit "Debug->Go". But no stop at the start of main() happens. 

    I tried the blinky example. This works with the "blank" folder but not mit "mbr". BSP example goes to start of main but hangs at clock_initialization:

    void clock_initialization()
    {
    NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
    NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    NRF_CLOCK->TASKS_LFCLKSTART = 1;

    while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
    {
    // Do nothing.
    }
    }

  • Sounds like you haven't (quite) got the LF clock setup right.

    See: devzone.nordicsemi.com/.../185362

    How to properly post source code:

  • As I am using SDK 15.2 I changed the code in "nRF5_SDK\components\softdevice\common\nrf_sdh.c" back to original and tried to set parameters with the projects sdk_config.h

    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <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 // updated 2019-04-18 to reflect Nordic's recommendations
    #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 // updated 2019-04-18 to match Nordic's latest nRF52 specifications
    #endif
    
    // <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
    
    // <h> nRF_Drivers 
    // <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

    But still NRF_CLOCK->EVENTS_LFCLKSTARTED is not set, so clock_initialization() does not complete. I think I set everything like it should? Maybe you or someone else already used BLE654 and has some comments on what to change?

    Thanks for all the support...

Related