diff options
| author | Jean-François Milants <jf@codingfield.com> | 2023-05-07 18:15:33 +0200 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2023-06-04 17:03:37 +0200 |
| commit | 2fa3aaa1617849dd29fe55c844d5250df0cba955 (patch) | |
| tree | cad99ca48041b2ad367442dc23e9702bf5e56984 | |
| parent | a48d4e0b1330a34e32f56a6d4a65c77eca84f655 (diff) | |
Power optimization - enable the DC/DC regulator.
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.
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index aa98de3f..9c13a169 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -304,7 +304,12 @@ void calibrate_lf_clock_rc(nrf_drv_clock_evt_type_t /*event*/) { nrf_drv_clock_calibration_start(16, calibrate_lf_clock_rc); } +void enable_dcdc_regulator() { + NRF_POWER->DCDCEN = 1; +} + int main() { + enable_dcdc_regulator(); logger.Init(); nrf_drv_clock_init(); |
