Skip to content

Commit 94bda3b

Browse files
committed
Change nRF RTC implementation to use RTC2 micropython#1046
(to avoid interference with Bluetooth Softdevice. See adafruit#1534 (comment) with thanks to @bboser for pointing it out)
1 parent 6afe23d commit 94bda3b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ports/nrf/common-hal/rtc/RTC.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
volatile static uint32_t rtc_offset = 0;
4545

46-
const nrfx_rtc_t rtc_instance = NRFX_RTC_INSTANCE(0);
46+
const nrfx_rtc_t rtc_instance = NRFX_RTC_INSTANCE(2);
4747

4848
const nrfx_rtc_config_t rtc_config = {
4949
.prescaler = RTC_FREQ_TO_PRESCALER(RTC_CLOCK_HZ),

ports/nrf/nrfx_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272

7373
#define NRFX_RTC_ENABLED 1
7474
#define NRFX_RTC0_ENABLED 1
75+
#define NRFX_RTC1_ENABLED 1
76+
#define NRFX_RTC2_ENABLED 1
7577

7678
// TIMERS
7779
#define NRFX_TIMER_ENABLED 1

0 commit comments

Comments
 (0)