Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reduce panda power usage#2340

Merged
elkoled merged 83 commits into
masterfrom
reduce-power
Feb 19, 2026
Merged

Reduce panda power usage#2340
elkoled merged 83 commits into
masterfrom
reduce-power

Conversation

@elkoled

@elkoled elkoled commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Panda Power Optimization
Reduces OBD-C port power by 77% (225 mW -> 52 mW) in low power state.

The panda STM32H7 MCU on comma four runs at 240 MHz on VOS1 voltage scaling. In its stock configuration with all peripheral clocks enabled it draws 225 mW in low power state.
This can be reduced to 52 mW in 3 main steps:

  • Disable clocks and power to peripherals we don't need in standby
  • Drop voltage scaling from VOS1 (High Performance) to VOS3 (Low Power)
  • Enter deep sleep

Each optimization was measured individually on comma four hardware.

SIL2 considerations:
Stop mode is only entered from SAFETY_SILENT when no safety function is active, fulfilling rule CoU_3 of UM2331.

image

Comment thread board/sys/sys.h Outdated
Comment thread board/main.c
Comment thread board/sys/power_saving.h Outdated
@adeebshihadeh

Copy link
Copy Markdown
Contributor

Can we also store a reset count or some other debug info in memory?

@elkoled

elkoled commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

There is a 32bit RTC backup register that could be used for saving a reset counter, it resets on VBAT power loss.

@elkoled

elkoled commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

NVIC_SystemReset wrapper and save reset counter is a good separate PR.

@elkoled elkoled merged commit e1da7dc into master Feb 19, 2026
7 checks passed
@elkoled elkoled deleted the reduce-power branch February 19, 2026 22:14
heysenbug pushed a commit to Ever-Cars/panda that referenced this pull request Mar 8, 2026
* add bootkick for ship mode

* boot standby

* comment

* stop mode

* fix som status

* exti wakeup

* all standby

* clean

* analog mode

* adc

* clean

* HSI

* stop only cuatro

* comments

* UM2331

* rm

* comment

* enforce SAFETY_SILENT

* clean

* misra

* rm

* disable pulls

* assert

* Revert "disable pulls"

This reverts commit 3b954b9.

* pull note

* add stop mode USB cmd

* add stop mode to HITL

* fix

* async stop mode request

* test all harness/ign configs

* more time

* use uptime

* print debug

* unstuck

* show prints

* more

* logger

* loglevel

* log

* uptime test

* tighter timing

* print wakeout source

* rm debug

* clean

* robust

* add CAN2

* test more cans

* clean

* more

* longer

* multiple

* more

* can1

* reorder

* normal

* clean

* partial

* clean

* test

* time

* delay

* reset

* setup

* reset

* revert

* silent

* fix ordering

* no random

* warnings

* err

* timings

* heartbeat

* time

* faster

* can1

* simpler

* test 20x

* put back random

* clean

* comment

* jenkinsfile

* final
heysenbug added a commit to Ever-Cars/panda that referenced this pull request Mar 8, 2026
* single header for all drivers (commaai#2335)

* drivers.h, claude's try

* include from root

* fix mac

* organize a lil more

* Move system stuff to sys/ (commaai#2337)

* Move system stuff to sys/

* move power saving

* clean up

* cleanup unused defines in drivers.h (commaai#2336)

* Bootkick ship mode (commaai#2330)

* add bootkick for ship mode

* boot standby

* comment

* No more VBAT_EN (commaai#2339)

this pin is not connected anymore

* Reduce panda power usage (commaai#2340)

* add bootkick for ship mode

* boot standby

* comment

* stop mode

* fix som status

* exti wakeup

* all standby

* clean

* analog mode

* adc

* clean

* HSI

* stop only cuatro

* comments

* UM2331

* rm

* comment

* enforce SAFETY_SILENT

* clean

* misra

* rm

* disable pulls

* assert

* Revert "disable pulls"

This reverts commit 3b954b9.

* pull note

* add stop mode USB cmd

* add stop mode to HITL

* fix

* async stop mode request

* test all harness/ign configs

* more time

* use uptime

* print debug

* unstuck

* show prints

* more

* logger

* loglevel

* log

* uptime test

* tighter timing

* print wakeout source

* rm debug

* clean

* robust

* add CAN2

* test more cans

* clean

* more

* longer

* multiple

* more

* can1

* reorder

* normal

* clean

* partial

* clean

* test

* time

* delay

* reset

* setup

* reset

* revert

* silent

* fix ordering

* no random

* warnings

* err

* timings

* heartbeat

* time

* faster

* can1

* simpler

* test 20x

* put back random

* clean

* comment

* jenkinsfile

* final

* Remove python3 and gcc@13 installation for macOS (commaai#2343)

* sync device time before git checkout in CI (commaai#2344)

* vendor the compiler toolchain (commaai#2342)

* use vendored cppcheck from dependencies repo (commaai#2347)

* measure sound output level (commaai#2354)

* measure sound output level

* average instead

* this was wrong

* fix calc?

* try vu meter

* abs per buf

* more testing

* debug

* debug2

* debug3

* reset to 0

* fix parsing bug

* fix parsing bug

* this works

* minor cleanup

* fix misra

* docs

* Don't overflow the mic filter (commaai#2352)

don't overflow the filter

* Remove FINAL_PROVISIONING firmware variant (commaai#2358)

* Remove FINAL_PROVISIONING firmware path and CI usage

* Remove remaining FINAL_PROVISIONING references from CI

* why do i even try codex

* build system simplifications (commaai#2359)

* buidl system simplifications

* less j

* fix that

* make test_misra.sh a lil nicer to run

* Revert "make test_misra.sh a lil nicer to run"

This reverts commit 16a8e52.

* don't install spidev on PC (commaai#2360)

* don't install spidev on PC

* ugh base ubuntu

* install libusb from pip (commaai#2351)

* install libusb from pip

Use libusb-package to bundle libusb as a Python dependency instead of
requiring it as a system package. This simplifies setup on all platforms.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix agnos

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* document structs inline (commaai#2362)

* inline CAN docs

* document structs inline

* lil more

* mv crypto/ and certs/ into board/ (commaai#2363)

* run all tests in test.sh (commaai#2364)

* rm tres bootkick tests (commaai#2365)

---------

Co-authored-by: Adeeb Shihadeh <[email protected]>
Co-authored-by: Daniel Koepping <[email protected]>
Co-authored-by: Robbe Derks <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
mmoo758 added a commit to mmoo758/panda that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants