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

Nordic51822 no external 32.768 k of crystals in the routine what configuration

image description

Nordic51822 no external 32.768 k of crystals in the routine what configuration

Use this routine nordic\nRF5_SDK_12.2.0_f012efa-3d\examples\ble_peripheral\ble_app_bps\pca10028\s130\arm5_no_packs

Parents
  • Hi,

    If you don't have a 32.768k external crystal on your board, you need to configure the SoftDevice to use the internal 32.768k RC oscillator. In the function ble_stack_init() in main.c, change this snippet

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;       
    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
    

    to this:

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
    clock_lf_cfg.source = NRF_CLOCK_LF_SRC_RC;
    clock_lf_cfg.rc_ctiv = 16;
    clock_lf_cfg.rc_temp_ctiv = 2;
    
       
    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
    
Reply
  • Hi,

    If you don't have a 32.768k external crystal on your board, you need to configure the SoftDevice to use the internal 32.768k RC oscillator. In the function ble_stack_init() in main.c, change this snippet

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;       
    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
    

    to this:

    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
    clock_lf_cfg.source = NRF_CLOCK_LF_SRC_RC;
    clock_lf_cfg.rc_ctiv = 16;
    clock_lf_cfg.rc_temp_ctiv = 2;
    
       
    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
    
Children
Related