You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2021/02/23 11:54:02 UTC

[mynewt-core] branch master updated: hw/mcu: Fix nRF5340 netcore build with synthesize LF clock

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

janc 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 dea4703  hw/mcu: Fix nRF5340 netcore build with synthesize LF clock
dea4703 is described below

commit dea47034453ebf8307fc31b8de989908bdaaa565
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Tue Feb 23 11:25:55 2021 +0100

    hw/mcu: Fix nRF5340 netcore build with synthesize LF clock
    
    Network core doesn't have secure peripherals.
---
 hw/mcu/nordic/nrf5340_net/src/hal_system.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/mcu/nordic/nrf5340_net/src/hal_system.c b/hw/mcu/nordic/nrf5340_net/src/hal_system.c
index b84aa0d..571f7c0 100644
--- a/hw/mcu/nordic/nrf5340_net/src/hal_system.c
+++ b/hw/mcu/nordic/nrf5340_net/src/hal_system.c
@@ -88,12 +88,12 @@ hal_system_clock_start(void)
 
 #if MYNEWT_VAL_CHOICE(MCU_LFCLK_SOURCE, LFSYNTH)
     /* Must turn on HFLCK for synthesized 32768 crystal */
-    if ((NRF_CLOCK_S->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) !=
+    if ((NRF_CLOCK_NS->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) !=
         (CLOCK_HFCLKSTAT_STATE_Running << CLOCK_HFCLKSTAT_STATE_Pos)) {
-        NRF_CLOCK_S->EVENTS_HFCLKSTARTED = 0;
-        NRF_CLOCK_S->TASKS_HFCLKSTART = 1;
+        NRF_CLOCK_NS->EVENTS_HFCLKSTARTED = 0;
+        NRF_CLOCK_NS->TASKS_HFCLKSTART = 1;
         while (1) {
-            if ((NRF_CLOCK_S->EVENTS_HFCLKSTARTED) != 0) {
+            if ((NRF_CLOCK_NS->EVENTS_HFCLKSTARTED) != 0) {
                 break;
             }
         }