From: Joey Castillo Date: Wed, 30 Apr 2025 11:44:15 +0000 (-0400) Subject: accelerometer: fix activity not being tracked in low energy mode X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=74923354b97d1054899da9b4b6c5ca88902c0cc3;p=sensor-watch.git accelerometer: fix activity not being tracked in low energy mode --- diff --git a/watch-library/hardware/watch/watch_deepsleep.c b/watch-library/hardware/watch/watch_deepsleep.c index 93312bb..c3cbbe2 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