diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h index c422dbd555..1e55cd0260 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h @@ -61,8 +61,6 @@ #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) -#define BOARD_HAS_CRYSTAL 1 - #define DEFAULT_I2C_BUS_SCL (&pin_P0_04) #define DEFAULT_I2C_BUS_SDA (&pin_P0_05) diff --git a/ports/nrf/common-hal/bleio/Adapter.c b/ports/nrf/common-hal/bleio/Adapter.c index 463e5d25b7..15ae8840b6 100644 --- a/ports/nrf/common-hal/bleio/Adapter.c +++ b/ports/nrf/common-hal/bleio/Adapter.c @@ -51,12 +51,12 @@ STATIC uint32_t ble_stack_enable(void) { .source = NRF_CLOCK_LF_SRC_XTAL, .rc_ctiv = 0, .rc_temp_ctiv = 0, - .accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM + .accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM, #else .source = NRF_CLOCK_LF_SRC_RC, .rc_ctiv = 16, .rc_temp_ctiv = 2, - .accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM + .accuracy = NRF_CLOCK_LF_ACCURACY_250_PPM, #endif }; diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 3f939b492a..0b755a156b 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -38,11 +38,6 @@ #define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_UJSON (1) -#ifndef BOARD_HAS_32KHZ_XTAL -// Assume crystal is present, which is the most common case. -#define BOARD_HAS_32KHZ_XTAL (0) -#endif - // TODO this is old BLE stuff #if BLUETOOTH_SD #define MICROPY_PY_BLEIO (1) @@ -58,6 +53,11 @@ #include "py/circuitpy_mpconfig.h" +#ifndef BOARD_HAS_32KHZ_XTAL +// Assume crystal is present, which is the most common case. +#define BOARD_HAS_32KHZ_XTAL (1) +#endif + #define MICROPY_PORT_ROOT_POINTERS \ CIRCUITPY_COMMON_ROOT_POINTERS \ ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \ diff --git a/ports/nrf/peripherals/nrf/clocks.c b/ports/nrf/peripherals/nrf/clocks.c index 67c7484887..269365cc94 100644 --- a/ports/nrf/peripherals/nrf/clocks.c +++ b/ports/nrf/peripherals/nrf/clocks.c @@ -26,7 +26,7 @@ */ #include "nrfx.h" -#include "mpconfigboard.h" +#include "mpconfigport.h" void nrf_peripherals_clocks_init(void) {