- 由外部32768晶振改成内部32768
// NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED #define NRFX_CLOCK_ENABLED 1 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source // RC // XTAL // Synth // External Low Swing // External Full Swing
#ifndef NRFX_CLOCK_CONFIG_LF_SRC#define NRFX_CLOCK_CONFIG_LF_SRC 0 #endif
// NRFX_CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority // 0 (highest) // 1 // 2 // 3 // 4 // 5 // 6 // 7
#ifndef NRFX_CLOCK_CONFIG_IRQ_PRIORITY #define NRFX_CLOCK_CONFIG_IRQ_PRIORITY 6 #endif
// NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer //========================================================== #ifndef NRF_CLOCK_ENABLED #define NRF_CLOCK_ENABLED 1 #endif // CLOCK_CONFIG_LF_SRC - LF Clock Source // RC // XTAL // Synth // External Low Swing // External Full Swing
#ifndef CLOCK_CONFIG_LF_SRC#define CLOCK_CONFIG_LF_SRC 0 #endif
// CLOCK_CONFIG_IRQ_PRIORITY - Interrupt priority
// Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice // 0 (highest) // 1 // 2 // 3 // 4 // 5 // 6 // 7
#ifndef CLOCK_CONFIG_IRQ_PRIORITY #define CLOCK_CONFIG_IRQ_PRIORITY 6 #endif
2) 协议栈内部32768//========================================================== // NRF_SDH_CLOCK_LF_SRC - SoftDevice clock source. // NRF_CLOCK_LF_SRC_RC // NRF_CLOCK_LF_SRC_XTAL // NRF_CLOCK_LF_SRC_SYNTH
#ifndef NRF_SDH_CLOCK_LF_SRC#define NRF_SDH_CLOCK_LF_SRC 0 #endif
// NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. #ifndef NRF_SDH_CLOCK_LF_RC_CTIV#define NRF_SDH_CLOCK_LF_RC_CTIV 16 #endif
// NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. // How often (in number of calibration intervals) the RC oscillator shall be calibrated // if the temperature has not changed.
#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2 #endif
// NRF_SDH_CLOCK_LF_ACCURACY - External clock accuracy used in the LL to compute timing. // NRF_CLOCK_LF_ACCURACY_250_PPM // NRF_CLOCK_LF_ACCURACY_500_PPM // NRF_CLOCK_LF_ACCURACY_150_PPM // NRF_CLOCK_LF_ACCURACY_100_PPM // NRF_CLOCK_LF_ACCURACY_75_PPM // NRF_CLOCK_LF_ACCURACY_50_PPM // NRF_CLOCK_LF_ACCURACY_30_PPM // NRF_CLOCK_LF_ACCURACY_20_PPM // NRF_CLOCK_LF_ACCURACY_10_PPM // NRF_CLOCK_LF_ACCURACY_5_PPM // NRF_CLOCK_LF_ACCURACY_2_PPM // NRF_CLOCK_LF_ACCURACY_1_PPM
#ifndef NRF_SDH_CLOCK_LF_ACCURACY#define NRF_SDH_CLOCK_LF_ACCURACY 1 #endif
对于SDK15.2.0版本,NRF_SDH_CLOCK_LF_ACCURACY 要设定为NRF_CLOCK_LF_ACCURACY_500_PPM ,否则会编译警告