nrf5340 ncs2.7.0->2.8.0 board upgrade

Help me Obi-wan Kenobi!

I'm loosing my sanity trying to upgrade my project to ncs 2.8.0 from 2.7.0.
I need to update to include some fixes from zephyr main (smf lib), and the 2.8.0 seems to include them.
The board definitions seem to have changed (again).

I implemented the following changes that 1) move DCDC configuration from Kconfig to DT and 2) update the hci_ipc (to some new API?) only for the app core.

diff --git a/boards/arm/tracker/Kconfig b/boards/arm/tracker/Kconfig
index 1897609..88637ab 100644
--- a/boards/arm/tracker/Kconfig
+++ b/boards/arm/tracker/Kconfig
@@ -5,21 +5,6 @@

 if BOARD_TRACKER_NRF5340_CPUAPP || BOARD_TRACKER_NRF5340_CPUAPP_NS

-config BOARD_ENABLE_DCDC_APP
-       bool "Application MCU DCDC converter"
-       select SOC_DCDC_NRF53X_APP
-       default y
-
-config BOARD_ENABLE_DCDC_NET
-       bool "Network MCU DCDC converter"
-       select SOC_DCDC_NRF53X_NET
-       default y
-
-config BOARD_ENABLE_DCDC_HV
-       bool "High Voltage DCDC converter"
-       select SOC_DCDC_NRF53X_HV
-       default y
-
 config BOARD_ENABLE_CPUNET
        bool "NRF53 Network MCU"
        select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
diff --git a/boards/arm/tracker/Kconfig.defconfig b/boards/arm/tracker/Kconfig.defconfig
index eb5466b..6c2fc2c 100644
--- a/boards/arm/tracker/Kconfig.defconfig
+++ b/boards/arm/tracker/Kconfig.defconfig
@@ -53,16 +53,8 @@ config FLASH_LOAD_SIZE

 endif # BOARD_TRACKER_NRF5340_CPUAPP_NS

-endif # BOARD_TRACKER_NRF5340_CPUAPP || BOARD_TRACKER_NRF5340_CPUAPP_NS
-
-config MBOX_NRFX_IPC
-       default MBOX
-
-if BOARD_TRACKER_NRF5340_CPUAPP || BOARD_TRACKER_NRF5340_CPUAPP_NS
-
-choice BT_HCI_BUS_TYPE
-       default BT_HCI_IPC if BT
-endchoice
+config BT_HCI_IPC
+       default y if BT

 config HEAP_MEM_POOL_ADD_SIZE_BOARD
        int
diff --git a/boards/arm/tracker/nrf5340_cpuapp_common.dtsi b/boards/arm/tracker/nrf5340_cpuapp_common.dtsi
index 0ea7c42..a5611d2 100644
--- a/boards/arm/tracker/nrf5340_cpuapp_common.dtsi
+++ b/boards/arm/tracker/nrf5340_cpuapp_common.dtsi
@@ -14,7 +14,7 @@
                zephyr,uart-mcumgr = &vcom;
                zephyr,bt-mon-uart = &uart0;
                zephyr,bt-c2h-uart = &uart0;
-               zephyr,bt-hci-ipc = &ipc0;
+               zephyr,bt-hci = &bt_hci_ipc0;
                nordic,802154-spinel-ipc = &ipc0;
                zephyr,ieee802154 = &ieee802154;
        };
@@ -176,6 +176,18 @@ zephyr_udc0: &usbd {
        gpio-as-nreset;
 };

+&vregmain {
+       regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
+};
+
+&vregradio {
+       regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
+};
+
+&vregh {
+       status = "okay";
+};
+
 / {

With these changes, my applications stalls when I call bt_enable(NULL); If I don't update the ipc node in the DT, the application does not stall, but I get an error claiming that the hci driver is not registered.

I also get this warning from the build system warning: Deprecated symbol BOARD_ENABLE_CPUNET is enabled. This could be a hint that the net CPU is not released. However, I would still expect a timeout at a point in my application, and this is not happening. Furthermore, this symbol seems to select anyway the correct "new" SOC_NRF53_CPUNET_ENABLE.
I did not find specific information in the migration guide about this.

Any help is appreciated! 

  • Hello,

    The only relevant changes between v2.7 and v2.8 that I can find you appear to have applied already. I.e., changing the board file so that BT_HCI_IPC becomes enabled when CONFIG_BT is selected, setting the zephyr,bt-hci property, and moving the regulator configuration to the device tree. I also see that BOARD_ENABLE_CPUNET symbol is being used by the nRF7002DK, so it should still work.

    diff --git a/boards/nordic/nrf5340dk/Kconfig b/boards/nordic/nrf5340dk/Kconfig
    index 7513fab4277..ee53c973ae8 100644
    --- a/boards/nordic/nrf5340dk/Kconfig
    +++ b/boards/nordic/nrf5340dk/Kconfig
    @@ -5,41 +5,9 @@
     
     if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
     
    -config BOARD_ENABLE_DCDC_APP
    -	bool "Application MCU DCDC converter"
    -	select SOC_DCDC_NRF53X_APP
    -	default y
    -
    -config BOARD_ENABLE_DCDC_NET
    -	bool "Network MCU DCDC converter"
    -	select SOC_DCDC_NRF53X_NET
    -	default y
    -
    -config BOARD_ENABLE_DCDC_HV
    -	bool "High Voltage DCDC converter"
    -	select SOC_DCDC_NRF53X_HV
    -	default y
    -
    -config BOARD_ENABLE_CPUNET
    -	bool "NRF53 Network MCU"
    -	select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
    -		$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
    -	help
    -	  This option enables releasing the Network 'force off' signal, which
    -	  as a consequence will power up the Network MCU during system boot.
    -	  Additionally, the option allocates GPIO pins that will be used by UARTE
    -	  of the Network MCU.
    -	  Note: GPIO pin allocation can only be configured by the secure Application
    -	  MCU firmware, so when this option is used with the non-secure version of
    -	  the board, the application needs to take into consideration, that the
    -	  secure firmware image must already have configured GPIO allocation for the
    -	  Network MCU.
    -	default y if (BT || NRF_802154_SER_HOST)
    -
     config DOMAIN_CPUNET_BOARD
     	string
     	default "nrf5340dk/nrf5340/cpunet"
    -	depends on BOARD_ENABLE_CPUNET
     	help
     	  The board which will be used for CPUNET domain when creating a multi
     	  image application where one or more images should be located on


    Also, if it fails to communicate with the controller on the network core, you should receive a timeout error. It shouldn’t stall forever.

    Does your board have a the optional 32K crystal? 

    Best regards,

    Vidar

Related