You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2023/01/13 20:49:30 UTC

[mynewt-core] branch master updated: hw/mcu/nrf53: Enable DCDC on VREGH

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 1dc1596d0 hw/mcu/nrf53: Enable DCDC on VREGH
1dc1596d0 is described below

commit 1dc1596d0d74b0e0888cfc1f89e63986ec86e3e9
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Jan 13 11:07:12 2023 +0100

    hw/mcu/nrf53: Enable DCDC on VREGH
    
    If high voltage mode is used, we should also enable DCDC on VREGH.
---
 hw/mcu/nordic/nrf5340/src/hal_system.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/mcu/nordic/nrf5340/src/hal_system.c b/hw/mcu/nordic/nrf5340/src/hal_system.c
index 376aabf0b..36868c0f9 100644
--- a/hw/mcu/nordic/nrf5340/src/hal_system.c
+++ b/hw/mcu/nordic/nrf5340/src/hal_system.c
@@ -46,6 +46,9 @@ hal_system_init(void)
 
 #if MYNEWT_VAL(MCU_DCDC_ENABLED)
     NRF_REGULATORS->VREGMAIN.DCDCEN = 1;
+    if (NRF_REGULATORS->MAINREGSTATUS & REGULATORS_MAINREGSTATUS_VREGH_Msk) {
+        NRF_REGULATORS->VREGH.DCDCEN = 1;
+    }
 
 #if MYNEWT_VAL(BSP_NRF5340_NET_ENABLE)
     NRF_REGULATORS->VREGRADIO.DCDCEN = 1;