0

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

zishiquan gravatar image

asked 2017-10-12 11:29:38 +0200

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

edit retag flag offensive close delete report spam

1 answer

Sort by ┬╗ oldest newest most voted
1
sigurdon gravatar image

answered 2017-10-12 15:27:27 +0200

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);
edit flag offensive delete publish link more

Comments

thanks´╝îis ok

creator ( 2017-10-13 03:47:42 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-10-12 11:29:38 +0200

Seen: 44 times

Last updated: okt. 13