i think ble_uart example based on 32Khz. but my board do not have 32khz osc.(by miss design)
how to running ble_uart example using only 16Mhz?
i think ble_uart example based on 32Khz. but my board do not have 32khz osc.(by miss design)
how to running ble_uart example using only 16Mhz?
In ble_stack_init()
, there is a call to SOFTDEVICE_HANDLER_INIT()
.
Try changing the clock source parameter like this:
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
If I understand things correctly, that should, via SoftDevice API, change LFCLK source from external 32.768kHz to internal RC oscillator. Doing this fixed our issues with a bad 32.768kHz on our nRF51 DK.
I try digging around to see where LFCLK matters for other peripherals but I could not find anything... The reference manual only have a diagram saying the Clock block provide clock for all peripheral via APB bus, that's it.
Interesting, I never noticed this until trying to answer your question, but I have never had to worry about configuring clk for peripherals.. It seems the system automatically takes care of that somehow. Perhaps someone more experienced could explain more in depth.
In ble_stack_init()
, there is a call to SOFTDEVICE_HANDLER_INIT()
.
Try changing the clock source parameter like this:
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
If I understand things correctly, that should, via SoftDevice API, change LFCLK source from external 32.768kHz to internal RC oscillator. Doing this fixed our issues with a bad 32.768kHz on our nRF51 DK.
I try digging around to see where LFCLK matters for other peripherals but I could not find anything... The reference manual only have a diagram saying the Clock block provide clock for all peripheral via APB bus, that's it.
Interesting, I never noticed this until trying to answer your question, but I have never had to worry about configuring clk for peripherals.. It seems the system automatically takes care of that somehow. Perhaps someone more experienced could explain more in depth.