]> git.earman.xyz Git - sensor-watch.git/commitdiff
accelerometer: fix activity not being tracked in low energy mode
authorJoey Castillo <joeycastillo@utexas.edu>
Wed, 30 Apr 2025 11:44:15 +0000 (07:44 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Wed, 30 Apr 2025 11:44:15 +0000 (07:44 -0400)
watch-library/hardware/watch/watch_deepsleep.c

index 93312bb2c4af8ec744e4982678b494b53ad454c4..c3cbbe2d88f2e660985ed9d73f0c8c3ce9accbf2 100644 (file)
@@ -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