feat(core): update fuel gauge ekf parameters setting.
What changed, and why it matters
This commit adjusts the tuning values for the battery fuel gauge's estimation filter in a Trezor hardware wallet. It changes how aggressively the device trusts its battery sensor measurements versus its internal battery model. There is no indication this is a security fix or introduces a security issue; it appears to be a routine calibration tweak for more accurate battery reporting.
No security action required. Treat as normal firmware maintenance. If reviewing, verify the new EKF parameters were validated against hardware test data for battery gauge accuracy.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies four constants in power_manager_internal.h for the STM32U5 power manager: PM_FUEL_GAUGE_Q (process noise) reduced from 0.001f to 0.0003f, PM_FUEL_GAUGE_R_AGGRESSIVE (measurement noise in aggressive mode) reduced from 1000.0f to 1500.0f, and PM_FUEL_GAUGE_Q_AGGRESSIVE increased from 0.001f to 0.0004f. These are parameters of an Extended Kalman Filter used to estimate battery state-of-charge. The changes are numerical tuning only and do not alter code flow, memory handling, cryptographic operations, or trust boundaries.
Changed components
core/embed/sys/power_manager/stm32u5/power_manager_internal.hInspect captured patch +3 / −3
diff --git a/core/embed/sys/power_manager/stm32u5/power_manager_internal.h b/core/embed/sys/power_manager/stm32u5/power_manager_internal.h
index dca7b2e90..174437759 100644
--- a/core/embed/sys/power_manager/stm32u5/power_manager_internal.h
+++ b/core/embed/sys/power_manager/stm32u5/power_manager_internal.h
@@ -43,9 +43,9 @@
// Fuel gauge extended kalman filter parameters
#define PM_FUEL_GAUGE_R 2000.0f
-#define PM_FUEL_GAUGE_Q 0.001f
-#define PM_FUEL_GAUGE_R_AGGRESSIVE 1000.0f
-#define PM_FUEL_GAUGE_Q_AGGRESSIVE 0.001f
+#define PM_FUEL_GAUGE_Q 0.0003f
+#define PM_FUEL_GAUGE_R_AGGRESSIVE 1500.0f
+#define PM_FUEL_GAUGE_Q_AGGRESSIVE 0.0004f
#define PM_FUEL_GAUGE_P_INIT 0.1f
// Timeout after which the device automatically transit from suspend to
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.