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 2023/10/09 06:59:40 UTC

[mynewt-core] 02/07: mcu/nordic: Fix restrictions for 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

commit f1834d20aca2ea9b7f63395afdffead65971a3ac
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Fri Oct 6 16:18:15 2023 +0200

    mcu/nordic: Fix restrictions for LF clock
    
    LFCLK is required to be set to non-LFRC only if Bluetooth controller
    is enabled. Otherwise it may or maynot be set to any value, depending
    on application and bootloader configuration.
---
 hw/mcu/nordic/nrf51xxx/syscfg.yml    | 5 +----
 hw/mcu/nordic/nrf52xxx/syscfg.yml    | 4 +---
 hw/mcu/nordic/nrf5340/syscfg.yml     | 2 --
 hw/mcu/nordic/nrf5340_net/syscfg.yml | 5 +----
 hw/mcu/nordic/nrf91xx/syscfg.yml     | 2 --
 5 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/hw/mcu/nordic/nrf51xxx/syscfg.yml b/hw/mcu/nordic/nrf51xxx/syscfg.yml
index 2917604b4..0ff2ef75c 100644
--- a/hw/mcu/nordic/nrf51xxx/syscfg.yml
+++ b/hw/mcu/nordic/nrf51xxx/syscfg.yml
@@ -102,7 +102,7 @@ syscfg.defs:
             Selected source for low frequency clock (LFCLK).
         value:
         restrictions:
-            - $notnull
+            - '!BLE_CONTROLLER || (MCU_LFCLK_SOURCE != "LFRC")'
         choices:
             - LFRC      # 32.768 kHz RC oscillator
             - LFXO      # 32.768 kHz crystal oscillator
@@ -145,6 +145,3 @@ syscfg.vals.XTAL_RC:
     MCU_LFCLK_SOURCE: LFRC
 syscfg.vals.XTAL_32768_SYNTH:
     MCU_LFCLK_SOURCE: LFSYNTH
-
-syscfg.restrictions.BLE_CONTROLLER:
-    - 'MCU_LFCLK_SOURCE != "LFRC"'
diff --git a/hw/mcu/nordic/nrf52xxx/syscfg.yml b/hw/mcu/nordic/nrf52xxx/syscfg.yml
index e05e2d91a..6822a8ead 100644
--- a/hw/mcu/nordic/nrf52xxx/syscfg.yml
+++ b/hw/mcu/nordic/nrf52xxx/syscfg.yml
@@ -59,7 +59,7 @@ syscfg.defs:
             Selected source for low frequency clock (LFCLK).
         value:
         restrictions:
-            - $notnull
+            - '!BLE_CONTROLLER || (MCU_LFCLK_SOURCE != "LFRC")'
         choices:
             - LFRC      # 32.768 kHz RC oscillator
             - LFXO      # 32.768 kHz crystal oscillator
@@ -503,5 +503,3 @@ syscfg.restrictions:
     - "!UART_1 || (UART_1_PIN_TX && UART_1_PIN_RX)"
     - "(OS_TICKS_PER_SEC == 128 || OS_TICKS_PER_SEC == 256 || OS_TICKS_PER_SEC == 512 || OS_TICKS_PER_SEC == 1024)"
 
-syscfg.restrictions.BLE_CONTROLLER:
-    - 'MCU_LFCLK_SOURCE != "LFRC"'
diff --git a/hw/mcu/nordic/nrf5340/syscfg.yml b/hw/mcu/nordic/nrf5340/syscfg.yml
index d4c5df1da..cfa8e4374 100644
--- a/hw/mcu/nordic/nrf5340/syscfg.yml
+++ b/hw/mcu/nordic/nrf5340/syscfg.yml
@@ -50,8 +50,6 @@ syscfg.defs:
         description: >
             Selected source for low frequency clock (LFCLK).
         value:
-        restrictions:
-            - $notnull
         choices:
             - LFRC      # 32.768 kHz RC oscillator
             - LFXO      # 32.768 kHz crystal oscillator
diff --git a/hw/mcu/nordic/nrf5340_net/syscfg.yml b/hw/mcu/nordic/nrf5340_net/syscfg.yml
index 42d8c4ab0..f7278d759 100644
--- a/hw/mcu/nordic/nrf5340_net/syscfg.yml
+++ b/hw/mcu/nordic/nrf5340_net/syscfg.yml
@@ -43,7 +43,7 @@ syscfg.defs:
             Selected source for low frequency clock (LFCLK).
         value:
         restrictions:
-            - $notnull
+            - '!BLE_CONTROLLER || (MCU_LFCLK_SOURCE != "LFRC")'
         choices:
             - LFRC      # 32.768 kHz RC oscillator
             - LFXO      # 32.768 kHz crystal oscillator
@@ -160,6 +160,3 @@ syscfg.vals:
 
 syscfg.restrictions:
     - "!UART_0 || (UART_0_PIN_TX && UART_0_PIN_RX)"
-
-syscfg.restrictions.BLE_CONTROLLER:
-    - 'MCU_LFCLK_SOURCE != "LFRC"'
diff --git a/hw/mcu/nordic/nrf91xx/syscfg.yml b/hw/mcu/nordic/nrf91xx/syscfg.yml
index e50a65b29..be8588142 100644
--- a/hw/mcu/nordic/nrf91xx/syscfg.yml
+++ b/hw/mcu/nordic/nrf91xx/syscfg.yml
@@ -43,8 +43,6 @@ syscfg.defs:
         description: >
             Selected source for low frequency clock (LFCLK).
         value:
-        restrictions:
-            - $notnull
         choices:
             - LFRC      # 32.768 kHz RC oscillator
             - LFXO      # 32.768 kHz crystal oscillator