accelerometer: fix activity not being tracked in low energy mode

This commit is contained in:
Joey Castillo 2025-04-30 07:44:15 -04:00
parent 3f08648fc4
commit 74923354b9

View 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