diff --git a/libraries/Bluefruit52Lib/src/bluefruit.cpp b/libraries/Bluefruit52Lib/src/bluefruit.cpp index a53e6109..cdf8ec2b 100644 --- a/libraries/Bluefruit52Lib/src/bluefruit.cpp +++ b/libraries/Bluefruit52Lib/src/bluefruit.cpp @@ -257,14 +257,10 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count) .source = NRF_CLOCK_LF_SRC_RC, .rc_ctiv = 16, .rc_temp_ctiv = 2, - #if SD_VER < 500 - .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM - #else .accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM - #endif }; #else - #error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board + #error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h #endif VERIFY_STATUS( sd_softdevice_enable(&clock_cfg, nrf_error_cb) ); diff --git a/platform.txt b/platform.txt index 0f47b7ac..423a7526 100644 --- a/platform.txt +++ b/platform.txt @@ -60,7 +60,7 @@ nordic.path={build.core.path}/nordic # ARDUINO_FEATHER52 is defined for backward compatiable with other lib only # should be replaced by ARDUINO_NRF52_ADAFRUIT in the future -compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DUSE_LFXO {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/tinyusb/src" +compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/tinyusb/src" # These can be overridden in platform.local.txt compiler.c.extra_flags= diff --git a/variants/feather_nrf52832/variant.h b/variants/feather_nrf52832/variant.h index 8f8f196c..079cbbad 100644 --- a/variants/feather_nrf52832/variant.h +++ b/variants/feather_nrf52832/variant.h @@ -22,6 +22,9 @@ /** Master clock frequency */ #define VARIANT_MCK (64000000ul) +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + /*---------------------------------------------------------------------------- * Headers *----------------------------------------------------------------------------*/ diff --git a/variants/feather_nrf52840_express/variant.h b/variants/feather_nrf52840_express/variant.h index 8053065f..b9d50a00 100644 --- a/variants/feather_nrf52840_express/variant.h +++ b/variants/feather_nrf52840_express/variant.h @@ -22,6 +22,9 @@ /** Master clock frequency */ #define VARIANT_MCK (64000000ul) +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + /*---------------------------------------------------------------------------- * Headers *----------------------------------------------------------------------------*/ diff --git a/variants/pca10056/variant.h b/variants/pca10056/variant.h index c82ec334..f283a804 100644 --- a/variants/pca10056/variant.h +++ b/variants/pca10056/variant.h @@ -22,6 +22,9 @@ /** Master clock frequency */ #define VARIANT_MCK (64000000ul) +#define USE_LFXO // Board uses 32khz crystal for LF +// define USE_LFRC // Board uses RC for LF + /*---------------------------------------------------------------------------- * Headers *----------------------------------------------------------------------------*/