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

BLE using PCA10005 and NRF51822-AK

Someone has a working source code (can be Keil format) for the PCA10005 and/or nrf51822-AK (China made) board? I tried the sample at "\nrf6310\s110\ble_app_hrs" but it seems to freeze or are not well configurated, stopping in the debug mode to a wrong state. I could see a ble device in the sniffer (PCA10000) when using Texas ble CC2541 but never with PCA10005 and nrf51822-AK.

Parents
  • please check your ble_stack_init(); in main()

    make sure your board has 32.768k crystal for your LFCLK

    or you can try RC for LFCLK like this

    
    static void ble_stack_init(void)
    {
    	uint32_t err_code;
    	SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, true);
    	err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
    	wk_printfn(WK_DEBUG_LEVEL_ERROR, "softdevice_ble_evt_handler_set, err_code=%d", err_code);
    	APP_ERROR_CHECK(err_code);
    
    	err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    	wk_printfn(WK_DEBUG_LEVEL_ERROR, "softdevice_ble_evt_handler_set, err_code=%d", err_code);
    	APP_ERROR_CHECK(err_code);
    }
    
    
Reply
  • please check your ble_stack_init(); in main()

    make sure your board has 32.768k crystal for your LFCLK

    or you can try RC for LFCLK like this

    
    static void ble_stack_init(void)
    {
    	uint32_t err_code;
    	SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, true);
    	err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
    	wk_printfn(WK_DEBUG_LEVEL_ERROR, "softdevice_ble_evt_handler_set, err_code=%d", err_code);
    	APP_ERROR_CHECK(err_code);
    
    	err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    	wk_printfn(WK_DEBUG_LEVEL_ERROR, "softdevice_ble_evt_handler_set, err_code=%d", err_code);
    	APP_ERROR_CHECK(err_code);
    }
    
    
Children
No Data
Related