Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrfconnect] Optimized external flash power consumption. #16219

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

markaj-nordic
Copy link
Contributor

Problem

  • QSPI consumes ~1.8 mA in active mode
  • this is default mode for nRF53, even if the external flash is not used (no DFU ongoing)
  • such high power consumption is a no-go for SED

Change overview

Force the QSPI into sleep mode and wake it up only on demand, i.e. right before the DFU

Testing

  • tested on nrf53 and lock-app example, i.e. measured the power consumption before/during/after DFU in SED configuration

@github-actions
Copy link

github-actions bot commented Mar 15, 2022

PR #16219: Size comparison from b18b03a to 2da0cf4

Increases (8 builds for nrfconnect)
platform target config section b18b03a 2da0cf4 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 bss 146644 146648 4 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1140875 1140939 64 0.0
bss 143056 143060 4 0.0
text 795956 796008 52 0.0
nrf52840dk_nrf52840+rpc (read/write) 1088655 1088703 48 0.0
bss 139140 139144 4 0.0
text 759824 759876 52 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1046878 1046926 48 0.0
bss 140120 140124 4 0.0
text 709644 709696 52 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1041167 1041231 64 0.0
bss 133004 133008 4 0.0
text 713728 713784 56 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 947426 947474 48 0.0
bss 130100 130104 4 0.0
text 627572 627628 56 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1059203 1059251 48 0.0
bss 132916 132920 4 0.0
text 729836 729892 56 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1042455 1042503 48 0.0
bss 132664 132668 4 0.0
text 716764 716820 56 0.0
Decreases (1 build for nrfconnect)
platform target config section b18b03a 2da0cf4 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154011 1153931 -80 -0.0
text 786976 786896 -80 -0.0
Full report (35 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section b18b03a 2da0cf4 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602578 602578 0 0.0
.app_xip_area 509756 509756 0 0.0
.bss 75576 75576 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560430 560430 0 0.0
.app_xip_area 469136 469136 0 0.0
.bss 74080 74080 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570498 570498 0 0.0
.app_xip_area 469556 469556 0 0.0
.bss 83384 83384 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 919652 919652 0 0.0
(read/write) 128672 128672 0 0.0
.bss 126664 126664 0 0.0
.data 2008 2008 0 0.0
.text 919644 919644 0 0.0
BRD4161A+rpc (read only) 948440 948440 0 0.0
(read/write) 144632 144632 0 0.0
.bss 142440 142440 0 0.0
.data 2188 2188 0 0.0
.text 948432 948432 0 0.0
window-app BRD4161A (read only) 850392 850392 0 0.0
(read/write) 126632 126632 0 0.0
.bss 124768 124768 0 0.0
.data 1864 1864 0 0.0
.text 850384 850384 0 0.0
esp32 all-clusters-app c3devkit (read only) 961388 961388 0 0.0
(read/write) 1394938 1394938 0 0.0
.dram0.bss 64056 64056 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197776 197776 0 0.0
.flash.text 961388 961388 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1017011 1017011 0 0.0
(read/write) 462148 462148 0 0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226720 226720 0 0.0
.flash.text 1011627 1011627 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699340 699340 0 0.0
.bss 77560 77560 0 0.0
.data 1888 1888 0 0.0
.text 614092 614092 0 0.0
lock k32w061+release (read/write) 699644 699644 0 0.0
.bss 77552 77552 0 0.0
.data 1908 1908 0 0.0
.text 614384 614384 0 0.0
linux all-clusters-app debug (read only) 2465225 2465225 0 0.0
(read/write) 146352 146352 0 0.0
.bss 60640 60640 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78728 78728 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 210693 210693 0 0.0
.text 2091298 2091298 0 0.0
bridge-app debug+rpc (read only) 1749757 1749757 0 0.0
(read/write) 92912 92912 0 0.0
.bss 47752 47752 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 38128 38128 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 143308 143308 0 0.0
.text 1490901 1490901 0 0.0
chip-tool debug (read only) 10095037 10095037 0 0.0
(read/write) 357680 357680 0 0.0
.bss 25696 25696 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 324864 324864 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 514997 514997 0 0.0
.text 8798789 8798789 0 0.0
chip-tool-ipv6only arm64 (read only) 9728092 9728092 0 0.0
(read/write) 475425 475425 0 0.0
.bss 44017 44017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371232 371232 0 0.0
.dynamic 560 560 0 0.0
.got 55256 55256 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492196 492196 0 0.0
.text 8186052 8186052 0 0.0
door-lock-app debug (read only) 1984385 1984385 0 0.0
(read/write) 119776 119776 0 0.0
.bss 50944 50944 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62456 62456 0 0.0
.dynamic 592 592 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 178396 178396 0 0.0
.text 1657090 1657090 0 0.0
lighting-app debug+rpc (read only) 2115961 2115961 0 0.0
(read/write) 125160 125160 0 0.0
.bss 51776 51776 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66408 66408 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 170940 170940 0 0.0
.text 1789106 1789106 0 0.0
ota-provider-app debug (read only) 1918537 1918537 0 0.0
(read/write) 115536 115536 0 0.0
.bss 50816 50816 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 57816 57816 0 0.0
.dynamic 608 608 0 0.0
.got 4360 4360 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 164267 164267 0 0.0
.text 1603266 1603266 0 0.0
ota-requestor-app debug (read only) 1949249 1949249 0 0.0
(read/write) 118568 118568 0 0.0
.bss 51840 51840 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 59880 59880 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 160452 160452 0 0.0
.text 1637570 1637570 0 0.0
shell debug (read only) 2411385 2411385 0 0.0
(read/write) 150184 150184 0 0.0
.bss 70600 70600 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73088 73088 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 207474 207474 0 0.0
.text 2047762 2047762 0 0.0
thermostat-no-ble arm64 (read only) 2207236 2207236 0 0.0
(read/write) 149377 149377 0 0.0
.bss 65649 65649 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75368 75368 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 136756 136756 0 0.0
.text 1851168 1851168 0 0.0
tv-app debug (read only) 2656097 2656097 0 0.0
(read/write) 250776 250776 0 0.0
.bss 167840 167840 0 0.0
.data 3104 3104 0 0.0
.data.rel.ro 73800 73800 0 0.0
.dynamic 592 592 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 204213 204213 0 0.0
.text 2277826 2277826 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352756 2352756 0 0.0
.bss 186652 186652 0 0.0
.data 5752 5752 0 0.0
.text 1315356 1315356 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154011 1153931 -80 -0.0
bss 146644 146648 4 0.0
rodata 145276 145276 0 0.0
text 786976 786896 -80 -0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1140875 1140939 64 0.0
bss 143056 143060 4 0.0
rodata 123028 123028 0 0.0
text 795956 796008 52 0.0
nrf52840dk_nrf52840+rpc (read/write) 1088655 1088703 48 0.0
bss 139140 139144 4 0.0
rodata 110616 110616 0 0.0
text 759824 759876 52 0.0
nrf52840dongle_nrf52840 (read/write) 1153735 1153735 0 0.0
bss 144072 144072 0 0.0
rodata 121924 121924 0 0.0
text 797988 797988 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1046878 1046926 48 0.0
bss 140120 140124 4 0.0
rodata 115180 115180 0 0.0
text 709644 709696 52 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1041167 1041231 64 0.0
bss 133004 133008 4 0.0
rodata 115696 115696 0 0.0
text 713728 713784 56 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 947426 947474 48 0.0
bss 130100 130104 4 0.0
rodata 107896 107896 0 0.0
text 627572 627628 56 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1059203 1059251 48 0.0
bss 132916 132920 4 0.0
rodata 117636 117636 0 0.0
text 729836 729892 56 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1042455 1042503 48 0.0
bss 132664 132668 4 0.0
rodata 114216 114216 0 0.0
text 716764 716820 56 0.0
p6 all-clusters-app default (read/write) 2492152 2492152 0 0.0
.bss 120080 120080 0 0.0
.data 2632 2632 0 0.0
.text 1450416 1450416 0 0.0
light-app default (read/write) 2396000 2396000 0 0.0
.bss 113544 113544 0 0.0
.data 2488 2488 0 0.0
.text 1354264 1354264 0 0.0
lock-app default (read/write) 2359544 2359544 0 0.0
.bss 113288 113288 0 0.0
.data 2448 2448 0 0.0
.text 1317808 1317808 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 893770 893770 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 631868 631868 0 0.0

@kkasperczyk-no
Copy link
Contributor

@andy31415 can we fast-track this PR?

@andy31415 andy31415 merged commit 2eafcfb into project-chip:master Mar 24, 2022
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants