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.
The SoftDevice uses one of two available low frequency clock sources(32 kHz): the internal RC Oscillator, or external Crystal Oscillator.
If you don’t have an external 32 kHz crystal, you must use the internal RC Oscillator.
Are you using a nRF51 or a nRF52?
thank you for your answer. i see that softdevice_handler_init() in ble_stack_init(). replaced NRF_LFCLKSRC_RC_250_4000ms_CALIBRATION(also start HFCLK, TASKs_CAL, and check 16mHZ output at osc), but didn'y working. my circuit is reference on QFAA QFN48 schematic with low voltage mode setup(exactly same without 32khz)
using nrf51822