Skip to content

Commit a1dc423

Browse files
committed
Remove Alarm from small boards
1 parent 436e33e commit a1dc423

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

ports/nrf/boards/pca10100/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MCU_CHIP = nrf52833
77

88
INTERNAL_FLASH_FILESYSTEM = 1
99

10+
CIRCUITPY_ALARM = 0
1011
CIRCUITPY_AUDIOMP3 = 0
1112
CIRCUITPY_BITBANGIO = 0
1213
CIRCUITPY_BITMAPTOOLS = 0

ports/nrf/boards/simmel/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ MCU_CHIP = nrf52833
1010

1111
INTERNAL_FLASH_FILESYSTEM = 1
1212

13+
CIRCUITPY_ALARM = 0
1314
CIRCUITPY_AESIO = 1
1415
CIRCUITPY_AUDIOMP3 = 0
1516
CIRCUITPY_BITMAPTOOLS = 0

ports/nrf/mpconfigport.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ CIRCUITPY_COUNTIO = 0
4747
CIRCUITPY_WATCHDOG ?= 1
4848

4949
# Sleep and Wakeup
50-
CIRCUITPY_ALARM = 1
50+
CIRCUITPY_ALARM ?= 1
5151

5252
# nRF52840-specific
5353

ports/nrf/supervisor/port.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ void rtc_handler(nrfx_rtc_int_type_t int_type) {
108108
nrfx_rtc_cc_set(&rtc_instance, 0, 0, false);
109109
} else if (int_type == NRFX_RTC_INT_COMPARE1) {
110110
// used in light sleep
111+
#if CIRCUITPY_ALARM
111112
sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_TIMER;
113+
#endif
112114
nrfx_rtc_cc_set(&rtc_instance, 1, 0, false);
113115
}
114116
}
@@ -184,7 +186,9 @@ safe_mode_t port_init(void) {
184186
NRF_POWER->RESETREAS = reset_reason_saved;
185187
// clear wakeup event/pin when reset by reset-pin
186188
if (reset_reason_saved & NRF_POWER_RESETREAS_RESETPIN_MASK) {
189+
#if CIRCUITPY_ALARM
187190
sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE;
191+
#endif
188192
}
189193

190194
// If the board was reset by the WatchDogTimer, we may

0 commit comments

Comments
 (0)