I need to add a clock function to the ble_app_uart example (SDK12). Where can I find a hint on how to do it? Do I need an external 32768Hz quartz? I wanted to derive from the 16 MHz quartz instead to save cost.
I need to add a clock function to the ble_app_uart example (SDK12). Where can I find a hint on how to do it? Do I need an external 32768Hz quartz? I wanted to derive from the 16 MHz quartz instead to save cost.
What sort of clock function are you looking for?
You don't need an external 32768Hz XTAL. You can use the RC Oscillator.
Please be aware that using the RC Oscillator is less accurate, and draws a bit more power than having an external LFXTAL.
To change to the RC Oscillatorin SDK12, look for the define NRF_CLOCK_LFCLKSRC (in pca10028.h, or your custom board file if you have a custom PCB).
To see what the different parameters mean, check out nrf_sdm.h line 204 - 235. To get started using the RC Oscillator you can set NRF_CLOCK_LFCLKSRC to:
// Low frequency clock source to be used by the SoftDevice
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \
.rc_ctiv = 16, \
.rc_temp_ctiv = 2, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM}
Best regards,
Edvin
What sort of clock function are you looking for?
You don't need an external 32768Hz XTAL. You can use the RC Oscillator.
Please be aware that using the RC Oscillator is less accurate, and draws a bit more power than having an external LFXTAL.
To change to the RC Oscillatorin SDK12, look for the define NRF_CLOCK_LFCLKSRC (in pca10028.h, or your custom board file if you have a custom PCB).
To see what the different parameters mean, check out nrf_sdm.h line 204 - 235. To get started using the RC Oscillator you can set NRF_CLOCK_LFCLKSRC to:
// Low frequency clock source to be used by the SoftDevice
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \
.rc_ctiv = 16, \
.rc_temp_ctiv = 2, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM}
Best regards,
Edvin