From 74923354b97d1054899da9b4b6c5ca88902c0cc3 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 30 Apr 2025 07:44:15 -0400 Subject: [PATCH] accelerometer: fix activity not being tracked in low energy mode --- watch-library/hardware/watch/watch_deepsleep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/watch-library/hardware/watch/watch_deepsleep.c b/watch-library/hardware/watch/watch_deepsleep.c index 93312bb2..c3cbbe2d 100644 --- a/watch-library/hardware/watch/watch_deepsleep.c +++ b/watch-library/hardware/watch/watch_deepsleep.c @@ -129,8 +129,9 @@ static void _watch_disable_all_pins_except_rtc(void) { uint32_t config = RTC->MODE0.TAMPCTRL.reg; uint32_t portb_pins_to_disable = 0xFFFFFFFF; - /// FIXME: Watch library shouldn't be responsible for this, but ovement uses PB03 for orientation tracking. Keep it on. - portb_pins_to_disable &= 0xFFFFFFF7; + /// FIXME: Watch library shouldn't be responsible for this, but Movement uses PB00 and PB03 for activity and orientation tracking. + /// As such, we need to keep them on. + portb_pins_to_disable &= 0xFFFFFFF6; // if there's an action set on RTC/IN[0], leave PB00 configured if (config & RTC_TAMPCTRL_IN0ACT_Msk) portb_pins_to_disable &= 0xFFFFFFFE; // same with RTC/IN[1] and PB02