feat(power): STOP-mode sleep/wake power manager — Issue #178 #186
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-firmware/issue-178-power-mgmt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #178.
STM32F7 STOP-mode power management: <10ms wake latency, 30s idle timeout, peripheral gating, Jetson sleep command, power telemetry.
Changes
New files
include/power_mgmt.h—PowerStateenum, full APIsrc/power_mgmt.c— state machine, EXTI wake sources, PLL restore, peripheral clock gating, sleep LED, current estimatestest/test_power_mgmt.py— 72 tests, all passingModified files
include/config.h—PM_IDLE_TIMEOUT_MS=30000,PM_FADE_MS=3000,PM_LED_PERIOD_MS=2000, per-subsystem current constants,PM_TLM_HZ=1include/jlink.h—JLINK_CMD_SLEEP=0x09,JLINK_TLM_POWER=0x81,jlink_tlm_power_t(11 bytes),sleep_reqinJLinkState,jlink_send_power_telemetry()declarationsrc/jlink.c—JLINK_CMD_SLEEPdispatch,jlink_send_power_telemetry()implementationsrc/main.c—power_mgmt_init(), activity tracking,sleep_reqhandler,power_mgmt_tick(), sleep LED PWM,JLINK_TLM_POWERat 1 HzDesign notes
uwTicksaved/restoredpower_mgmt_tick()only called whenBALANCE_DISARMEDJLINK_CMD_SLEEP→ immediate sleep regardless of idle timerJLINK_TLM_POWERat 1 Hz: state + current estimates + idle_msTest results