InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.64k stars 907 forks source link

Power optimization - enable the DC/DC regulator. #1755

Closed JF002 closed 1 year ago

JF002 commented 1 year ago

The DC/DC regulator reduce the power consumption of the MCU compared to the default LDO regulator. The DC/DC regulator needs additional HW that is mounted on the PineTime.

This change reduces the power usage by 380µA during fast advertising, by 200µA during slow advertising and by 186µA when BLE is disabled.

github-actions[bot] commented 1 year ago
Build size and comparison to main: Section Size Difference
text 407660B 0B
data 940B 0B
bss 54136B 0B
aykevl commented 1 year ago

Apparently this is supported in Mynewt - but not in FreeRTOS I guess:

https://github.com/apache/mynewt-core/blob/24d9c3b3c1699fba734a2dc3e37935ff27ee04e3/hw/bsp/pinetime/syscfg.yml#L54

    # Enable DC/DC regulator
    MCU_DCDC_ENABLED: 1

[...] and by 186µA when BLE is disabled.

If DCDCEN has any effect, it means that something is still draining power: DCDCEN does not (significantly) reduce current consumption when the nrf52832 is fully asleep. (But I guess the other PRs should help with that).

JF002 commented 1 year ago

According to my measurement, the watch uses ~240µA more during fast BLE advertising, and ~15µA during slow advertising. However, the measurements are the same when BLE is disabled, exactly as you said!