summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Moore <nick@zoic.org>2019-04-02 11:38:58 +1100
committerNick Moore <nick@zoic.org>2019-04-02 13:28:22 +1100
commit94bda3bde15eb0f9344167f4f67c80cb491c25e7 (patch)
tree4de6027d5315a8e0cddd596e8d175885ef7423b3
parent6afe23d0b0e42f7bb1dd050015689f6500df644a (diff)
Change nRF RTC implementation to use RTC2 #1046
(to avoid interference with Bluetooth Softdevice. See https://github.com/adafruit/circuitpython/pull/1534#issuecomment-478776240 with thanks to @bboser for pointing it out)
-rw-r--r--ports/nrf/common-hal/rtc/RTC.c2
-rw-r--r--ports/nrf/nrfx_config.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/ports/nrf/common-hal/rtc/RTC.c b/ports/nrf/common-hal/rtc/RTC.c
index d807d7b03..25c1003ed 100644
--- a/ports/nrf/common-hal/rtc/RTC.c
+++ b/ports/nrf/common-hal/rtc/RTC.c
@@ -43,7 +43,7 @@
volatile static uint32_t rtc_offset = 0;
-const nrfx_rtc_t rtc_instance = NRFX_RTC_INSTANCE(0);
+const nrfx_rtc_t rtc_instance = NRFX_RTC_INSTANCE(2);
const nrfx_rtc_config_t rtc_config = {
.prescaler = RTC_FREQ_TO_PRESCALER(RTC_CLOCK_HZ),
diff --git a/ports/nrf/nrfx_config.h b/ports/nrf/nrfx_config.h
index b8a0a7f60..d51739fac 100644
--- a/ports/nrf/nrfx_config.h
+++ b/ports/nrf/nrfx_config.h
@@ -72,6 +72,8 @@
#define NRFX_RTC_ENABLED 1
#define NRFX_RTC0_ENABLED 1
+#define NRFX_RTC1_ENABLED 1
+#define NRFX_RTC2_ENABLED 1
// TIMERS
#define NRFX_TIMER_ENABLED 1