diff --git a/.github/test-spec.yml b/.github/test-spec.yml index 06a57dbe9944..c29b7ea2eb5c 100644 --- a/.github/test-spec.yml +++ b/.github/test-spec.yml @@ -646,3 +646,4 @@ - "include/nfc/ndef/text_rec.h" - "include/dk_buttons_and_leds.h" - "include/app_event_manager/app_event_manager.h" + - "scripts/west_commands/ncs_ironside_se_update.py" diff --git a/CODEOWNERS b/CODEOWNERS index 6df3797d9bc8..84668de3673e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -504,6 +504,7 @@ /samples/debug/ppi_trace/ @nordic-krch /samples/dect/dect_phy/dect_shell/ @nrfconnect/ncs-modem-tre /samples/dect/dect_phy/hello_dect/ @nrfconnect/ncs-modem +/samples/dfu/ab/ @nrfconnect/ncs-charon /samples/dfu/dfu_target/ @nrfconnect/ncs-charon /samples/dfu/dfu_multi_image/ @nrfconnect/ncs-charon /samples/edge_impulse/ @nrfconnect/ncs-si-muffin @@ -629,6 +630,7 @@ /samples/debug/ppi_trace/*.rst @nrfconnect/ncs-doc-leads /samples/dect/dect_phy/dect_shell/*.rst @nrfconnect/ncs-iot-positioning-doc /samples/dect/dect_phy/hello_dect/*.rst @nrfconnect/ncs-modem-doc +/samples/dfu/ab/*.rst @nrfconnect/ncs-charon-doc /samples/dfu/dfu_target/*.rst @nrfconnect/ncs-charon-doc /samples/dfu/dfu_multi_image/*.rst @nrfconnect/ncs-charon-doc /samples/esb/**/*.rst @nrfconnect/ncs-si-muffin-doc @@ -784,6 +786,7 @@ /subsys/debug/ @nordic-krch /subsys/debug/coredump/ @nrfconnect/ncs-protocols-serialization /subsys/dfu/ @nrfconnect/ncs-pluto +/subsys/dfu/dfu_target/ @nrfconnect/ncs-pluto @nrfconnect/ncs-charon /subsys/dfu/dfu_multi_image/ @Damian-Nordic @nrfconnect/ncs-charon /subsys/dm/ @nrfconnect/ncs-si-muffin /subsys/dult/ @nrfconnect/ncs-si-bluebagel diff --git a/applications/machine_learning/VERSION b/applications/machine_learning/VERSION index a2138c07e00e..1bdaeb051258 100644 --- a/applications/machine_learning/VERSION +++ b/applications/machine_learning/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 3 -VERSION_MINOR = 0 +VERSION_MINOR = 1 PATCHLEVEL = 99 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/applications/matter_bridge/VERSION b/applications/matter_bridge/VERSION index a2138c07e00e..1bdaeb051258 100644 --- a/applications/matter_bridge/VERSION +++ b/applications/matter_bridge/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 3 -VERSION_MINOR = 0 +VERSION_MINOR = 1 PATCHLEVEL = 99 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/applications/matter_bridge/doc/matter_bridge_description.rst b/applications/matter_bridge/doc/matter_bridge_description.rst index 9f7a23559d76..64a6b233b5f9 100644 --- a/applications/matter_bridge/doc/matter_bridge_description.rst +++ b/applications/matter_bridge/doc/matter_bridge_description.rst @@ -382,23 +382,15 @@ Configuration options Check and configure the following configuration options: -.. _CONFIG_BRIDGED_DEVICE_IMPLEMENTATION: +.. _CONFIG_BRIDGED_DEVICE_SIMULATED: -CONFIG_BRIDGED_DEVICE_IMPLEMENTATION - ``bool`` - Select bridged device implementation. - See the :ref:`matter_bridge_app_bridged_support_configs` section for more information. - Accepts the following values: +CONFIG_BRIDGED_DEVICE_SIMULATED + ``bool`` - Implement a simulated bridged device. - .. _CONFIG_BRIDGED_DEVICE_SIMULATED: +.. _CONFIG_BRIDGED_DEVICE_BT: - CONFIG_BRIDGED_DEVICE_SIMULATED - ``bool`` - Implement a simulated bridged device. - You must also configure :ref:`CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION ` - - .. _CONFIG_BRIDGED_DEVICE_BT: - - CONFIG_BRIDGED_DEVICE_BT - ``bool`` - Implement a Bluetooth LE bridged device. +CONFIG_BRIDGED_DEVICE_BT + ``bool`` - Implement a Bluetooth LE bridged device. .. _CONFIG_BRIDGE_HUMIDITY_SENSOR_BRIDGED_DEVICE: @@ -410,21 +402,15 @@ CONFIG_BRIDGE_HUMIDITY_SENSOR_BRIDGED_DEVICE CONFIG_BRIDGE_ONOFF_LIGHT_BRIDGED_DEVICE ``bool`` - Enable support for OnOff Light bridged device. -.. _CONFIG_BRIDGE_SWITCH_BRIDGED_DEVICE: - -CONFIG_BRIDGE_SWITCH_BRIDGED_DEVICE - ``bool`` - Enable support for a switch bridged device. - Accepts the following values: +.. _CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE: - .. _CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE: +CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE + ``bool`` - Enable support for Generic Switch bridged device. - CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE - ``bool`` - Enable support for Generic Switch bridged device. +.. _CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE: - .. _CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE: - - CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE - ``bool`` - Enable support for OnOff Light Switch bridged device. +CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE + ``bool`` - Enable support for OnOff Light Switch bridged device. .. _CONFIG_BRIDGE_TEMPERATURE_SENSOR_BRIDGED_DEVICE: @@ -443,23 +429,17 @@ CONFIG_BRIDGE_MIGRATE_VERSION_1 If you selected the simulated device implementation using the :ref:`CONFIG_BRIDGED_DEVICE_SIMULATED ` Kconfig option, also check and configure the following option: -.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION: - -CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION - ``bool`` - Select the simulated OnOff device implementation. - Accepts the following values: +.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC: - .. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC: +CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC + ``bool`` - Automatically simulated OnOff device. + The simulated device automatically changes its state periodically. - CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC - ``bool`` - Automatically simulated OnOff device. - The simulated device automatically changes its state periodically. +.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL: - .. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL: - - CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL - ``bool`` - Shell-controlled simulated OnOff device. - The state of the simulated device is changed using shell commands. +CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL + ``bool`` - Shell-controlled simulated OnOff device. + The state of the simulated device is changed using shell commands. If you selected the Bluetooth LE device implementation using the :ref:`CONFIG_BRIDGED_DEVICE_BT ` Kconfig option, also check and configure the following options: @@ -490,6 +470,41 @@ CONFIG_BRIDGE_BT_RECOVERY_SCAN_TIMEOUT_MS CONFIG_BRIDGE_BT_SCAN_TIMEOUT_MS ``int`` - Set the Bluetooth LE scan timeout in milliseconds. +.. _CONFIG_BRIDGE_FORCE_BT_CONNECTION_PARAMS: + +CONFIG_BRIDGE_FORCE_BT_CONNECTION_PARAMS + ``bool`` - Determines whether the Matter bridge forces connection parameters or accepts the Bluetooth LE peripheral device selection. + +.. _CONFIG_BRIDGE_BT_SCAN_WINDOW: + +CONFIG_BRIDGE_BT_SCAN_WINDOW + ``int`` - Duration of a central actively scanning for devices within scan interval, equal to ``CONFIG_BRIDGE_BT_SCAN_WINDOW`` * 0.625 ms. + +.. _CONFIG_BRIDGE_BT_SCAN_INTERVAL: + +CONFIG_BRIDGE_BT_SCAN_INTERVAL + ``int`` - Time between consecutive Bluetooth scan windows, equal to ``CONFIG_BRIDGE_BT_SCAN_INTERVAL`` * 0.625 ms. + +.. _CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MIN: + +CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MIN + ``int`` - The minimum duration of time requested by central after the peripheral device should wake up to communicate, equal to ``CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MIN`` * 1.25 ms. + +.. _CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MAX: + +CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MAX + ``int`` - The maximum duration of time requested by central after the peripheral device should wake up to communicate, equal to ``CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MAX`` * 1.25 ms. + +.. _CONFIG_BRIDGE_BT_CONNECTION_TIMEOUT: + +CONFIG_BRIDGE_BT_CONNECTION_TIMEOUT + ``int`` - The time since the last packet was successfully received until the devices consider the connection lost, equal to ``CONFIG_BRIDGE_BT_CONNECTION_TIMEOUT`` cs. + +.. _CONFIG_BRIDGE_BT_CONNECTION_LATENCY: + +CONFIG_BRIDGE_BT_CONNECTION_LATENCY + ``int`` - The number of connection events the peripheral can skip waking up for if it does not have any data to send. + The following options affect how many bridged devices the application supports. See the :ref:`matter_bridge_app_bridged_support_configs` section for more information. @@ -593,12 +608,12 @@ You can disable configuring the parameters by setting the :kconfig:option:`CONFI Use the following Kconfig options to set the desired parameters: -- :kconfig:option:`CONFIG_BRIDGE_BT_SCAN_WINDOW` - The duration a central actively scans for devices within the scan interval. -- :kconfig:option:`CONFIG_BRIDGE_BT_SCAN_INTERVAL` - Time between consecutive Bluetooth LE scan windows. -- :kconfig:option:`CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MIN` - The minimum time requested by the central (the bridge) after which the peripheral device should wake up to communicate. -- :kconfig:option:`CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MAX` - The maximum time requested by the central (the bridge) after which the peripheral device should wake up to communicate. -- :kconfig:option:`CONFIG_BRIDGE_BT_CONNECTION_TIMEOUT` - The time since the last packet was successfully received until the devices consider the connection lost. -- :kconfig:option:`CONFIG_BRIDGE_BT_CONNECTION_LATENCY` - Allows the peripheral to skip waking up for a certain number of connection events if it does not have any data to send. +- :ref:`CONFIG_BRIDGE_BT_SCAN_WINDOW` - The duration a central actively scans for devices within the scan interval. +- :ref:`CONFIG_BRIDGE_BT_SCAN_INTERVAL` - Time between consecutive Bluetooth LE scan windows. +- :ref:`CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MIN` - The minimum time requested by the central (the bridge) after which the peripheral device should wake up to communicate. +- :ref:`CONFIG_BRIDGE_BT_CONNECTION_INTERVAL_MAX` - The maximum time requested by the central (the bridge) after which the peripheral device should wake up to communicate. +- :ref:`CONFIG_BRIDGE_BT_CONNECTION_TIMEOUT` - The time since the last packet was successfully received until the devices consider the connection lost. +- :ref:`CONFIG_BRIDGE_BT_CONNECTION_LATENCY` - Allows the peripheral to skip waking up for a certain number of connection events if it does not have any data to send. The parameters in this application have been selected based on the :ref:`multiprotocol_bt_thread` information in the :ref:`ug_multiprotocol_support` section. diff --git a/applications/matter_bridge/sysbuild/mcuboot/prj.conf b/applications/matter_bridge/sysbuild/mcuboot/prj.conf index 17ead3e702b5..0324b23239f0 100644 --- a/applications/matter_bridge/sysbuild/mcuboot/prj.conf +++ b/applications/matter_bridge/sysbuild/mcuboot/prj.conf @@ -15,10 +15,9 @@ CONFIG_FPROTECT=y CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/applications/matter_weather_station/VERSION b/applications/matter_weather_station/VERSION index a2138c07e00e..1bdaeb051258 100644 --- a/applications/matter_weather_station/VERSION +++ b/applications/matter_weather_station/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 3 -VERSION_MINOR = 0 +VERSION_MINOR = 1 PATCHLEVEL = 99 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/applications/nrf_desktop/VERSION b/applications/nrf_desktop/VERSION index a2138c07e00e..1bdaeb051258 100644 --- a/applications/nrf_desktop/VERSION +++ b/applications/nrf_desktop/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 3 -VERSION_MINOR = 0 +VERSION_MINOR = 1 PATCHLEVEL = 99 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/applications/nrf_desktop/application_kconfig.rst b/applications/nrf_desktop/application_kconfig.rst index 87cc8e1532c2..9089ba6368fb 100644 --- a/applications/nrf_desktop/application_kconfig.rst +++ b/applications/nrf_desktop/application_kconfig.rst @@ -52,6 +52,11 @@ You can enable the following HID reports: * HID system control report (:ref:`CONFIG_DESKTOP_HID_REPORT_SYSTEM_CTRL_SUPPORT `) * HID consumer control report (:ref:`CONFIG_DESKTOP_HID_REPORT_CONSUMER_CTRL_SUPPORT `) +.. note:: + nRF Desktop application allows you to modify the used HID input reports or introduce support for a new HID input report. + This can be achieved by implementing a custom HID report provider that can be used together with the :ref:`nrf_desktop_hid_state`. + For details, see the :ref:`nrf_desktop_hid_state_providing_hid_input_reports` documentation section. + Apart from this, you can specify the supported HID boot protocol interface as one of the following: * mouse (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE `) diff --git a/applications/nrf_desktop/doc/hid_provider_keyboard.rst b/applications/nrf_desktop/doc/hid_provider_keyboard.rst index d9a2bcbff894..3bdaaacf1f30 100644 --- a/applications/nrf_desktop/doc/hid_provider_keyboard.rst +++ b/applications/nrf_desktop/doc/hid_provider_keyboard.rst @@ -7,11 +7,15 @@ HID provider keyboard module :local: :depth: 2 -The HID provider keyboard module is responsible for providing keyboard HID reports. -The module listens to the :c:struct:`button_event` event and communicates with the :ref:`nrf_desktop_hid_state`. -It provides new keyboard HID reports when requested by the :ref:`nrf_desktop_hid_state`. +The HID provider keyboard module is a HID report provider integrated with :ref:`nrf_desktop_hid_state`. +The module is responsible for providing the HID keyboard input report and the HID boot keyboard input report. + +The module listens to the user input (:c:struct:`button_event`) and communicates with the :ref:`nrf_desktop_hid_state`. +It provides HID keyboard reports when requested by the :ref:`nrf_desktop_hid_state`. It also notifies the :ref:`nrf_desktop_hid_state` when new data is available. +For details related to the HID report providers integration in the HID state module, see the :ref:`nrf_desktop_hid_state_providing_hid_input_reports` documentation section. + Module events ************* @@ -25,102 +29,95 @@ Module events Configuration ************* -You can enable the module using the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD ` Kconfig option. -This option is enabled by default if the device supports HID keyboard reports. -You can substitute the module with a custom HID keyboard report provider implementation. +You can enable the default implementation of the HID provider using the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD ` Kconfig option. +This option is enabled by default if the device uses HID provider events (:ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_EVENT `) and supports HID keyboard reports (:ref:`CONFIG_DESKTOP_HID_REPORT_KEYBOARD_SUPPORT `). +The module also provides HID boot keyboard input report if it is supported (:ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD `). + +Alternatively, you can substitute the module with a custom HID keyboard report provider implementation. Enable the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD_ALT ` Kconfig option to use a custom HID keyboard report provider. +The option disables the default HID keyboard report provider. Make sure to introduce the custom HID keyboard report provider if you enable this option. +See the :ref:`nrf_desktop_hid_state_providing_hid_input_reports` documentation section of the HID state module for details. + +Default implementation +====================== + +The module relies on keypresses (:c:struct:`button_event`) as the only source of user input. +The module needs to perform the following tasks: + +* Identify keypresses related to the handled HID input reports. +* Queue a sequence of the user's key presses and releases that happens before connecting to a HID host. + The reason for this operation is to allow tracking key presses that happen right after the device is woken up but before it can connect to the HID host. + The sequence of keypresses is replayed once a connection with a HID host is established. +* Maintain the state of pressed keys. + You need this to report the current state of pressed keys while a connection with the HID host is maintained. + +The module uses a set of application-specific utilities for that purpose. +See the following sections for the configuration details of the used application-specific utilities. HID keymap -========== +---------- -The module uses the :ref:`nrf_desktop_hid_keymap` to map an application-specific key ID to a HID report ID and HID usage ID pair. +Since keys on the board can be associated with a HID usage ID and thus be part of different HID reports, the first step is to identify if the key belongs to a HID report that is provided by this module. +This is done by obtaining the key mapping from the :ref:`nrf_desktop_hid_keymap`. The module selects the :ref:`CONFIG_DESKTOP_HID_KEYMAP ` Kconfig option to enable the utility. Make sure to configure the HID keymap utility. See the utility's documentation for details. -Queuing keypresses -================== +HID eventq +---------- -The module selects the :ref:`CONFIG_DESKTOP_HID_EVENTQ ` Kconfig option to enable the :ref:`nrf_desktop_hid_eventq`. -The utility is used to temporarily queue key state changes (presses and releases) before the connection with the HID host is established. -When a key state changes (it is pressed or released) before the connection is established, an element containing this key's usage ID is pushed onto the queue. +The :ref:`nrf_desktop_hid_eventq` is used to temporarily enqueue key state changes before connection with the HID host is established. +When a key is pressed or released before the connection is established, an element containing this key's usage ID is pushed onto the queue. +The sequence of keypresses is replayed once the connection with a HID host is established. +This ensures that all of the keypresses are replayed in order. +The module selects the :ref:`CONFIG_DESKTOP_HID_EVENTQ ` Kconfig option to enable the utility. Queue size ----------- +~~~~~~~~~~ With the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD_EVENT_QUEUE_SIZE ` Kconfig option, you can set the number of elements on the queue where the keys are stored before the connection is established. For backwards compatibility, you can set the default value for this option using the deprecated :ref:`CONFIG_DESKTOP_HID_EVENT_QUEUE_SIZE ` Kconfig option. If there is no space in the queue to enqueue a new key state change, the oldest element is released. Report expiration ------------------ +~~~~~~~~~~~~~~~~~ With the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD_KEYPRESS_EXPIRATION ` Kconfig option, you can set the amount of time after which a queued key will be considered expired. For backwards compatibility, you can set the default value for this option using the deprecated :ref:`CONFIG_DESKTOP_HID_REPORT_EXPIRATION ` Kconfig option. The higher the value, the longer the period from which the nRF Desktop application will recall pressed keys when the connection with HID host is established. -Handling keys state -=================== +Keys state +---------- -The module selects the :ref:`CONFIG_DESKTOP_KEYS_STATE ` Kconfig option to enable the :ref:`nrf_desktop_keys_state`. -The utility is used to track the state of active keys after the connection with the HID host is established. +The :ref:`nrf_desktop_keys_state` is used to track the state of active keys after the connection with the HID host is established. +The module selects the :ref:`CONFIG_DESKTOP_KEYS_STATE ` Kconfig option to enable the utility. Implementation details ********************** -On initialization, the module announces its presence by sending the :c:struct:`hid_report_provider_event` event with an appropriate report ID and implementation of callbacks from HID report provider API (:c:struct:`hid_report_provider_api`). -Separate :c:struct:`hid_report_provider_event` events are sent for each report ID. -The module supports keyboard reports from the report and boot protocols. -You can enable the boot protocol support using the :ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD ` Kconfig option. -The :ref:`nrf_desktop_hid_state` receives the events and fills them with its own implementation of callbacks from the HID state API (:c:struct:`hid_state_api`). -After that process, the modules can communicate by callbacks. -The module also subscribes to the :c:struct:`button_event` event to get information about the button presses. -The module sends :c:struct:`hid_report_event` events to an appropriate subscriber when it is requested by the :ref:`nrf_desktop_hid_state`. - -.. note:: - The HID report formatting function must work according to the HID report descriptor (``hid_report_desc``). - The source file containing the descriptor is provided by the :ref:`CONFIG_DESKTOP_HID_REPORT_DESC ` Kconfig option. - -Linking input data with the right HID report -============================================ - -Out of all available input data types, the module collects button events. -The button events are stored in the :c:struct:`report_data` structure. -The ``button_event`` is the source of this type of data. - -To indicate a change to this input data, the module overwrites the value that is already stored. - -Since keys on the board can be associated with a HID usage ID and thus be part of different HID reports, the first step is to identify if the key belongs to a HID report that is provided by this module. -This is done by obtaining the key mapping from the :ref:`nrf_desktop_hid_keymap`. - -Once the mapping is obtained, the application checks if the report to which the usage belongs is connected: - -* If the report is connected and the :ref:`nrf_desktop_hid_eventq` instance is empty, the module stores the report and calls the ``trigger_report_send`` callback from the :c:struct:`hid_state_api` to notify the :ref:`nrf_desktop_hid_state` about the new data. -* If the report is not connected or the :ref:`nrf_desktop_hid_eventq` instance is not empty, the value is enqueued in the :ref:`nrf_desktop_hid_eventq` instance. +The module is used by :ref:`nrf_desktop_hid_state` as a HID input report provider for the HID keyboard input report and HID boot keyboard input report. +The module registers two separate HID report providers to handle both input reports. +On initialization, the module submits the :c:struct:`hid_report_provider_event` events to establish two-way callbacks between the |hid_state| and the HID report providers. -The difference between these operations is that storing a value onto the queue (second case) preserves the order of input events. -See the following section for more information about storing data before the connection. - -Storing input data before the connection -======================================== - -The button data is stored before the connection. - -The reason for this operation is to allow to track key presses that happen right after the device is woken up, but before it can connect to the HID host. - -When the device is disconnected and the input event with the button data is received, the data is stored onto the :ref:`nrf_desktop_hid_eventq` instance, a member of the :c:struct:`report_data` structure. -This queue preserves an order in which input data events are received. +Handling keypresses +=================== -Storing limitations -------------------- +After an application-specific key ID (:c:member:`button_event.key_id`) is mapped to the HID keyboard input report ID and related HID usage ID, the HID usage ID is handled by the provider. +Before a connection with the HID host is established, the provider enqueues the HID usage ID and keypress state (press or release) in the HID event queue. +Once the connection is established, the elements of the queue are replayed one after the other to the host, in a sequence of consecutive HID reports. +On the HID state request, the module pulls an element from the queue, updates the tracked state of pressed keys, and submits a :c:struct:`hid_report_event` to provide the HID input report to the HID subscriber. +The subsequent requests lead to providing subsequent keypresses as HID report events. +All key state changes still go through the HID event queue until the queue is empty. -You can limit the number of events that can be inserted into the queue using the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD_EVENT_QUEUE_SIZE ` Kconfig option. +Once the queue is empty, a key state change results in an instant update of the tracked state of pressed keys. +If the state of pressed keys changes, the module calls the ``trigger_report_send`` callback from the :c:struct:`hid_state_api` to notify the :ref:`nrf_desktop_hid_state` about the new data. +The module also remembers that the HID subscriber needs to be updated. -Discarding events ------------------- +Discarding queued events +------------------------ -When there is no space for a new input event, the module tries to free space by discarding the oldest event in the queue. +While key state changes go through the event queue and there is no space for a new input event, the module tries to free space by discarding the oldest event in the queue. Events stored in the queue are automatically discarded after the period defined by the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_KEYBOARD_KEYPRESS_EXPIRATION ` option. When discarding an event from the queue, the module checks if the key associated with the event is pressed. @@ -136,5 +133,3 @@ The discarding mechanism ensures that the host will always receive the correct k * Every key that was pressed after the associated key had been pressed is also released. If there is no space to store the input event in the queue and no old event can be discarded, the entire content of the queue is dropped to ensure the sanity. - -Once the connection is established, the elements of the queue are replayed one after the other to the host, in a sequence of consecutive HID reports. diff --git a/applications/nrf_desktop/doc/hid_state.rst b/applications/nrf_desktop/doc/hid_state.rst index 471b41bdf23b..d29648fbea92 100644 --- a/applications/nrf_desktop/doc/hid_state.rst +++ b/applications/nrf_desktop/doc/hid_state.rst @@ -7,13 +7,18 @@ HID state module :local: :depth: 2 -The |hid_state| is required for communicating with the HID report providers to generate reports from input data. +The |hid_state| is the center of an application acting as a HID peripheral. It is responsible for the following operations: -* Tracking state of the HID report subscriptions. -* Notifying the HID report providers to form the HID reports in either report or boot protocol. -* Notifying the HID report providers about state changes of the HID report subscriber connection. -* Sending :c:struct:`led_event` based on the HID keyboard LED output reports. +* Tracking the state of HID subscribers and HID input report subscriptions. + The module can simultaneously handle HID input report subscriptions of multiple HID subscribers. + The module provides HID input reports only to one subscriber (*active subscriber*). +* Providing HID input reports to the active HID subscriber. + The module relies on HID report providers to aggregate the user input, form HID input reports, and submit a :c:struct:`hid_report_event`. + The HID input reports can be formatted according to either HID report protocol or HID boot protocol. +* Handling HID output reports. + The module handles only the HID keyboard LED output report. + The module sends a :c:struct:`led_event` to update state of the keyboard LEDs. Module events ************* @@ -29,20 +34,24 @@ Configuration ************* To enable the |hid_state|, use the :ref:`CONFIG_DESKTOP_HID_STATE_ENABLE ` Kconfig option that is implied by the :ref:`CONFIG_DESKTOP_ROLE_HID_PERIPHERAL ` option. -An nRF Desktop peripheral uses the |hid_state| and HID report providers to generate HID reports based on the user input. +Make sure to configure the peripheral type and the set of supported HID input reports and HID boot interface. For details related to HID configuration in the nRF Desktop, see the :ref:`nrf_desktop_hid_configuration` documentation. -To send boot reports, enable the respective Kconfig option: +Number of supported HID subscribers +=================================== -* :ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD ` - This option enables sending keyboard boot reports. -* :ref:`CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE ` - This option enables sending mouse boot reports. +If your application configuration supports more than one HID subscriber, you must align the maximum number of HID subscribers that can be handled simultaneously (:ref:`CONFIG_DESKTOP_HID_STATE_SUBSCRIBER_COUNT `). +For example, to use a configuration that allows to simultaneously subscribe to HID reports from HID over GATT (Bluetooth LE) and a single USB HID instance, set the value of this Kconfig option to ``2``. -Number of supported HID data subscribers -======================================== +If multiple HID subscribers are simultaneously connected, the |hid_state| selects the one with the highest priority as the active subscriber. +The |hid_state| provides HID input reports only to the active subscriber. +The |hid_state| displays the HID keyboard LED state associated with the active subscriber. -If your application configuration supports more than one HID data subscriber, you must align the maximum number of HID data subscribers that can be supported simultaneously (:ref:`CONFIG_DESKTOP_HID_STATE_SUBSCRIBER_COUNT `). -For example, to use a configuration that allows to simultaneously subscribe for HID reports from HID over GATT (BLE) and a single USB HID instance, set the value of this Kconfig option to ``2``. -See the `Tracking state of transports`_ section for more details about HID subscribers. +By default, the subscriber that is associated with USB has priority over a subscriber associated with Bluetooth LE. +As a result, if a HID host connects through the USB while another HID host is connected over the Bluetooth LE, the HID reports will be routed to the USB. + +.. note:: + The subscriber priority must be unique, which means that two or more subscribers cannot share the same priority value. HID keyboard LEDs ================= @@ -82,65 +91,127 @@ You must define all of the mentioned data in this configuration file, and specif HID report providers ==================== -The module selects the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_EVENT ` Kconfig option to enable :c:struct:`hid_report_provider_event` event support. -The events are used to establish two-way callbacks between the |hid_state| and the HID report providers. -The |hid_state| can request the HID report providers to generate HID reports and notify the providers about the connection state changes and report sent occurrences. -The HID report providers are responsible for generating HID reports when requested by the |hid_state|. -The HID report providers can also notify the |hid_state| when new data is available. +The |hid_state| relies on the HID report providers to collect user input, form HID input reports, and submit a :c:struct:`hid_report_event`. +The module selects the :ref:`CONFIG_DESKTOP_HID_REPORT_PROVIDER_EVENT ` Kconfig option to enable the HID report provider event and default HID report providers for all HID input reports enabled in the configuration. +The HID providers for mouse and keyboard input reports also handle the respective HID boot input reports if the boot report support is enabled in the configuration. + +.. note:: + You can provide an alternative implementation of a HID report provider to generate a HID report in a custom way. + You can also add a new HID report provider to introduce support for another HID input report. + See the :ref:`nrf_desktop_hid_state_providing_hid_input_reports` section for implementation details related to HID report providers integration. Implementation details ********************** -The |hid_state| in association with the HID report providers provides a routing mechanism between sources of input data and transport modules. -This can be associated with: +This section describes implementation details related to responsibilities of the |hid_state|. -* Receiving input events from :ref:`caf_buttons`, :ref:`nrf_desktop_wheel`, and :ref:`nrf_desktop_motion`. -* Sending out HID reports to HID transports, for example, :ref:`nrf_desktop_hids` and :ref:`nrf_desktop_usb_state`. +Tracking state of HID subscribers +================================= -Apart from the routing mechanism, the module is also responsible for `Handling HID keyboard LED state`_. +A HID transport (for example :ref:`nrf_desktop_hids` or :ref:`nrf_desktop_usb_state`) is a module that forwards HID reports to a HID host and forwards HID subscriptions of the HID host. +A HID transport reports the state of a HID subscriber using the :c:struct:`hid_report_subscriber_event`. +When the connection to the HID host is indicated by this event, the |hid_state| will create an associated subscriber. +The |hid_state| tracks the state of the HID subscribers. -Tracking state of transports -============================ +As part of the :c:struct:`hid_report_subscriber_event`, the subscriber provides the following parameters: -The |hid_state| tracks the state of modules that forward the HID data to a HID host (HID transports) by listening to :c:struct:`hid_report_subscriber_event`. -The |hid_state| refers collectively to all transports as *subscribers*. -When the connection to the host is indicated by this event, the |hid_state| will create a subscriber associated with the transport. -Each subscriber reports its priority as part of the :c:struct:`hid_report_subscriber_event`. -The subscriber priority must be unique, that mean two or more subscribers cannot share the same priority value. +* Subscriber priority - The |hid_state| provides HID input reports only to the subscriber with the highest priority (active subscriber). +* Pipeline size - The |hid_state| forwards this information to the HID report providers. + The information can be used, for example, to synchronize sensor sampling with sending the HID input reports to the HID host. + See the :ref:`nrf_desktop_hid_mouse_report_handling` section for information how the pipeline size is used for HID mouse reports. +* Maximum number of processed HID input reports - The |hid_state| limits the number of HID input reports processed by a HID subscriber at a time by delaying providing the subsequent HID input report until the previous report is sent to a HID host. -By default, the subscriber that is associated with USB has priority over any Bluetooth LE peer subscriber. -As a result, when the host connected through the USB subscribes for a HID report, the HID report will be routed to the USB. +Tracking state of HID report subscriptions +------------------------------------------ -Tracking state of HID report notifications -========================================== +For each subscriber, the |hid_state| tracks the state of HID input report subscriptions. +The HID input reports are only provided after the active subscriber enables the subscription. +The subscriber updates its HID report subscriptions using a :c:struct:`hid_report_subscription_event`. -For each subscriber, the |hid_state| tracks the state of notifications for each of the available HID reports. -These are tracked in the subscriber's structure :c:struct:`subscriber`. +The HID report subscriptions are tracked in the subscriber's structure :c:struct:`subscriber`. This structure's member ``state`` is an array of :c:struct:`report_state` structures. -Each element corresponds to one available HID report. - -The subscriber connects to the HID reports by submitting :c:struct:`hid_report_subscription_event`. -Depending on the connection method, this event can be submitted: - -* For Bluetooth, when the notification is enabled for a given HID report. -* For USB, when the device is connected to USB. +Each element corresponds to one HID input report. The :c:struct:`report_state` structure serves the following purposes: -* Tracks the state of the connection. +* Tracks the state of the report subscription. * Contains the link connecting the object to the right :c:struct:`provider` structure which contains the HID report provider info such as report ID and API (:c:struct:`hid_report_provider_api`). -* Tracks the number of reports of the associated type that were sent to the subscriber. +* Tracks the number of reports with a given ID in flight. + +.. _nrf_desktop_hid_state_providing_hid_input_reports: + +Providing HID input reports +=========================== + +The |hid_state| relies on the HID providers to collect user input, form HID input reports, and submit a :c:struct:`hid_report_event`. +Every HID input report ID is handled by a dedicated HID report provider API (:c:struct:`hid_report_provider_api`). + +HID report provider event +------------------------- + +The :c:struct:`hid_report_provider_event` is used to establish two-way callbacks between the |hid_state| and the HID report providers. +The event allows to exchange the API structures between the |hid_state| and HID report providers (:c:struct:`hid_report_provider_api` and :c:struct:`hid_state_api`). +The API structures allow for direct function calls between the modules. + +The |hid_state| requests the HID report providers to generate HID reports and notifies the providers about the connection state changes and report sent occurrences. +The HID report providers can notify the |hid_state| when new data is available (on user input) to trigger generating a HID input report. + +On a |hid_state|'s request, a HID report provider submits a :c:struct:`hid_report_event` to provide a HID input report to the active HID subscriber. +The :c:struct:`hid_report_sent_event` is submitted by the HID transport related to the subscriber to confirm that the HID report was sent to the HID host. +The |hid_state| relies on this event to track the number of HID reports in flight and notify the providers. + +See the :c:struct:`hid_report_provider_event` event documentation page for detailed information regarding the communication between the |hid_state| and HID report providers. + +Default HID providers +--------------------- + +The following application modules are used as default implementations of HID report providers: + +* :ref:`nrf_desktop_hid_provider_mouse` +* :ref:`nrf_desktop_hid_provider_keyboard` +* :ref:`nrf_desktop_hid_provider_system_ctrl` +* :ref:`nrf_desktop_hid_provider_consumer_ctrl` + +The respective HID report provider is automatically enabled if support for a given HID input report is enabled in the :ref:`nrf_desktop_hid_configuration`. +See the documentation page of a HID report provider for detailed information about the provider. + +Custom HID providers +-------------------- + +You can implement your own HID report provider as part of the application. +The HID report provider can perform one of the following two actions: + +* Handle a HID input report that is already supported by the application instead of a default HID report provider (substitute the default HID report provider). + Make sure to disable the default HID report provider while implementing the custom provider. +* Support a new HID input report. + +HID report map update +~~~~~~~~~~~~~~~~~~~~~ + +If your HID report provider implementation uses a different HID input report format or you add a new HID input report, you need to align the HID report configuration (including the HID report map). +If the default HID report descriptor is used (:ref:`CONFIG_DESKTOP_USE_DEFAULT_REPORT_DESCR `), the configuration is defined by the following files: + +* :file:`configuration/common/hid_report_desc.h` +* :file:`configuration/common/hid_report_desc.c` + +.. note:: + nRF Desktop dongles share a common HID report format with the nRF Desktop peripherals. + The aligned HID report configuration is required for the dongle to forward HID input reports from the peripherals. + +HID transport update +~~~~~~~~~~~~~~~~~~~~ -Requesting HID reports -====================== +If you add a new HID input report, you might also need to update the modules that act as HID transports (for example :ref:`nrf_desktop_hids` or :ref:`nrf_desktop_usb_state`). +This is needed to fulfill the following requirements: -When a HID report is to be sent to the subscriber, the |hid_state| calls the appropriate function from the :c:struct:`hid_report_provider_api` to trigger the HID report provider to generate HID report. +* Proper configuration of the module and libraries used by the module. +* Support for the newly added HID input report. -Handling HID keyboard LED state -=============================== +HID output reports +================== -When the |hid_state| receives a :c:struct:`hid_report_event` that contains a HID output report, it updates the remembered information about the state of the HID output report of the appropriate subscriber. +When the |hid_state| receives a :c:struct:`hid_report_event` that contains a HID output report, it updates the stored information about the state of the HID output report of the appropriate subscriber. By default, nRF Desktop supports only HID keyboard LED output report. -The nRF Desktop peripheral displays the state of the keyboard LEDs that was specified by the HID subscriber that subscribed for keyboard key HID input report. -When the subscriber is changed or it updates the state of the keyboard LEDs, the |hid_state| sends :c:struct:`leds_event` to update the state of the hardware LEDs. +The nRF Desktop peripheral displays the state of the keyboard LEDs that was specified by the active HID subscriber. +When the active subscriber is changed or it updates the state of the keyboard LEDs, the |hid_state| sends :c:struct:`leds_event` to update the state of the hardware LEDs. diff --git a/boards/nordic/nrf7120pdk/nrf7120_cpuapp_common.dtsi b/boards/nordic/nrf7120pdk/nrf7120_cpuapp_common.dtsi index 8cdd2def058f..3251e0e910b1 100644 --- a/boards/nordic/nrf7120pdk/nrf7120_cpuapp_common.dtsi +++ b/boards/nordic/nrf7120pdk/nrf7120_cpuapp_common.dtsi @@ -184,6 +184,11 @@ status = "okay"; }; +&audio_auxpll { + nordic,frequency = ; + status = "okay"; +}; + &cpuapp_bellboard { status = "okay"; }; diff --git a/cmake/sysbuild/sign_nrf54h20.cmake b/cmake/sysbuild/sign_nrf54h20.cmake index 3c5bb0b439b0..1c39ebcd4582 100644 --- a/cmake/sysbuild/sign_nrf54h20.cmake +++ b/cmake/sysbuild/sign_nrf54h20.cmake @@ -127,15 +127,25 @@ function(mcuboot_sign_merged_nrf54h20 merged_hex main_image) # Fetch VID and CID values from the main image Kconfig. set(CONFIG_MCUBOOT_IMGTOOL_UUID_VID) set(CONFIG_MCUBOOT_IMGTOOL_UUID_CID) - sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_VID IMAGE ${main_image} VAR CONFIG_MCUBOOT_IMGTOOL_UUID_VID KCONFIG) - sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_CID IMAGE ${main_image} VAR CONFIG_MCUBOOT_IMGTOOL_UUID_CID KCONFIG) + set(CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME) + set(CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME) + sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_VID IMAGE ${main_image} VAR + CONFIG_MCUBOOT_IMGTOOL_UUID_VID KCONFIG) + sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_CID IMAGE ${main_image} VAR + CONFIG_MCUBOOT_IMGTOOL_UUID_CID KCONFIG) + sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME IMAGE ${main_image} VAR + CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME KCONFIG) + sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME IMAGE ${main_image} VAR + CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME KCONFIG) if(CONFIG_MCUBOOT_IMGTOOL_UUID_VID) - set(imgtool_extra ${imgtool_extra} --vid "${CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME}") + set(imgtool_args ${imgtool_args} --vid + "${CONFIG_MCUBOOT_IMGTOOL_UUID_VID_NAME}") endif() if(CONFIG_MCUBOOT_IMGTOOL_UUID_CID) - set(imgtool_extra ${imgtool_extra} --cid "${CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME}") + set(imgtool_args ${imgtool_args} --cid + "${CONFIG_MCUBOOT_IMGTOOL_UUID_CID_NAME}") endif() # Fetch version and flags from the main image Kconfig. diff --git a/doc/_zoomin/ncs.tags.yml b/doc/_zoomin/ncs.tags.yml index b83a9244c64f..a8154a08a380 100644 --- a/doc/_zoomin/ncs.tags.yml +++ b/doc/_zoomin/ncs.tags.yml @@ -12,41 +12,41 @@ mapping_topics: "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", - "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", "npm1100", + "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/gsg_guides.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", - "nrf2220", "npm1100", "npm1300", "npm2100", "npm6001", "development-kits", + "npm1100", "npm1300", "npm2100", "npm6001", "development-kits", "prototyping-platforms", "evaluation-kits", "pmic"] - nrf/installation.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", - "nrf2220", "npm1100", "npm1300", "npm2100", "npm6001"] + "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/installation/*.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", - "nrf52805", "nrf21540", "nrf2220", "npm1100", "npm1300", "npm2100", + "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", - "nrf2220", "npm1100", "npm1300", "npm2100", "npm6001"] + "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/create_application.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", - "nrf52805", "nrf21540", "nrf2220", "npm1100", "npm1300", + "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "applications", "nrf-connect-vsc"] - nrf/app_dev/board_names.html: ["nrf91-series", "nrf70-series", "nrf54-series", @@ -55,15 +55,15 @@ mapping_topics: "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", - "nrf21540", "nrf2220", "npm1100", "npm1300", "npm2100", + "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/config_and_build/*.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", - "nrf54l10", nrf5340", "thingy53", "nrf52840", "nrf52833", + "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", - "nrf52805", "nrf21540", "nrf2220", "npm1100", "npm1300", + "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/config_and_build/config_and_build_system.html: ["applications", "samples", "kconfig"] @@ -88,7 +88,7 @@ mapping_topics: "thingy91", "thingy91x", "nrf9161", "nnrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", - "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "applications", "samples", "development-kits", "evaluation-kits", "prototyping-platforms"] @@ -99,7 +99,7 @@ mapping_topics: "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", - "nrf21540", "nrf2220", "npm1100", "npm1300", "npm2100", + "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "applications", "samples", "development-kits", "evaluation-kits", "prototyping-platforms"] @@ -110,7 +110,7 @@ mapping_topics: "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", - "nrf21540", "nrf2220", "npm1100", "npm1300", "npm2100", + "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/bootloaders_dfu/mcuboot_nsib/*.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", @@ -120,7 +120,7 @@ mapping_topics: "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", - "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "applications"] - nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_config.html: ["kconfig"] @@ -135,7 +135,7 @@ mapping_topics: "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", - "nrf2220", "npm1100", "npm1300", + "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/bootloaders_dfu/mcuboot_image_compression.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", @@ -147,7 +147,7 @@ mapping_topics: "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", - "nrf21540", "nrf2220", "npm1100", + "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/bootloaders_dfu/sysbuild_image_ids.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", @@ -159,7 +159,7 @@ mapping_topics: "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", - "nrf2220", "npm1100", "npm1300", + "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/app_dev/device_guides/nrf91/index.html: ["nrf9160", "nrf9161", "thingy91", "thingy91x", "nrf9151", "nrf9131", "development-kits", @@ -233,8 +233,7 @@ mapping_topics: - nrf/app_dev/device_guides/pmic/npm1300.html: ["npm1300"] - nrf/app_dev/device_guides/pmic/npm2100.html: ["npm2100"] - nrf/app_dev/device_guides/fem/*.html: ["fem", "evaluation-kits", "development-kits"] - - nrf/app_dev/device_guides/fem/21540ek_dev_guide.html: ["nrf2220"] - - nrf/app_dev/device_guides/fem/2220ek_dev_guide.html: ["nrf21540"] + - nrf/app_dev/device_guides/fem/21540ek_dev_guide.html: ["nrf21540"] - nrf/app_dev/device_guides/wifi_coex.html: ["kconfig", "ble", "nrf70-series", "nrf7002", "nrf7001", "nrf7000", "wifi"] - nrf/app_dev/device_guides/custom/*.html: ["development-kits"] @@ -243,7 +242,7 @@ mapping_topics: "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", - "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "applications", "samples"] - nrf/test_and_optimize/*.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series", @@ -251,7 +250,7 @@ mapping_topics: "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", "nrf52820", - "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001"] - nrf/test_and_optimize/optimizing/*.html: ["applications", "protocols"] - nrf/test_and_optimize/optimizing/memory.html: ["kconfig", "ble", "blemesh", @@ -304,7 +303,7 @@ mapping_topics: "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", - "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "kconfig", "development-kits", "prototyping-platforms"] - nrf/applications/*.html: ["applications", "kconfig"] @@ -320,7 +319,7 @@ mapping_topics: "nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160", "thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf54h20", "nrf54l15", "nrf54l05", "nrf54l10", "nrf5340", "thingy53", "nrf52840", "nrf52833", "nrf52832", - "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", "nrf2220", + "nrf52820", "nrf52811", "nrf52810", "nrf52805", "nrf21540", "npm1100", "npm1300", "npm2100", "npm6001", "development-kits", "prototyping-platforms", "kconfig"] - nrf/samples/*.html: ["samples", "kconfig"] diff --git a/doc/nrf/app_dev/board_names.rst b/doc/nrf/app_dev/board_names.rst index 8bcaa3ded485..076bbf3df53b 100644 --- a/doc/nrf/app_dev/board_names.rst +++ b/doc/nrf/app_dev/board_names.rst @@ -225,5 +225,3 @@ The following shields are defined in the :file:`nrf/boards/shields` folder. +-----------------------------------------------------+------------+---------------------------------------------+------------------------------------------------------------------------------+ | nRF21540 EK | PCA63550 | :ref:`nrf21540ek ` | ``nrf21540ek`` | +-----------------------------------------------------+------------+---------------------------------------------+------------------------------------------------------------------------------+ -| nRF2220 EK | PCA63558 | :ref:`nrf2220ek ` | ``nrf2220ek`` | -+-----------------------------------------------------+------------+---------------------------------------------+------------------------------------------------------------------------------+ diff --git a/doc/nrf/app_dev/device_guides/fem/2220ek_dev_guide.rst b/doc/nrf/app_dev/device_guides/fem/2220ek_dev_guide.rst deleted file mode 100644 index 35ddad879038..000000000000 --- a/doc/nrf/app_dev/device_guides/fem/2220ek_dev_guide.rst +++ /dev/null @@ -1,102 +0,0 @@ -.. _ug_radio_fem_nrf2220ek: - -Developing with the nRF2220 EK -############################## - -.. contents:: - :local: - :depth: 2 - -The nRF2220 :term:`Evaluation Kit (EK)` is an RF :term:`Front-End Module (FEM)` for Bluetooth® Low Energy, Bluetooth Mesh, 2.4 GHz proprietary, Thread, and Zigbee range extension. -When combined with an nRF52, nRF53 or nRF54L Series SoC, the nRF2220 RF FEM's output power is up to +14 dBm with ability to transmit with lower output powers through built-in bypass circuit. - -.. _ug_radio_fem_nrf2220ek_dk_preparation: - -Preparation of a development kit to work with the nRF2220EK -*********************************************************** - -On Arduino-compatible development kits like the :zephyr:board:`nrf52840dk` or :zephyr:board:`nrf5340dk`, plug the *Nordic Interposer Board A* (PCA64172) into the development kit. -Plug nRF2220 EK board into ``SLOT 2`` of the *Nordic Interposer Board A*. - -On the :zephyr:board:`nrf54l15dk` development kit, plug the nRF2220 EK board into the ``PORT P0`` expansion slot. - -.. caution:: - - On the :zephyr:board:`nrf54l15dk` development kit pins **P0.00** ... **P0.03** of the nRF54L15 SoC are connected to the debugger chip and by default connect ``UART0`` of the debugger chip to the nRF54L15 SoC. - Disable the UART0 function (VCOM0) of the debugger chip to allow the pins to be used as FEM control signals and FEM I2C interface. - You can use the `Board Configurator app`_ , which is part of the `nRF Connect for Desktop`_, for this purpose. - The pin **P0.04** of the nRF54L15 SoC is connected also to **Button 3** of the development kit. - Do not press this button while the firmware containing the code supporting the nRF2220 EK shield is running. - -On the :zephyr:board:`nrf54lm20dk` development kit, plug the nRF2220 EK board into the ``PORT0`` expansion slot. - -.. _ug_radio_fem_nrf2220ek_programming: - -Building and programming with nRF2220 EK -**************************************** - -To build for the nRF2220 EK, build for the compatible :ref:`nRF52, nRF53 or nRF54L board target ` with the CMake ``SHIELD`` option set to ``nrf2220ek``. -See :ref:`cmake_options` for instructions on how to provide CMake options. - -For example, if you build for nRF52840 DK on the command line, you can use the following command: - -.. code-block:: console - - west build -b nrf52840dk/nrf52840 -- -DSHIELD=nrf2220ek - -If you use |nRFVSC|, specify ``-DSHIELD=nrf2220ek`` in the *Extra Cmake arguments* field when `setting up a build configuration `_. - -Alternatively, add the shield in the project's :file:`CMakeLists.txt` file: - -.. code-block:: none - - set(SHIELD nrf2220ek) - -Building for a multicore board -============================== - -When building for a board with an additional network core, like the nRF5340, add the ``-DSHIELD`` parameter to the command line: - -.. code-block:: console - - west build -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf2220ek - -In this case, the sysbuild will pass the ``SHIELD=nrf2220ek`` variable to all images that are built by the command. -The build system will pick automatically appropriate overlay and configuration files for images for each core. -The files are different for each of the cores. -For the application core, the overlay containing forwarding the FEM pins to the network core will be used. -For the network core, the overlay enabling nRF2220 FEM on the network core will be used. -In case the application contains additional images for which the ``SHIELD`` variable should not be passed, you must pass manually the ``SHIELD`` variable to each relevant image build separately. - -.. code-block:: console - - west build -b nrf5340dk/nrf5340/cpuapp -- -D_SHIELD=nrf2220ek -Dipc_radio_SHIELD=nrf2220ek - -In this case the ``SHIELD=nrf2220ek`` will be passed to the build of the *app_image_name* image for the application core. -The build system will pick automatically an overlay file containing forwarding the FEM pins to the network core. -The ``SHIELD=nrf2220ek`` variable will be passed to the build of the ``ipc_radio`` image for the network core. -The build system will pick automatically an overlay file enabling nRF2220 FEM on the network core. - -In this command, the ``ipc_radio`` image is used as default and builds the network core image with support for the combination of 802.15.4 and Bluetooth. -The ``ipc_radio`` has been used since the build system migration to sysbuild. -See :ref:`Migrating to sysbuild ` page. -Setting the correct sysbuild option enables support for 802.15.4 and Bluetooth :ref:`ipc_radio`. - -``ipc_radio`` represents all applications with support for the combination of both 802.15.4 and Bluetooth. -You can configure your application using the following sysbuild Kconfig options: - -* :kconfig:option:`SB_CONFIG_NETCORE_IPC_RADIO` for applications having support for 802.15.4, but not for Bluetooth. -* :kconfig:option:`SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC` for application having support for Bluetooth, but not for 802.15.4. -* :kconfig:option:`SB_CONFIG_NETCORE_IPC_RADIO` and :kconfig:option:`SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC` for multiprotocol applications having support for both 802.15.4 and Bluetooth. - - -.. note:: - On nRF53 devices, ``TWIM0`` and ``UARTE0`` are mutually exclusive AHB bus masters on the network core as described in the `Product Specification `_, Section 6.4.3.1, Table 22. - As a result, they cannot be used simultaneously. - For the I2C part of the nRF2220 interface to be functional, you must disable the ``UARTE0`` node in the network core's devicetree file. - - .. code-block:: devicetree - - &uart0 { - status = "disabled"; - }; diff --git a/doc/nrf/app_dev/device_guides/fem/fem_nrf2220.rst b/doc/nrf/app_dev/device_guides/fem/fem_nrf2220.rst deleted file mode 100644 index 9b1b86b39ea9..000000000000 --- a/doc/nrf/app_dev/device_guides/fem/fem_nrf2220.rst +++ /dev/null @@ -1,136 +0,0 @@ -.. _ug_radio_fem_nrf2220: - -Enabling support for nRF2220 -############################ - -The nRF2220 device is a range extender that you can use with nRF52, nRF53 and nRF54L Series devices. -The nRF2220 features a GPIO and I2C interface. -You can use it to fully control your front-end module. -To use nRF2220, complete the following steps: - -1. Add the following node in the devicetree file: - - .. code-block:: - - / { - nrf_radio_fem: name_of_fem_node { - compatible = "nordic,nrf2220-fem"; - cs-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - md-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; - twi-if = <&nrf_radio_fem_twi>; - output-power-dbm = <10>; - }; - }; - - Additionally, you can consider setting the :kconfig:option:`CONFIG_MPSL_FEM_NRF2220_TEMPERATURE_COMPENSATION` Kconfig option. - -#. Optionally replace the device name ``name_of_fem_node``. -#. Replace the pin numbers provided for each of the required properties: - - * ``cs-gpios`` - GPIO characteristic of the device that controls the ``CS`` signal of the nRF2220. - * ``md-gpios`` - GPIO characteristic of the device that controls the ``MD`` signal of the nRF2220. - - These properties correspond to ``CS`` and ``MD`` pins of nRF2220 that are supported by software FEM. - - The ``phandle-array`` type is commonly used for describing GPIO signals in Zephyr's devicetree. - The first element ``&gpio1`` refers to the GPIO port (``port 1`` has been selected in the example shown). - The second element is the pin number on that port. - The last element must be ``GPIO_ACTIVE_HIGH`` for nRF2220. - -#. Optionally, set the value of the ``output-power-dbm`` property to a desired output power of the nRF2220 that is to be used when power amplifier of the nRF2220 is used. - Allowed range is 7 to 14 dBm. - To achieve 12 dBm or more output power the power supply voltage of the nRF2220 must be minimum 3.0 V. - The software assumes that proper supply voltage is assured. - The nRF2220 device is configured through I2C on boot up to achieve given output power when the power amplifier of the nRF2220 is used. - The nRF2220 features also a built-in low-attenuation bypass circuit. - Either the bypass or power amplifier will be used when transmitting RF signals depending on requests made by a protocol driver. - The control of the output power of the SoC and decision to use either the bypass or the power amplifier occurs automatically. -#. Add the following I2C bus device node on the devicetree file: - - .. code-block:: devicetree - - &pinctrl { - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; - - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; - }; - - fem_twi: &i2c0 { - status = "okay"; - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; - - nrf_radio_fem_twi: nrf2220_fem_twi@36 { - compatible = "nordic,nrf2220-fem-twi"; - status = "okay"; - reg = <0x36>; - }; - }; - - In this example, the nRF2220 is controlled by the ``i2c0`` bus of the SoC and its slave device address is ``0x36``. - Replace the I2C bus according to your hardware design, and create alternative entries for I2C with different ``pinctrl-N`` and ``pinctrl-names`` properties. - - .. note:: - - On nRF54L Series devices, instead of ``i2c0`` from the above example, use one of the instances ``i2c20``, ``i2c21``, ``i2c22`` if the I2C pins belong to *PERI Power domain* or ``i2c30`` if the I2C pins belong to *LP Power Domain*. - -#. The nRF2220 device supports alternative I2C slave address selection. - Instead of using the default ``0x36`` I2C slave address for nRF2220 device you can use the value ``0x34``. - In this case, the alternative address selection procedure when switching from ``Power Off`` to ``Bypass`` states of the nRF2220 is used automatically. -#. On nRF53 Series devices, add the devicetree nodes described above the network core. - Use the ``i2c0`` instance of the network core. - For the application core, add a GPIO forwarder node to its devicetree file to pass control over given pins from application core to the network core: - - .. code-block:: devicetree - - &gpio_fwd { - nrf2220-gpio-if { - gpios = <&gpio0 10 0>, /* cs-gpios */ - <&gpio0 8 0>; /* md-gpios */ - }; - nrf2220-twi-if { - gpios = <&gpio0 26 0>, /* TWIM_SDA */ - <&gpio0 27 0>; /* TWIM_SCL */ - }; - }; - - The pins defined in the GPIO forwarder node in the application core's devicetree file must match the pins defined in the FEM nodes in the network core's devicetree file. - -#. On nRF53 Series devices, ``TWIM0`` and ``UARTE0`` are mutually exclusive AHB bus masters on the network core as described in the `Product Specification `_, Section 6.4.3.1, Table 22. - As a result, they cannot be used simultaneously. - For the I2C part of the nRF2220 interface to be functional, disable the ``UARTE0`` node in the network core's devicetree file. - - .. code-block:: devicetree - - &uart0 { - status = "disabled"; - }; - -#. On nRF54L Series devices, make sure the GPIO pins of the SoC selected to control ``cs-gpios`` and ``md-gpios`` support GPIOTE. - For example, on the nRF54L15 device, use pins belonging to GPIO P1 or GPIO P0 only. - You cannot use the GPIO P2 pins, because there is no related GPIOTE peripheral. - It is recommended to use the GPIO pins that belong to the PERI Power Domain of the nRF54L device. - For example, on the nRF54L15, these are pins belonging to GPIO P1. - Using pins belonging to Low Power Domain (GPIO P0 on nRF54L15) is supported but requires more DPPI and PPIB channels of the SoC. - Ensure that the following devicetree instances are enabled (have ``status = "okay"``): - - * ``dppic10`` - * ``dppic20`` - * ``dppic30`` - * ``ppib11`` - * ``ppib21`` - * ``ppib22`` - * ``ppib30`` diff --git a/doc/nrf/app_dev/device_guides/fem/fem_software_support.rst b/doc/nrf/app_dev/device_guides/fem/fem_software_support.rst index ddfb9fc557a2..b590a168f55b 100644 --- a/doc/nrf/app_dev/device_guides/fem/fem_software_support.rst +++ b/doc/nrf/app_dev/device_guides/fem/fem_software_support.rst @@ -13,10 +13,6 @@ The following :term:`Front-End Module (FEM)` implementations are available in th - Interface - Compatible hardware - Documentation for hardware implementation - * - nRF2220 - - 2-pin + I2C - - nRF2220 - - :ref:`ug_radio_fem_nrf2220` * - nRF21540 GPIO+SPI - 3-pin + SPI - nRF21540 @@ -68,7 +64,6 @@ To use any of these implementations with your application, first complete the fo Refer to the chosen :ref:`documentation for hardware implementation ` for details. #. Select the FEM driver implementation by setting one of the following Kconfig options to ``y`` for the chosen FEM support configuration: - * :ref:`nRF2220 `: :kconfig:option:`CONFIG_MPSL_FEM_NRF2220` Kconfig option. * :ref:`nRF21540 GPIO `: :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_GPIO` Kconfig option. This Kconfig option is enabled by default if the `nRF21540`_ node is provided in devicetree. * :ref:`nRF21540 GPIO+SPI `: :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_GPIO_SPI` Kconfig option. @@ -84,7 +79,6 @@ If you are working with the nRF21540 EK, see also :ref:`ug_radio_fem_nrf21540ek` :caption: Subpages: fem_mpsl_fem_only - fem_nrf2220 fem_nrf21540_gpio fem_nrf21540_gpio_spi fem_nRF21540_optional_properties diff --git a/doc/nrf/app_dev/device_guides/fem/index.rst b/doc/nrf/app_dev/device_guides/fem/index.rst index 51c5ddc38c8b..cb3196051ec8 100644 --- a/doc/nrf/app_dev/device_guides/fem/index.rst +++ b/doc/nrf/app_dev/device_guides/fem/index.rst @@ -48,11 +48,6 @@ The following FEM :term:`Shield` is available and defined in the :file:`nrf/boar - | `User Guide `_ | `Front-End Module Feature `_ - `nRF21540 DB product page`_ - * - nRF2220 :term:`Evaluation Kit (EK)` - - PCA63558 - - ``nrf2220ek`` - - - - .. toctree:: :maxdepth: 2 @@ -60,5 +55,4 @@ The following FEM :term:`Shield` is available and defined in the :file:`nrf/boar fem_software_support fem_power_models - 2220ek_dev_guide 21540ek_dev_guide diff --git a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_mcuboot_dfu.rst b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_mcuboot_dfu.rst index f35bad721a4f..e61890aca2ce 100644 --- a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_mcuboot_dfu.rst +++ b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_mcuboot_dfu.rst @@ -86,6 +86,15 @@ For detailed information on ECIES-X25519 support, refer to the :ref:`ug_nrf54h_e On the nRF54H20 SoC, private and public keys are currently stored in the image. Embedding keys directly within the firmware image could pose a potential security risk. +Suspend to RAM (S2RAM) support +****************************** + +MCUboot on the nRF54H20 SoC can supports Suspend to RAM (S2RAM) functionality in the Application. +It is able to detect wake-up from S2RAM and redirect execution to the Application's resume routine. + +Follow :ref:`S2RAM operation with MCUboot as the bootloader instruction` +for more information. + DFU configuration example ************************* diff --git a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_pm_optimization.rst b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_pm_optimization.rst index 71d70de2162e..a8a37e67a217 100644 --- a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_pm_optimization.rst +++ b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_pm_optimization.rst @@ -140,6 +140,60 @@ Consider also the following recommendations: * Add ``zephyr,pm-device-runtime-auto`` in the DTS for all peripherals with runtime PM support. * Build and program an empty image on any unused core to release shared resources. +.. _ug_nrf54h20_pm_optimizations_bootloader: + +Operation with MCUboot as the bootloader +======================================== + +Suspend to RAM (S2RAM) operation of the application requires special support from the bootloader. + +MCUboot on the nRF54H20 SoC supports Suspend to RAM (S2RAM) functionality in the Application. +It is able to detect wake-up from S2RAM and redirect execution to the Application's resume routine. +To enable S2RAM support for your project, set the following MCUboot Kconfig options: + +* :kconfig:option:`CONFIG_PM` - Power management support. +* :kconfig:option:`CONFIG_PM_S2RAM` - Suspend to RAM support. +* :kconfig:option:`CONFIG_PM_S2RAM_CUSTOM_MARKING` - Custom S2RAM making support. +* :kconfig:option:`CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE` - Override Nordic s2ram implementation by MCUboot. + +Also ensure that your board DTS file includes the following zephyr nodes for describing linker section used: + +* A ``zephyr,memory-region`` compatible node labeled ``pm_s2ram``, with a size of 32 bytes. + This region is used to store the S2RAM CPU context. +* A ``zephyr,memory-region`` compatible node labeled ``pm_s2ram_stack``, with a size of 32 bytes. + This region is used as the program stack during S2RAM resume. +* A ``zephyr,memory-region`` compatible node labeled ``mcuboot_s2ram``, with a size of 4 bytes. + This region is used to store the MCUboot S2RAM magic variable. + +Example DTS snippet: + +.. code-block:: dts + + / { + soc { + /* run-time common mcuboot S2RAM support section */ + mcuboot_s2ram: cpuapp_s2ram@22007fdc { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x22007fdc 4>; + zephyr,memory-region = "mcuboot_s2ram_context"; + }; + + /* temporary stack for S2RAM resume logic */ + pm_s2ram_stack: cpuapp_s2ram_stack@22007fd0 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x22007fd0 16>; + zephyr,memory-region = "pm_s2ram_stack"; + }; + + /* S2RAM cpu context RAM allocation */ + pm_s2ram: cpuapp_s2ram@22007fe0 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x22007fe0 32>; + zephyr,memory-region = "pm_s2ram_context"; + }; + }; + }; + Memory and cache optimization recommendations ============================================= diff --git a/doc/nrf/includes/sample_dtm_radio_test_fem.txt b/doc/nrf/includes/sample_dtm_radio_test_fem.txt index 20f0c038a0f5..1c3d0973d9ee 100644 --- a/doc/nrf/includes/sample_dtm_radio_test_fem.txt +++ b/doc/nrf/includes/sample_dtm_radio_test_fem.txt @@ -1,10 +1,9 @@ -You can add support for the nRF21540 or nRF2220 front-end module (FEM) to the sample. +You can add support for the nRF21540 front-end module (FEM) to the sample. To add support for the FEM, build the sample for a board containing FEM like :zephyr:board:`nrf21540dk` or create a devicetree overlay file describing how FEM is connected to the nRF52 Series SoC in your device. .. note:: If you use the nRF21540 EK, append ``nrf21540ek`` shield to your build command instructing build system to append the appropriate devicetree overlay file. - If you use the nRF2220 EK, append the ``nrf2220ek`` shield to your build command instructing the build system to append the appropriate devicetree overlay file. If you use the nRF21540 DK, build your application for the :zephyr:board:`nrf21540dk` board target. The devicetree for the nRF21540 DK already contains the required FEM configuration, so you do not need to set an additional build option. @@ -20,4 +19,3 @@ For more details refer to the following documentation: * :ref:`ug_radio_fem_direct_support` * :ref:`ug_radio_fem_nrf21540_spi_gpio` * :ref:`ug_radio_fem_nrf21540ek` -* :ref:`ug_radio_fem_nrf2220ek` diff --git a/doc/nrf/libraries/bluetooth/services/fast_pair/core.rst b/doc/nrf/libraries/bluetooth/services/fast_pair/core.rst index bd3aa6d769af..c643fac9417d 100644 --- a/doc/nrf/libraries/bluetooth/services/fast_pair/core.rst +++ b/doc/nrf/libraries/bluetooth/services/fast_pair/core.rst @@ -96,7 +96,7 @@ With the :kconfig:option:`CONFIG_BT_FAST_PAIR` Kconfig option enabled, the follo * :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_CLOCK_NVM_UPDATE_TIME` - The option configures the time interval (in minutes) of periodic beacon clock writes to the non-volatile memory. * :kconfig:option:`CONFIG_BT_FAST_PAIR_FMDN_CLOCK_NVM_UPDATE_RETRY_TIME` - The option configures the retry time (in seconds) when the beacon clock write to the non-volatile memory fails. -* :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_UNKNOWN`, :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_INPUT_DEVICE`, :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_LOCATOR_TAG`and :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_MOUSE` - These options are used to select the Fast Pair use case and configure the Fast Pair library according to the `Fast Pair Device Feature Requirements`_ for the chosen use case. +* :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_UNKNOWN`, :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_INPUT_DEVICE`, :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_LOCATOR_TAG` and :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_MOUSE` - These options are used to select the Fast Pair use case and configure the Fast Pair library according to the `Fast Pair Device Feature Requirements`_ for the chosen use case. The :kconfig:option:`CONFIG_BT_FAST_PAIR_USE_CASE_UNKNOWN` Kconfig option is used by default. * :kconfig:option:`CONFIG_BT_FAST_PAIR_ADV_MANAGER` - The option enables the :ref:`bt_fast_pair_adv_manager_readme` module. See the :ref:`bt_fast_pair_adv_manager_config` section to learn more about the remaining Kconfig options of this module. diff --git a/doc/nrf/libraries/modem/lte_lc.rst b/doc/nrf/libraries/modem/lte_lc.rst index 6594c9145914..2b364aa82b65 100644 --- a/doc/nrf/libraries/modem/lte_lc.rst +++ b/doc/nrf/libraries/modem/lte_lc.rst @@ -147,7 +147,7 @@ Tracking Area Update (TAU) Pre-warning: * :c:enumerator:`LTE_LC_EVT_TAU_PRE_WARNING` events * :kconfig:option:`CONFIG_LTE_LC_TAU_PRE_WARNING_NOTIFICATIONS` -DNS fallback: +DNS Fallback: The :kconfig:option:`CONFIG_LTE_LC_DNS_FALLBACK_MODULE` Kconfig option controls the use of a fallback DNS server address. The device might or might not receive a DNS server address by the network during a PDN connection. @@ -158,6 +158,13 @@ DNS fallback: If the application has configured a DNS server address in Zephyr's native networking stack using the :kconfig:option:`CONFIG_DNS_SERVER1` Kconfig option, the same server is set as the fallback address for DNS queries offloaded to the nRF91 Series modem. Otherwise, the :kconfig:option:`CONFIG_LTE_LC_DNS_FALLBACK_ADDRESS` Kconfig option controls the fallback DNS server address that is set to Cloudflare's DNS server: 1.1.1.1 by default. +Environment Evaluation: + Use the :kconfig:option:`CONFIG_LTE_LC_ENV_EVAL_MODULE` Kconfig option to enable the following functionalities related to Environment Evaluation: + + * :c:enumerator:`LTE_LC_EVT_ENV_EVAL_RESULT` events + * :c:func:`lte_lc_env_eval` + * :c:func:`lte_lc_env_eval_cancel` + For more information on the callback events received in :c:type:`lte_lc_evt_handler_t` and data associated with each event, see the documentation on :c:struct:`lte_lc_evt`. For more information on the functions and data associated with each, refer to the API documentation. @@ -254,6 +261,20 @@ To enable modem sleep and TAU pre-warning notifications, use the following optio For additional configurations related to these features, see the API documentation. +Environment evaluation +====================== + +Modem firmware mfw_nrf91x1 v2.0.3 and higher, and mfw_nrf9151-ntn support environment evaluation. +Environment evaluation allows the application to evaluate available PLMNs and select the best PLMN to use before connecting to the network. +This is useful especially in cases where the device has multiple SIMs or SIM profiles to select from. + +Environment evaluation can only be performed in *receive only* functional mode. +During the environment evaluation, the device searches for the best cell for each PLMN. + +The :c:func:`lte_lc_env_eval` function starts the environment evaluation for the given PLMNs. +When the environment evaluation is complete, an :c:enumerator:`LTE_LC_EVT_ENV_EVAL_RESULT` event with the evaluation results is received. +For each found PLMN, the :c:struct:`lte_lc_conn_eval_params` structure is populated with the evaluation results. + Limitations *********** diff --git a/doc/nrf/links.txt b/doc/nrf/links.txt index 027806899de5..9034394435e4 100644 --- a/doc/nrf/links.txt +++ b/doc/nrf/links.txt @@ -330,6 +330,8 @@ .. _`nRF54L05`: https://www.nordicsemi.com/Products/nRF54L05 .. _`nRF54L10`: https://www.nordicsemi.com/Products/nRF54L10 +.. _`nRF54LM20A System-on-Chip`: https://www.nordicsemi.com/Products/nRF54LM20A + .. _`nRF52840 DK Downloads`: https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK/Download#infotabs .. _`nRF52840 DK product page`: https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK/ @@ -482,6 +484,7 @@ .. _`Asset Tracker Template`: https://docs.nordicsemi.com/bundle/asset-tracker-template-latest/page/index.html .. _`known issues page on the main branch`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html +.. _`known issues for nRF Connect SDK v3.1.1`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v3-1-1 .. _`known issues for nRF Connect SDK v3.1.0`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v3-1-0 .. _`known issues for nRF Connect SDK v3.0.2`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v3-0-2 .. _`known issues for nRF Connect SDK v3.0.1`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v3-0-1 @@ -531,6 +534,7 @@ .. _`known issues for nRF Connect SDK v1.4.1`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v1-4-1 .. _`known issues for nRF Connect SDK v1.4.0`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html?v=v1-4-0 +.. _`Repositories and revisions for v3.1.1`: https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/nrf/releases_and_maturity/repository_revisions.html .. _`Repositories and revisions for v3.1.0`: https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/nrf/releases_and_maturity/repository_revisions.html .. _`Repositories and revisions for v3.0.2`: https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/nrf/releases_and_maturity/repository_revisions.html .. _`Repositories and revisions for v3.0.1`: https://docs.nordicsemi.com/bundle/ncs-3.0.1/page/nrf/releases_and_maturity/repository_revisions.html @@ -572,6 +576,7 @@ .. _`Repositories and revisions for v1.9.1`: https://docs.nordicsemi.com/bundle/ncs-1.9.1/page/nrf/introduction.html#repositories_and_revisions .. _`Repositories and revisions`: https://docs.nordicsemi.com/bundle/ncs-1.9.0/page/nrf/introduction.html#repositories_and_revisions +.. _`Modem library changelog for v3.1.1`: https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-changelog .. _`Modem library changelog for v3.1.0`: https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-changelog .. _`Modem library changelog for v3.0.2`: https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-changelog .. _`Modem library changelog for v3.0.1`: https://docs.nordicsemi.com/bundle/ncs-3.0.1/page/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-changelog @@ -609,6 +614,7 @@ .. _`Modem library changelog for v1.9.1`: https://docs.nordicsemi.com/bundle/ncs-1.9.1/page/nrfxlib/nrf_modem/doc/CHANGELOG.html .. _`Modem library changelog for v1.9.0`: https://docs.nordicsemi.com/bundle/ncs-1.9.0/page/nrfxlib/nrf_modem/doc/CHANGELOG.html +.. _`LwM2M carrier library changelog for v3.1.1`: https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/nrf/libraries/bin/lwm2m_carrier/CHANGELOG.html#liblwm2m-carrier-changelog .. _`LwM2M carrier library changelog for v3.1.0`: https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/nrf/libraries/bin/lwm2m_carrier/CHANGELOG.html#liblwm2m-carrier-changelog .. _`LwM2M carrier library changelog for v3.0.2`: https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/nrf/libraries/bin/lwm2m_carrier/CHANGELOG.html#liblwm2m-carrier-changelog .. _`LwM2M carrier library changelog for v3.0.1`: https://docs.nordicsemi.com/bundle/ncs-3.0.1/page/nrf/libraries/bin/lwm2m_carrier/CHANGELOG.html#liblwm2m-carrier-changelog diff --git a/doc/nrf/nrf.doxyfile.in b/doc/nrf/nrf.doxyfile.in index c08e0e5d792d..57ebd5eb97f4 100644 --- a/doc/nrf/nrf.doxyfile.in +++ b/doc/nrf/nrf.doxyfile.in @@ -2464,7 +2464,8 @@ PREDEFINED = __DOXYGEN__ \ "CONFIG_LTE_LC_PSM_MODULE=y" \ "CONFIG_LTE_LC_RAI_MODULE=y" \ "CONFIG_LTE_LC_MODEM_SLEEP_MODULE=y" \ - "CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE=y" + "CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE=y" \ + "CONFIG_LTE_LC_ENV_EVAL_MODULE=y" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/doc/nrf/protocols/matter/end_product/factory_provisioning.rst b/doc/nrf/protocols/matter/end_product/factory_provisioning.rst index 0b8ac6477ad9..886909d00249 100644 --- a/doc/nrf/protocols/matter/end_product/factory_provisioning.rst +++ b/doc/nrf/protocols/matter/end_product/factory_provisioning.rst @@ -140,7 +140,7 @@ The following table lists the parameters of a factory data set: | ``rd_uid`` | rotating device ID unique ID | <16, 32> B | byte string | optional | The unique ID for rotating device ID, which consists of a randomly-generated 128-bit (or longer) octet string. | | | | | | | The rotating device ID is an optional identifier that is used for the :ref:`ug_matter_configuring_ffs` purposes. | | | | | | | This parameter should be protected against reading or writing over-the-air after initial introduction into the device, and stay fixed during the lifetime of the device. | -| | | | | | When building an application with the Factory Data support, the `CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN` must be set with the length of the actual ``rd_uid`` stored in the Factory Data partition. | +| | | | | | When building an application with the Factory Data support, the :ref:`CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN` must be set with the length of the actual ``rd_uid`` stored in the Factory Data partition. | +------------------------+--------------------------------------+----------------------+--------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``user`` | User data | variable, max 1024 B | CBOR map | optional | The user data is provided in the JSON format. | | | | | | | This parameter is optional and depends on the device manufacturer's purpose. | @@ -968,7 +968,7 @@ To override the inherited classes, complete the following steps: #. Disable building both the default and the nRF Connect implementations of factory data providers to start using your own implementation of factory data parser and provider. This can be done in one of the following ways: - * Set the :kconfig:option:`CONFIG_FACTORY_DATA_CUSTOM_BACKEND` Kconfig option to ``y`` in the :file:`prj.conf` file. + * Set the :ref:`CONFIG_FACTORY_DATA_CUSTOM_BACKEND` Kconfig option to ``y`` in the :file:`prj.conf` file. * Build an example with the following option (replace ```` with your board name, for example ``nrf52840dk_nrf52840``): .. parsed-literal:: diff --git a/doc/nrf/protocols/matter/end_product/security.rst b/doc/nrf/protocols/matter/end_product/security.rst index d63c05d2f00a..be666045412b 100644 --- a/doc/nrf/protocols/matter/end_product/security.rst +++ b/doc/nrf/protocols/matter/end_product/security.rst @@ -352,7 +352,7 @@ If the :kconfig:option:`CONFIG_CHIP_CRYPTO_PSA_DAC_PRIV_KEY_KMU_ENCRYPTED` Kconf By default, the DAC private key occupies the last slots dedicated for application purposes. For the non-encrypted version, it occupies the last two slots (178 and 179), and for the encrypted version, it occupies the last four slots (176-179). -You can change the default slots by setting the :kconfig:option:`CONFIG_CHIP_CRYPTO_PSA_DAC_PRIV_KEY_KMU_SLOT` Kconfig option to the first slot number of the desired slots, making sure that all slots fit within the possible range. +You can change the default slots by setting the :kconfig:option:`CONFIG_CHIP_CRYPTO_PSA_DAC_PRIV_KEY_KMU_SLOT_ID` Kconfig option to the first slot number of the desired slots, making sure that all slots fit within the possible range. This means you can set it to slot numbers 0-176 for encrypted, or 0-178 for non-encrypted. To read more about KMU slots, see the :ref:`ug_nrf54l_crypto_kmu_slots` section of the :ref:`ug_nrf54l_cryptography` page, which details the KMU peripheral. diff --git a/doc/nrf/protocols/matter/getting_started/advanced_kconfigs.rst b/doc/nrf/protocols/matter/getting_started/advanced_kconfigs.rst index 2a34986cd085..b08e2b06cfb7 100644 --- a/doc/nrf/protocols/matter/getting_started/advanced_kconfigs.rst +++ b/doc/nrf/protocols/matter/getting_started/advanced_kconfigs.rst @@ -222,25 +222,25 @@ When the device leaves the last fabric, one of several reactions can be set to h To enable one of the reactions to the last fabric removal, set the corresponding Kconfig option to ``y``: -* :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_NONE` - Do not react to the last fabric removal. +* :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_NONE` - Do not react to the last fabric removal. The device will keep all saved data and network credentials, and will not reboot. -* :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_ONLY` - Remove all saved network credentials. +* :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_ONLY` - Remove all saved network credentials. The device will remove all saved network credentials, keep application-specific non-volatile data, and will not reboot. -* :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_PAIRING_START` - Remove all saved network credentials and start Bluetooth LE advertising. +* :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_PAIRING_START` - Remove all saved network credentials and start Bluetooth LE advertising. The device will remove all saved network credentials, keep application-specific non-volatile data, and start advertising Bluetooth LE Matter service. After that, it will be ready for commissioning to Matter over Bluetooth LE. -* :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT` - Remove all saved network credentials and reboot the device. +* :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT` - Remove all saved network credentials and reboot the device. This option is selected by default. When the :kconfig:option:`CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS` Kconfig option is also set to ``y``, the device will also remove all non-volatile data stored on the device, including application-specific entries. This means the device is restored to the factory settings. -To create a delay between the chosen reaction and the last fabric being removed, set the :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ACTION_DELAY` Kconfig option to a specific time in milliseconds. +To create a delay between the chosen reaction and the last fabric being removed, set the :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ACTION_DELAY` Kconfig option to a specific time in milliseconds. By default this Kconfig option is set to 1 second. .. note:: The :kconfig:option:`CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS` Kconfig option is set to ``y`` by default. - To disable removing application-specific non-volatile data when the :kconfig:option:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT` Kconfig option is selected, set the :kconfig:option:`CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS` Kconfig option to ``n``. + To disable removing application-specific non-volatile data when the :ref:`CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT` Kconfig option is selected, set the :kconfig:option:`CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS` Kconfig option to ``n``. .. _ug_matter_configuring_read_client: diff --git a/doc/nrf/protocols/matter/getting_started/memory_optimization.rst b/doc/nrf/protocols/matter/getting_started/memory_optimization.rst index 459ac6132631..614d26de29bc 100644 --- a/doc/nrf/protocols/matter/getting_started/memory_optimization.rst +++ b/doc/nrf/protocols/matter/getting_started/memory_optimization.rst @@ -67,7 +67,7 @@ Measuring memory usage ====================== You can obtain the current memory statistics from the device using Kconfig options and UART shell commands. -To do this, set the :kconfig:option:`CONFIG_CHIP_MEMORY_PROFILING` global Matter memory profiling Kconfig to ``y``. +Set the :ref:`CONFIG_CHIP_MEMORY_PROFILING` Kconfig option to ``y``. This activates all the other necessary Kconfig options and enables all UART shell commands for measuring memory usage. Alternatively, you can enable each option separately. diff --git a/doc/nrf/protocols/matter/index.rst b/doc/nrf/protocols/matter/index.rst index c924c0fa7c77..e569d661684b 100644 --- a/doc/nrf/protocols/matter/index.rst +++ b/doc/nrf/protocols/matter/index.rst @@ -25,6 +25,8 @@ For a full list of |NCS| and Matter versions, view the following table: +==========================+=====================================================+========================+ | v3.1.99 (latest) | :ref:`1.4.2 ` | | +--------------------------+ | | + | v3.1.1 | | | + +--------------------------+ | | | |release| | | 1.4.2.0 | +--------------------------+-----------------------------------------------------+------------------------+ | v3.0.2 | :ref:`1.4.1 ` | 1.4.1.0 | diff --git a/doc/nrf/releases_and_maturity.rst b/doc/nrf/releases_and_maturity.rst index 1f2f92ae00d2..3f07aaf04dd7 100644 --- a/doc/nrf/releases_and_maturity.rst +++ b/doc/nrf/releases_and_maturity.rst @@ -10,7 +10,6 @@ The versioning scheme adopted is similar to `Semantic versioning`_, but with imp * Every release of the |NCS| is identified with a version string in the ``MAJOR.MINOR.PATCH`` format. * Between two releases, ``99`` is added in place of ``PATCH`` to indicate ongoing development. -* When a new functionality is introduced in the development state, ``devN`` postfix can be added at the end of the version number. To learn more about the versioning and the release criteria of the |NCS|, read :ref:`dm-revisions`. diff --git a/doc/nrf/releases_and_maturity/known_issues.rst b/doc/nrf/releases_and_maturity/known_issues.rst index a080e8d501d6..dbe7448c19be 100644 --- a/doc/nrf/releases_and_maturity/known_issues.rst +++ b/doc/nrf/releases_and_maturity/known_issues.rst @@ -22,7 +22,7 @@ A known issue can list one or both of the following entries: Sometimes, they are discovered later and added over time. .. version-filter:: - :default: v3-1-0 + :default: v3-1-1 :container: dl/dt :tags: [("wontfix", "Won't fix")] @@ -214,7 +214,7 @@ NCSDK-31457: Implementation of L2CAP PDU recombination through ACL in pool **Workaround:** Increase the value of the :kconfig:option:`CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA` Kconfig option. This workaround is only applicable for the |NCS| v3.0.2, v3.0.1 and v3.0.0 releases. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-2 v2-9-1 v2-9-0-nRF54H20-1 v2-9-0 v2-8-0 v2-7-99-cs2 v2-7-99-cs1 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-99-cs2 v2-6-99-cs1 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2-dev1 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-2 v2-9-1 v2-9-0-nRF54H20-1 v2-9-0 v2-8-0 v2-7-99-cs2 v2-7-99-cs1 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-99-cs2 v2-6-99-cs1 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2-dev1 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 NCSDK-31487: Improper reuse of dynamic GATT service handles The Host reuses handles when registering dynamic services even while there are connected clients. @@ -225,7 +225,7 @@ NCSDK-31487: Improper reuse of dynamic GATT service handles For a more flexible approach, you may register services while connected, but after unregistering any service, wait until all connections are gone and there are no connectable advertisers before registering new services. Alternatively, manually allocate handles by setting the :c:member:`bt_gatt_attr.handle` field in each :c:type:`bt_gatt_attr` before calling the :c:func:`bt_gatt_service_register` function to ensure handles are not reused while ATT bearers exist. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-31528: Deadlock on system workqueue with ``tx_notify`` in host If the :kconfig:option:`CONFIG_BT_HCI_ACL_FLOW_CONTROL` Kconfig option is disabled, blocking of the system workqueue can cause a deadlock in the Bluetooth Host when running out of buffers in the HCI commands pool. @@ -428,13 +428,22 @@ NCSDK-29354: Bluetooth traffic stalls while writing or erasing flash **Workaround:** Use a separate workqueue for connection TX notify processing (:kconfig:option:`CONFIG_BT_CONN_TX_NOTIFY_WQ`). -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 NCSDK-30959: The Bluetooth subsystem might deadlock when :kconfig:option:`CONFIG_BT_HCI_ACL_FLOW_CONTROL` is disabled When the :kconfig:option:`CONFIG_BT_HCI_ACL_FLOW_CONTROL` Kconfig option is disabled and your application blocks any of the Bluetooth Host callbacks, the Bluetooth subsystem might deadlock. **Workaround:** Enable the :kconfig:option:`CONFIG_BT_HCI_ACL_FLOW_CONTROL` Kconfig option or do not call the blocking API from any of the Bluetooth Host callbacks. +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-2 v2-9-1 v2-9-0-nRF54H20-1 v2-9-0 v2-8-0 v2-7-99-cs2 v2-7-99-cs1 v2-7-0 + +NCSDK-35430: Assertion can happen in the Bluetooth Host if an application is trying to send a synchronous command while the system workqueue is blocked + If the Bluetooth Host or an application blocks the system workqueue, the Bluetooth Host TX processor cannot send commands or data towards the Controller. + If this happens when a separate thread tries to send a synchronous command, an assertion can occur. + This assertion is highly possible if the application is trying to send a synchronous command from the :c:member:`bt_conn_cb.connected` callback. + + **Workaround:** Increase the value of the :kconfig:option:`CONFIG_BT_BUF_CMD_TX_COUNT` Kconfig option. + Bluetooth Mesh ============== @@ -451,7 +460,7 @@ NCSDK-31962: Advertiser buffer leak on Suspend-Resume Calling the :c:func:`bt_mesh_adv_disable` function does not unreference advertising buffers that were previously allocated. Over multiple suspend-resume cycles, this can lead to buffer leaks and eventually exhaust the advertising buffer pool. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 NCSDK-32928: Erasing settings partition without unprovisioning mesh breaks subsequent provisioning on TF-M enabled platforms When running Bluetooth Mesh on platforms with TF-M support (for example, ``nrf5340dk/nrf5340/cpuapp/ns``), erasing the settings partition without correctly unprovisioning Bluetooth Mesh will break subsequent provisionings. @@ -473,7 +482,7 @@ NCSDK-29893: Adding dynamic names to devices does not work The advertiser options to automatically add the name in the scan response and the advertising data is removed. The Mesh files :file:`proxy_srv.c` and :file:`pb_gatt_srv.c` were using ``BT_LE_ADV_OPT_USE_NAME`` that has been removed. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 NCSDK-28363: Local composition hash generator only considers the first portion of the Composition Data Page 0 (CDP0) when the size of CDP0 exceeds ``BT_TX_SDU_MAX`` This affects applications that use the Large Composition Data server together with the default DFU Metadata format enabled using the :kconfig:option:`CONFIG_BT_MESH_DFU_METADATA` Kconfig option. @@ -548,7 +557,7 @@ NCSDK-16579: Advertising Node Identity and Network ID might not work with the ex NCSDK-21780: Sensor types with floating point representation lose precision Sensor types with floating point representation lose precision when converted to ``sensor_value`` in the sensor API callbacks. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-1 v1-9-0 v1-8-0 v1-7-1 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-1 v1-9-0 v1-8-0 v1-7-1 NCSDK-14399: Legacy advertiser can occasionally do more message retransmissions than requested When using the legacy advertiser, the stack sleeps for at least 50 ms after starting advertising a message, which might result in more messages to be advertised than requested. @@ -727,7 +736,7 @@ KRKNWK-19826: The Device Firmware Upgrade (DFU) fails for nRF5340 DK with RAM po **Workaround:** Set the :kconfig:option:`CONFIG_RAM_POWER_DOWN_LIBRARY` Kconfig option to ``n`` in the :file:`prj_release.conf` file of the application. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 KRKNWK-19388: The smart plug functionality of Matter Bridge application does not work with Apple Home application The additional functionality of a smart plug that runs alongside the Matter Bridge functionality is not visible in the Apple Home application. @@ -1217,7 +1226,7 @@ Near Field Communication (NFC) The issues in this section are related to the :ref:`ug_nfc` protocol. -.. rst-class: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 +.. rst-class: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 NCSDK-34404: Possible increased current consumption in NFC applications on the nRF54H20 and nRF54L devices If your application uses NFC on the nRF54H20 and nRF54L SoCs, the current consumption may remain high even after the NFC field is lost, due to the running high-frequency peripheral clock. @@ -1254,7 +1263,7 @@ KRKNWK-19036: High power consumption after parent loss **Workaround:** Manually cherry-pick and apply commit with fix to ``sdk-zephyr`` (commit hash: ``6c602a1bbd3b3f7811082bce391c6943663a2c64``). -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 KRKNWK-18612: nRF5340 sometimes fails to send a Child Update Response to an SSED child After performing an MLE Child Update Request by an SSED child, an nRF5340 parent sometimes does not respond with a Child Update Response. @@ -1414,14 +1423,14 @@ Wi-Fi The issues in this section are related to the :ref:`ug_wifi` protocol. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 SHEL-3745: Wi-Fi connection broken with nRF54H20 Wi-Fi connection fails due to ``pbkdf2_sha1()`` error. **Affected platforms:** nRF7002, nRF54H20 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NRF7X-323: Wi-Fi ``ns`` builds take eight seconds to boot It takes eight seconds when autoloading credentials before the scan/connect procedure occurs. @@ -1453,7 +1462,7 @@ SHEL-3345 : Wi-Fi Coex (Bluetooth LE and Thread) is broken **Affected platforms:** nRF7002 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-29650: Wi-Fi connection times are increased in ``_ns`` builds The latency has increased significantly in latest main branch. @@ -1463,14 +1472,14 @@ NCSDK-29650: Wi-Fi connection times are increased in ``_ns`` builds **Affected platforms:** nRF7002 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-29649: Flash firmware integrity check does not work due to Mbed TLS dependencies Due to this, nRF70 patches cannot be validated and corrupted patches can manifest in nRF70 bootup failures. **Affected platforms:** nRF7002 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-29651: nRF54H20 Legacy crypto not supported PSA crypto is used by default, which limits Wi-Fi security only up to WPA2. @@ -2114,7 +2123,7 @@ Serial LTE Modem The issues in this section are related to the :ref:`serial_lte_modem` application. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 NCSDK-20457: Modem traces captured through UART are corrupted if RTT logs are simultaneously captured When capturing modem traces through UART with the `Cellular Monitor app`_ and simultaneously capturing RTT logs, for example, with J-Link RTT Viewer, the modem trace misses packets, and captured packets might have incorrect information. @@ -2147,7 +2156,7 @@ NCSDK-24135: Serial LTE Modem (SLM) attempts to use UART hardware flow control e **Workaround:** Set the :ref:`CONFIG_SLM_UART_RX_BUF_SIZE ` Kconfig option to ``2048`` to ensure that there is adequate buffer space to receive traffic from the Connectivity bridge and disable the ``hw-flow-control`` from :file:`boards\thingy91_nrf9160_ns.overlay`. If even larger buffer spaces are required, set the :kconfig:option:`CONFIG_BRIDGE_BUF_SIZE` Kconfig option for Connectivity bridge and the :ref:`CONFIG_SLM_UART_RX_BUF_SIZE ` Kconfig option for SLM, must be set accordingly. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 NCSDK-23733: Full modem firmware update issue on the nRF91x1 DKs Failures of full modem firmware update on the nRF91x1 DK have been observed in certain conditions. @@ -2196,7 +2205,7 @@ The issues in this section are related to the :ref:`nrf_desktop` application. nRF Desktop is also affected by :ref:`hogp_readme` library's issue :ref:`NCSDK-30288 `. The issue might cause accessing data under the ``NULL`` pointer in case of Bluetooth disconnection while forwarding a configuration channel operation in the :ref:`nrf_desktop_hid_forward`. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34743: System state indication LED does not work on nRF54L15 DK The system state indication LED is kept turned off, because the PWM hardware peripheral attempts to drive the LED instead of GPIO. @@ -2207,7 +2216,7 @@ NCSDK-34743: System state indication LED does not work on nRF54L15 DK **Workaround:** Manually cherry-pick and apply the commit with the fix from the ``main`` branch (commit hash: ``744701bdf6f2ce7e3421649644ccd86cad8e26b4``). -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34299: nRF Desktop application does not build or run due to the IronSide SE migration The :ref:`nrf_desktop` application is currently incompatible with the latest |NCS| transition to the IronSide SE solution - bundle 22.1.0 and higher for the ``nrf54h20dk/nrf54h20/cpuapp`` board target. @@ -2308,7 +2317,7 @@ NCSDK-25928: :ref:`nrf_desktop_hid_state` keeps sending empty HID reports to low **Workaround:** Manually cherry-pick and apply the commit with the fix from the ``main`` branch (commit hash: ``a87407fc29514b68a7bdaea5554f7b755466a77b``). -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 NCSDK-8304: HID configurator issues for peripherals connected over Bluetooth LE to Linux host Using :ref:`nrf_desktop_config_channel_script` for peripherals connected to host directly over Bluetooth LE might result in receiving improper HID feature report ID. @@ -2453,15 +2462,15 @@ nRF5340 Audio The issues in this section are related to the :ref:`nrf53_audio_app` application. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 OCT-3265: Test with nRF5340 DK as sink will cause the I2S to interfere with other signals on the same pins Using the nRF5340 DK to drive an external digital-to-analog converter through I2S will not produce audio. This is due to the fact that the I2S signals are multiplexed with the QSPI flash signals on the nRF5340 DK. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 -OCT-3432: Selecting 32 bit (CONFIG_AUDIO_BIT_DEPTH_32=y) as the I2S input on gateway may cause choppy audio +OCT-3432: Selecting 32 bit (``CONFIG_AUDIO_BIT_DEPTH_32`` = `y`) as the I2S input on gateway may cause choppy audio Using 32-bit I2S input requires significantly more buffer handling and CPU time. Depending on the configuration, this may overload the system and cause I2S RX overruns. @@ -2471,7 +2480,7 @@ OCT-3368: For 16 and 24 kHz, the application may repeatedly print "audio_sync_ti This may cause degraded audio quality. This issue is related to the issue OCT-2585 and it shows the same behavior. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 OCT-3179: CIS headset, potential for not establishing presentation synchronization lock in bidirectional mode If the CIS gateway is reset shortly after the headset has established synchronization lock, this issue might be triggered. @@ -2499,7 +2508,7 @@ OCT-2070: Detection issues with USB-C to USB-C connection **Affected platforms:** nRF5340 Audio DK -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 OCT-2154: USB audio interface does not work correctly on macOS The audio stream is intermittent on the headset side after connecting the gateway to a Mac computer and starting the audio stream. @@ -2507,7 +2516,7 @@ OCT-2154: USB audio interface does not work correctly on macOS **Affected platforms:** nRF5340 Audio DK -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 OCT-2172: The headset volume is not stored persistently This means the volume will fall back to default level after a reset. @@ -2561,7 +2570,7 @@ OCT-2501: Charging over seven hours results in error **Workaround:** To start the charging again, turn the nRF5340 Audio DK off and then on again. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 OCT-2539: Presentation delay might not work as expected under some configurations The data is not presented at the correct time. @@ -2666,14 +2675,14 @@ OCT-2897: Interleaved packing issue **Affected platforms:** nRF5340 Audio DK -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 OCT-3006: Setting a custom bitrate using :kconfig:option:`CONFIG_BT_AUDIO_BITRATE_UNICAST_SINK` will have no effect This is because the application reverts to one of the BAP presets. **Affected platforms:** nRF5340 Audio DK -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 OCT-3248: A race condition between capturing timers and the RTC tick resetting the HF timer This issue might cause time to jump ahead by about 30 µs. @@ -2846,7 +2855,7 @@ NCSDK-33915: The :ref:`direct_test_mode` asserts on nRF54H20 devices **Workaround:** Move the ``errata216_on_wait()`` static function call from the ``radio_start()`` function to the test command handlers in :file:`dtm.c`, which enable radio: ``dtm_vendor_specific_pkt()``, ``dtm_test_receive()``, and ``dtm_test_transmit()``. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 NCSDK-33040: Output power tests running with the Anritsu tester fail This happens with the :ref:`direct_test_mode` sample. @@ -2874,7 +2883,7 @@ NCSDK-18112: :ref:`bluetooth_central_dfu_smp` sample cannot do discovery on the **Workaround:** Enable the legacy LLCP mechanism (:kconfig:option:`CONFIG_BT_LL_SW_LLCP_LEGACY`). -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 NCSDK-19942: HID samples do not work with Android 13 Bluetooth samples and applications that are set up for the HIDS use case and have the Bluetooth Privacy feature enabled (:kconfig:option:`CONFIG_BT_PRIVACY`) disconnect after a short period or enter a connection-disconnection loop when you try to connect to them from a device that is running Android 13. @@ -2884,7 +2893,7 @@ NCSDK-19942: HID samples do not work with Android 13 * :ref:`fast_pair_input_device` * Fast Pair configurations of the :ref:`nrf_desktop` application -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 NCSDK-34682: HID device reconnection may fail on Android 16 when privacy is enabled On Android 16, reconnecting to HID devices with privacy enabled may not work correctly after disconnection. @@ -2900,7 +2909,7 @@ NCSDK-34682: HID device reconnection may fail on Android 16 when privacy is enab **Workaround:** On :ref:`peripheral_hids_mouse`, you can disable the :kconfig:option:`CONFIG_BT_PRIVACY` Kconfig option. Alternatively, you can unpair the device and pair it again. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 v1-2-1 v1-2-0 v1-1-0 v1-0-0 v0-4-0 v0-3-0 NCSDK-26669: Reconnection with HID devices that have privacy enabled might not work on Android 14 If an Android 14 device is disconnected from the HID device without user intervention through the Bluetooth UI from Android settings (for example, due to a connection timeout caused by the HID device rebooting), the device faces issues. @@ -3124,7 +3133,7 @@ Bluetooth Fast Pair samples * NCSDK-34682 * NCSDK-26669 -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34821: Fast Pair samples do not build or run due to the IronSide SE migration The :ref:`fast_pair_input_device` and :ref:`fast_pair_locator_tag` samples are currently incompatible with the latest |NCS| transition to the IronSide SE solution - bundle 22.1.0 and higher for the ``nrf54h20dk/nrf54h20/cpuapp`` board target. @@ -3176,7 +3185,7 @@ NCSDK-32703: :zephyr:code-sample:`ble_mesh_provisioner` sample gives MPU fault d **Workaround:** It is recommended to set the value of the :kconfig:option:`CONFIG_BT_MESH_ADV_STACK_SIZE` Kconfig to 2048. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 NCSDK-26844: :ref:`ble_mesh_dfu_distributor` sample is not able to complete self-update When attempting to use the :ref:`ble_mesh_dfu_distributor` sample to perform a self-update, the DFU process is not completed successfully. @@ -3211,7 +3220,7 @@ NCSDK-21590: :ref:`bluetooth_mesh_sensor_client` sample does not compile for nRF Cellular samples ================ -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 IRIS-10159: nRF Cloud logging not working in the :ref:`nrf_cloud_rest_device_message` sample The sample does not react to runtime log level setting from the cloud side. @@ -3290,7 +3299,7 @@ Matter samples The issues in this section are related to :ref:`matter_samples`. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 KRKNWK-20691: The :ref:`matter_lock_sample` sample does not update LED state on auto-relock The sample does not update the LED state to on after auto-relock timeout. @@ -3304,7 +3313,7 @@ KRKNWK-19806: RPU recovery fails on the nRF5340 DK with nRF7002 EK shield due to **Workaround:** Cherry-pick changes from PR #19826 in the `sdk-nrf`_ repository. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-0 +.. rst-class:: v2-9-0-nRF54H20-1 v2-9-0 KRKNWK-19861: ICD DSLS does not work with the :ref:`matter_smoke_co_alarm_sample` sample According to the sample's documentation the ICD DSLS can be enabled by setting the :kconfig:option:`CONFIG_CHIP_ICD_DSLS_SUPPORT` Kconfig option to ``y``. @@ -3389,7 +3398,7 @@ NCSDK-20967: The :ref:`nrf_rpc_entropy_nrf53` sample does not work on the networ Peripheral samples ================== -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 NCSDK-30519: The :ref:`radio_test` sample reports high packet error rate on the long-range data rates Packet error rate is very high in the receive mode when using the ``BLE_LR125KBIT`` and ``BLE_LR500KBIT`` data rates. @@ -3423,7 +3432,7 @@ NCSDK-30284: The :ref:`radio_test` sample only transmits the first burst of data Other samples ============= -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34698: CoreMark sample does not build or run due to the IronSide SE migration The :ref:`coremark_sample` sample is currently incompatible with the latest |NCS| transition to the IronSide SE solution - bundle 22.1.0 and higher for the ``nrf54h20dk/nrf54h20/cpuapp`` board target. @@ -3680,7 +3689,7 @@ NCSDK-15512: Modem traces retrieval incompatible with TF-M Libraries for networking ======================== -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 IRIS-10140: CoAP error message: No client found for socket When the :kconfig:option:`CONFIG_NRF_CLOUD_COAP_DOWNLOADS` Kconfig option is enabled, an error "No client found for socket" can appear, depending on how the :ref:`CoAP client ` library is used for authentication. @@ -3718,7 +3727,7 @@ NCSDK-28192: Hardfault in :c:func:`coap_codec_agnss_encode` ** Workaround:** Apply the fix from `sdk-nrf PR #16242`_. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 CIA-351: Connectivity issues with :ref:`lib_azure_iot_hub` If a ``device-bound`` message is sent to the device while it is in the LTE Power Saving Mode (PSM), the TCP connection will most likely be terminated by the server. @@ -3750,7 +3759,7 @@ NCSDK-23315: The :ref:`bt_le_adv_prov_readme` has an incorrect range and default **Workaround:** Manually cherry-pick and apply the commit with the fix from the ``main`` branch (commit hash: ``a8b668e82837295962348e9e681125c2ae11bb4e``). -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 NCSDK-23682: The Fast Pair Seeker might be unable to bond again after losing the bonding information multiple times If the :kconfig:option:`CONFIG_BT_SETTINGS_CCC_LAZY_LOADING` Kconfig option is disabled on the Fast Pair Provider side, the Fast Pair Seeker that uses the RPA address to connect with the Provider might be unable to bond again after losing the bonding information multiple times. @@ -3812,7 +3821,7 @@ The time returned by :ref:`lib_date_time` library becomes incorrect after one we Security ======== -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-29559: KMU slots 0-2 cannot be used to store keys in nRF54L15 The application cannot use KMU slots 0-2 to store keys in the nRF54L15. @@ -3829,7 +3838,7 @@ Build system The issues in this section are related to :ref:`app_build_system`. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 v1-3-2 v1-3-1 v1-3-0 Microsoft PC Manager’s real-time scanning can severely impact NCS build performance on Windows 11 MsPcManagerService (from Microsoft PC Manager) is constantly scanning several files during compilation. @@ -3839,7 +3848,7 @@ Microsoft PC Manager’s real-time scanning can severely impact NCS build perfor For older Windows versions, check your antivirus system. It might slow down the build process. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 VSC-2974: On Windows, some sample paths are too long The maximum full path to an object file is 250 characters. @@ -3853,7 +3862,7 @@ VSC-2974: On Windows, some sample paths are too long Import :file:`C:\ncs\sample-dev` to VS-Code, and the build should work. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-30119: For nRF54L15 SoC, dynamic partitioning for a project building with MCUboot's direct-xip mode is not supported Static partition manager file is required for building such project. @@ -3876,7 +3885,7 @@ NCSDK-28462: MCUboot signing configuration cannot be updated without pristine bu **Workaround:** Perform a :ref:`pristine build ` to change any of the MCUboot signing configuration. Do not update it using menuconfig, guiconfig or the nRF Kconfig GUI, and instead :ref:`provide it on the command line ` when configuring the application if it needs setting manually. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 NCSDK-28461: Sysbuild partition manager file changes cannot be propagated to builds unless they are pristine When using :ref:`configuration_system_overview_sysbuild` and a :ref:`partition_manager` file, the Partition Manager configuration for things such as MCUboot signing will not be updated if the Partition Manager configuration is changed in an already configured project. @@ -4030,14 +4039,14 @@ Bootloader The issues in this section are related to :ref:`app_bootloaders`. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 NCSDK-19265: Monotonic counter update protection counter limit does not work The rollback protection in NSIB does not validate counter values if the values cannot be retrieved correctly or if they are larger than the largest supported value. In such a case, the image booted might be one whose values is lower than expected NV counter value or a device can be updated more times than expected by the :kconfig:option:`CONFIG_SB_NUM_VER_COUNTER_SLOTS` Kconfig option. This issue affects all devices running NSIB. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 NCSDK-31918: NSIB active slot function can give invalid results The function for getting the active s0 or s1 slot only checks the :c:struct:`fw_info` structure. @@ -4247,7 +4256,7 @@ NCSDK-18422: Serial recovery fails to write to slots in QSPI NCSDK-18108: ``s1`` variant image configuration mismatch If an image with an ``s1`` variant is configured and the ``s0`` image configuration is changed using menuconfig, these changes will not be reflected in the ``s1`` configuration, which can lead to a differing build configuration or the build does not upgrade. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 NCSDK-11308: Powering off device immediately after serial recovery of the nRF53 network core firmware results in broken firmware The network core will not be able to boot if the device is powered off too soon after completing a serial recovery update procedure of the network core firmware. @@ -4364,7 +4373,23 @@ MCUboot The issues in this section are related to :ref:`MCUboot `. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 + +NCSDK-35259 Upgrade failed when encryption was enabled + Encryption is currently not supported for nRF54LM20. + + **Affected platforms:** nRF54LM20 + +.. rst-class:: v3-1-1 + +NCSDK-34251 Device fails to boot when downgrade limit is reached + The device will not boot when Hardware Downgrade Prevention reaches the number of available upgrades. + + **Affected platforms:** nRF54LM20 + + **Workaround:** Cherry-pick changes from PR #23779 in the `sdk-nrf`_ repository. + +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34928: Confirmation of ``ipc_radio`` image fails when test and confirm are done for both images in one cycle on the nRF54H20 When the test is triggered for both firmware images, it is not possible to confirm ``ipc_radio`` image after restart. @@ -4373,7 +4398,7 @@ NCSDK-34928: Confirmation of ``ipc_radio`` image fails when test and confirm are **Workaround:** Apply test and confirm for ``ipc_radio`` in next boot cycle (after restart). -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34594: MCUboot might hang and is failing on FPROTECT assertion when using external flash FPROTECT can support locking up to 62 KB of RRAM on nRF54L SoCs when used by immutable MCUboot. @@ -4384,7 +4409,7 @@ NCSDK-34594: MCUboot might hang and is failing on FPROTECT assertion when using **Workaround:** Decrease MCUboot partition size or disable FPROTEC. -.. rst-class:: v3-1-0 +.. rst-class:: v3-1-1 v3-1-0 NCSDK-34894: Reset during "Swap with scratch" may not recover correct swap status After a reset during "Swap with scratch" operation, the current swap status may not recover correctly, leading to unnecessary flash writes. @@ -4409,7 +4434,7 @@ NCSDK-33207: MCUboot has its NVM protection disabled **Workaround:** Enable protection manually using the :kconfig:option:`CONFIG_FPROTECT` and :kconfig:option:`CONFIG_FPROTECT_ALLOW_COMBINED_REGIONS` Kconfig options of MCUboot. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 NCSDK-29460: Encryption: Build error for default configuration on the ``nrf52840dk/nrf52840`` board target (ECDSA_P256) This happens because of inconsistency in the configuration of the signature check and the encryption key extraction: both must use the same base encryption algorithm. @@ -4454,7 +4479,7 @@ NCSDK-20567: Partitioning limitation with MCUboot swap move Typically, for the nRF52, nRF53, and nRF91 devices, the size of the application must be less than ``mcuboot_primary_size - 80 - (mcuboot_primary_size/ 4096) * 12 -4096``. Some additional margin is suggested. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 NCSIDB-1194: MCUboot not properly disabling UARTE instances Increased power consumption might be observed (400 µA). @@ -4504,7 +4529,7 @@ Crypto The issues in this section are related to :ref:`nrfxlib:crypto`. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 NSCDK-26412: Updating to TF-M 2.0 using Mbed TLS 3.5.2 introduced a regression in resolving legacy crypto configurations from ``PSA_WANT_ALG_XXXX`` configurations Wi-Fi samples enabling OpenThread are affected by this bug as well as possible use cases with a dependency on some legacy features while using PSA crypto APIs. @@ -4528,7 +4553,7 @@ NCSDK-22091: Selecting both :kconfig:option:`CONFIG_NORDIC_SECURITY_BACKEND` and **Workaround:** Manually define ``PSA_CORE_BUILTIN`` in the file :file:`nrf_security/configs/legacy_crypto_config.h.template`. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 NCSDK-22593: Selecting :kconfig:option:`CONFIG_PSA_WANT_ALG_CCM` without :kconfig:option:`CONFIG_MBEDTLS_AES_C` causes a build failure Selecting :kconfig:option:`CONFIG_PSA_WANT_ALG_CCM` without :kconfig:option:`CONFIG_MBEDTLS_AES_C` results in a build failure due to unsatisfied dependencies in :file:`check_config.h`. @@ -4767,7 +4792,7 @@ DRGN-25262: The default value of the :kconfig:option:`CONFIG_MPSL_HFCLK_LATENCY` **Workaround:** Increase the configured HFXO startup time to 1650 microseconds. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-0 UARTE will have a frequency error beyond the specific limits In low temperatures and if :ref:`nrfxlib:mpsl` (MPSL) (Bluetooth LE, 802.15.4) is not used, UARTE will have a frequency error beyond the specific limits. @@ -4781,14 +4806,14 @@ UARTE will have a frequency error beyond the specific limits DRGN-22314: MPSL can encounter fatal errors and crashes when used without SoftDevice Controller or the :ref:`nrfxlib:nrf_802154` This happens because of the of the allocation functions in the files :file:`nrfx_ppi.h` and :file:`nrfx_dppi.h` can allocate channels reserved by MPSL. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 DRGN-18247: Assertion with :c:enumerator:`MPSL_CLOCK_HF_LATENCY_BEST` When setting the ramp-up time of the high-frequency crystal oscillator with :c:enumerator:`MPSL_CLOCK_HF_LATENCY_BEST`, an assert in MPSL occurs. **Workaround:** Use :c:enumerator:`MPSL_CLOCK_HF_LATENCY_TYPICAL` instead of :c:enumerator:`MPSL_CLOCK_HF_LATENCY_BEST` when setting the time it takes for the HFCLK to ramp up. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 DRGN-15979: :kconfig:option:`CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION` must be set when :kconfig:option:`CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC` is set MPSL requires RC clock calibration to be enabled when the RC clock is used as the Low Frequency clock source. @@ -4799,7 +4824,7 @@ DRGN-14153: Radio Notification power performance penalty The Radio Notification feature has a power performance penalty proportional to the notification distance. This means an additional average current consumption of about 600 µA for the duration of the radio notification. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 v1-5-2 v1-5-1 v1-5-0 v1-4-2 v1-4-1 v1-4-0 KRKNWK-8842: MPSL does not support nRF21540 revision 1 or older The nRF21540 revision 1 or older is not supported by MPSL. @@ -4880,7 +4905,7 @@ DRGN-11059: Front-end module API not implemented for SoftDevice Controller The issues in this section are related to :ref:`nrfxlib:nrf_802154`. In addition to the known issues listed here, see also :ref:`802.15.4 Radio driver limitations ` for permanent limitations. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 KRKNWK-19335: nRF 802.15.4 Radio Driver incorrectly reports an ``INVALID_FCS`` error if a frame is dropped while all receive buffers are full The nRF 802.15.4 Radio Driver reports an unjustified ``INVALID_FCS`` error in a specific scenario where at least one frame is dropped while the receive buffers limit is reached. @@ -4977,7 +5002,7 @@ KRKNWK-6255: RSSI parameter adjustment is not applied **Workaround:** To apply RSSI parameter adjustments, cherry-pick the commits in `hal_nordic PR #88 `_, `sdk-nrfxlib PR #381 `_, and `sdk-zephyr PR #430 `_. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 KRKNWK-19974: CCA ED threshold is not optimal The default configuration value of :kconfig:option:`CONFIG_NRF_802154_CCA_ED_THRESHOLD` was not optimal and should be adjusted to correspond to -75 dBm. @@ -4995,6 +5020,22 @@ SoftDevice Controller The issues in this section are related to :ref:`nrfxlib:softdevice_controller`. In addition to the known issues listed here, see also :ref:`softdevice_controller_limitations` for permanent limitations. +.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 + +DRGN-26138: Using the radio in timeslots may lead to undefined behavior in the controller + + The controller may show reduced performance when EVENT registers are not cleared in timeslots or are set before the controller is enabled. + + **Affected platforms:** nRF54L and nRF54H Series + + **Workaround:** Clear the following radio events after using the radio in a timeslot: + + * ``EVENTS_READY`` + * ``EVENTS_END`` + * ``EVENTS_DISABLED`` + * ``EVENTS_ADDRESS`` + * ``EVENTS_PAYLOAD`` + .. rst-class:: v3-0-2 v3-0-1 v3-0-0 v2-9-0 DRGN-25859: The controller may stop raising advertising reports to the host while scanning for extended advertising packets @@ -5183,7 +5224,7 @@ DRGN-21962: Assert when using SPI FEM with Coded PHY on nRF53 Series devices **Affected platforms:** nRF5340, Thingy:53 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 DRGN-21293: The LE Read ISO TX Sync command is implemented according to the raised errata ES-23138 In ES-23138, the return parameter ``TX_Time_Stamp`` is used as the SDU synchronization reference of the SDU previously scheduled for transmission. @@ -5291,7 +5332,7 @@ DRGN-17562: One of the LE Transmit Power Reporting Events might not be reported When multiple LE Transmit Power Reporting Events are generated at the same time for the same PHY, one of these events will be missed. This will occur only when there are simultaneous remote and local power level changes on the same PHY. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 DRGN-19039: Multirole advertiser not seen by peer in some cases This can happen when the controller attempts to reschedule the advertising events due to scheduling conflicts with the scanner or initiator and both of the following apply: @@ -5394,7 +5435,7 @@ DRGN-18655: Wrongly set the address if calling :c:func:`bt_ctlr_set_public_addr` DRGN-18568: Using :kconfig:option:`CONFIG_MPSL_FEM` Kconfig option lowers the value of radio output power The actual value is lower than the default one in case the :kconfig:option:`CONFIG_BT_CTLR_TX_PWR_ANTENNA` or :kconfig:option:`CONFIG_BT_CTLR_TX_PWR` Kconfig options are used together with the :kconfig:option:`CONFIG_MPSL_FEM` Kconfig option. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 DRGN-16013: Initiating connections over extended advertising is not supported when external radio coexistence and FEM support are enabled The initiator can assert when initiating a connection to an extended advertiser when both external radio coexistence and FEM are enabled. @@ -5895,7 +5936,7 @@ Trusted Firmware-M (TF-M) The issues in this section are related to the TF-M implementation in the |NCS|. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 NCSDK-29095: Writing assets to NVM using TF-M causes increased interrupt latencies Writes to NVM provoke increased latencies even for the highest-priority interrupts. @@ -5910,7 +5951,7 @@ NCSDK-29095: Writing assets to NVM using TF-M causes increased interrupt latenci **Workaround:** Write persistent assets using the PSA APIs only when there are no ongoing time-critical operations. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 CIA-1182: TF-M flash partition overflow When building for Thingy:91 and enabling debug optimizations (or enabling Debug build in the VS code extension), the TF-M flash partition will overflow. @@ -5970,7 +6011,7 @@ NRFJPROG-454: TF-M might fail to reset when using nrfjprog version 10.22.x on nR nrfjprog -f nrf91 --debugreset -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 NCSDK-18321: TF-M PSA architecture tests do not build with CMake v3.25.x The :ref:`tfm_psa_test` fails to build with CMake version 3.25.x with missing header files. @@ -6078,7 +6119,7 @@ NCSDK-12483: Missing debug symbols NCSDK-12342: Potential SecureFault exception while accessing protected storage When accessing protected storage, a SecureFault exception is sometimes triggered and execution halts. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 NCSDK-11195: Build errors when enabling :kconfig:option:`CONFIG_BUILD_WITH_TFM` option Enabling the :kconfig:option:`CONFIG_BUILD_WITH_TFM` Kconfig option in SES project configuration or using ``west -t menuconfig`` results in build errors. @@ -6253,7 +6294,7 @@ NCSDK-33153: nRF54L15 rev2 tools update **Affected platforms:** nRF54L -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 HM-25973: SysCtrl does not always wake up when an interrupt is triggered by sending an IPC message through the local domains A problem related to communication between local domains and sysctrl core. @@ -6264,7 +6305,7 @@ HM-25973: SysCtrl does not always wake up when an interrupt is triggered by send **Workaround:** Each IPC TX interrupt is automatically retriggered once after a 12 µs delay. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 KRKNWK-31013: Issues with ``nrfutil trace`` and missing STM stream information on the nRF54H20 SoC While running ``nrfutil trace`` without resetting any domain, the tool can synchronize against Coresight packets and the underlying STPv2 protocol. @@ -6273,7 +6314,7 @@ KRKNWK-31013: Issues with ``nrfutil trace`` and missing STM stream information o **Affected platforms:** nRF54H20 -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 KRKNWK-31038: Instruction trace reliability issues during ETM debugging on the nRF54H20 SoC During ETM debugging, disconnecting and reconnecting to the device often causes the instruction trace to fail to appear reliably. @@ -6281,7 +6322,7 @@ KRKNWK-31038: Instruction trace reliability issues during ETM debugging on the n **Affected platforms:** nRF54H20 - .. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 + .. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-28152: TPIU Trace Signal Skew on the nRF54H20 SoC Segger TPIU tracing on the nRF54H20 DK encounters instability due to a minimal skew between clock and data signals. @@ -6290,7 +6331,7 @@ NCSDK-28152: TPIU Trace Signal Skew on the nRF54H20 SoC **Workaround:** Adjusting the TPIU trace delay on SEGGER's J-Trace Pro can improve signal stability, enhancing ETM capture reliability. For more information on adjusting trace timing, refer to the SEGGER Wiki's `Adjusting Trace Timings and General Troubleshooting`_ section. -.. rst-class:: v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 +.. rst-class:: v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 NCSDK-30095: Cannot flash a device if the ``nrfutil device x-adac-discovery`` command is called before flashing It leaves the device into ``RomOperation`` mode. @@ -6378,7 +6419,7 @@ KRKNWK-16503: OTA DFU using the iOS Home app (over UARP) does not work on the nR **Workaround:** Manually cherry-pick and apply commit from the main branch (commit hash: ``09874a36edf21ced7d3c9356de07df6f0ff3d457``). -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 KRKNWK-13010: Dropping from Thread to Bluetooth LE takes too long Dropping from Thread to Bluetooth LE, after a Thread Border Router is powered off, takes much longer for FTD accessories than estimated in TCT030 test case. @@ -6415,14 +6456,14 @@ NCSDK-13947: Net core downgrade prevention does not work on nRF5340 KRKNWK-13607: Stateless switch application crashes upon factory reset When running Thread test suit on the stateless switch application, the CI crashes upon factory reset. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 KRKNWK-13249: Unexpected assertion in HAP Bluetooth Peripheral Manager When Bluetooth LE layer emits callback with a connect or disconnect event, one of its parameters is an underlying Bluetooth LE connection object. On rare occasions, this connection object is no longer valid by the time it is processed in HomeKit, and this results in assertion. There is no proven workaround yet. -.. rst-class:: wontfix v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 +.. rst-class:: wontfix v3-1-1 v3-1-0 v3-0-2 v3-0-1 v3-0-0 v2-9-0-nRF54H20-1 v2-9-2 v2-9-1 v2-9-0 v2-8-0 v2-7-0 v2-6-4 v2-6-3 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0 v1-9-2 v1-9-1 v1-9-0 v1-8-0 v1-7-1 v1-7-0 v1-6-1 v1-6-0 KRKNWK-11729: Stateless switch event characteristic value not handled according to specification in Bluetooth LE mode The stateless programmable switch application does not handle the value of the stateless switch event characteristic in the Bluetooth LE mode according to the specification. diff --git a/doc/nrf/releases_and_maturity/release_notes.rst b/doc/nrf/releases_and_maturity/release_notes.rst index cc3f1b0d23e2..767db4b199c0 100644 --- a/doc/nrf/releases_and_maturity/release_notes.rst +++ b/doc/nrf/releases_and_maturity/release_notes.rst @@ -21,6 +21,7 @@ This page is included only in the latest documentation, because it might contain :caption: Subpages: releases/release-notes-changelog + releases/release-notes-3.1.1 releases/release-notes-3.1.0 releases/release-notes-3.1.0-preview3 releases/release-notes-3.1.0-preview2 diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview1.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview1.rst index 3e11d79a85a2..9bb4a1f5009c 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview1.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview1.rst @@ -91,8 +91,6 @@ Developing with Front-End Modules * Added support for the following: - * :ref:`nRF2220 Front-End Module `. - * :ref:`nRF2220 EK shield `. * :ref:`nRF21540 Front-End Module in GPIO mode ` for the nRF54L Series devices. Developing with PMICs diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview2.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview2.rst index 9a19cee4c302..9e36094e9134 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview2.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0-preview2.rst @@ -111,8 +111,6 @@ Developing with Front-End Modules * Added support for the following: - * :ref:`nRF2220 Front-End Module `. - * :ref:`nRF2220 EK shield `. * :ref:`nRF21540 Front-End Module in GPIO mode ` for the nRF54L Series devices. Developing with PMICs @@ -428,7 +426,6 @@ Bluetooth samples * Added: * Loading of radio trims and a fix of a hardware errata for the nRF54H20 SoC to improve the RF performance. - * Support for the :ref:`nRF2220 front-end module `. * :ref:`central_uart` sample: @@ -640,7 +637,6 @@ Peripheral samples * Added: * Loading of radio trims and a fix of a hardware errata for the nRF54H20 SoC to improve the RF performance. - * Support for the :ref:`nRF2220 front-end module `. PMIC samples ------------ diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0.rst index 5aedd17d0f52..3ab77a70e66c 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.0.0.rst @@ -273,8 +273,6 @@ Developing with Front-End Modules * Added support for the following: - * :ref:`nRF2220 Front-End Module `. - * :ref:`nRF2220 EK shield `. * :ref:`nRF21540 Front-End Module in GPIO mode ` for the nRF54L Series devices. * Fixed an issue for the nRF21540 Front-End Module (for GPIO and GPIO+SPI modes) when spurious emission occurred due to late activation of the ``TX_EN`` pin. @@ -649,7 +647,6 @@ Bluetooth samples * Added: * Loading of radio trims and a fix of a hardware errata for the nRF54H20 SoC to improve the RF performance. - * Support for the :ref:`nRF2220 front-end module `. * Workaround for the hardware errata HMPAN-216 for the nRF54H20 SoC. * :ref:`central_uart` sample: @@ -892,7 +889,6 @@ Peripheral samples * Added: * Loading of radio trims and a fix of a hardware errata for the nRF54H20 SoC to improve the RF performance. - * Support for the :ref:`nRF2220 front-end module `. * Workaround for the hardware errata HMPAN-216 for the nRF54H20 SoC. PMIC samples diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview1.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview1.rst index b472abb3a536..659cdfce3948 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview1.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview1.rst @@ -100,7 +100,7 @@ Developing with PMICs Developing with Front-End Modules ================================= -* Added the temperature compensation feature for the nRF2220 Front-End Module. +|no_changes_yet_note| Developing with custom boards ============================= diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview2.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview2.rst index 6bfd8e4c9a83..70ad85ba94be 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview2.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview2.rst @@ -104,7 +104,7 @@ Developing with PMICs Developing with Front-End Modules ================================= -* Added the temperature compensation feature for the nRF2220 Front-End Module. +|no_changes_yet_note| Developing with custom boards ============================= diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview3.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview3.rst index f354d7a61dfc..f37aba7bee2b 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview3.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0-preview3.rst @@ -107,7 +107,6 @@ Developing with Front-End Modules * Added: - * The temperature compensation feature for the nRF2220 Front-End Module. * Support for the nRF21540 Front-End Module in GPIO/SPI mode for nRF54L Series devices. Developing with custom boards diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0.rst index f7b0e677bbd5..17c17f419494 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.0.rst @@ -243,7 +243,6 @@ Developing with Front-End Modules * Added: - * The temperature compensation feature for the nRF2220 Front-End Module. * Support for the nRF21540 Front-End Module in GPIO/SPI mode for nRF54L Series devices. * Support for the Simple GPIO Front-End Module for nRF54L Series devices. diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-3.1.1.rst b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.1.rst new file mode 100644 index 000000000000..91f5a1e380f3 --- /dev/null +++ b/doc/nrf/releases_and_maturity/releases/release-notes-3.1.1.rst @@ -0,0 +1,214 @@ +.. _ncs_release_notes_3.1.1: + +|NCS| v3.1.1 Release Notes +########################## + +.. contents:: + :local: + :depth: 2 + +|NCS| delivers reference software and supporting libraries for developing low-power wireless applications with Nordic Semiconductor products in the nRF52, nRF53, nRF54, nRF70, and nRF91 Series. +The SDK includes open source projects (TF-M, MCUboot, OpenThread, Matter, and the Zephyr RTOS), which are continuously integrated and redistributed with the SDK. + +Release notes might refer to "experimental" support for features, which indicates that the feature is incomplete in functionality or verification, and can be expected to change in future releases. +To learn more, see :ref:`software_maturity`. + +Highlights +********** + +This patch release adds the following changes on top of the :ref:`nRF Connect SDK v3.1.0 `: + +This is the first release of the |NCS| that brings comprehensive :ref:`experimental ` support for the nRF54LM20 DK and nRF54LM20A SoC. +See the `nRF54LM20A System-on-Chip`_ page to learn more. + +* This release provides experimental support for the nRF54LM20A SoC with the following features: + + * Protocols: + + * Bluetooth® LE, including Channel Sounding + * 2.4 Ghz proprietary + * Thread 1.4 + * Matter-over-Thread 1.4.2 + + * All nRF54LM20A SoC peripherals, including the new USB-HS interface. + * DFU with MCUboot enabling dual-bank DFU with optional external flash. + * Hardware crypto provided by :ref:`PSA Crypto APIs (hardware accelerated) ` for cryptographic operations. + * Google Find My Device and Apple Find My for members of the Apple and Google programs. + * Out-of-the-box support across many standard SDK samples. + +* Matter: + + * Included fixes to achieve compatibility with Matter 1.4.2 Test Harness and to pass the following Matter certification test cases: + + * TC-IDM-10.3 + * TC-OPCREDS-3.8 + +* PMIC: + + * Added nPM1304 support to the :ref:`npm13xx_fuel_gauge` and :ref:`npm13xx_one_button` samples. + +* Cellular: + + * Added support for the Sercomm TPM530M module and the TPM530M EVK. + +See :ref:`ncs_release_notes_311_changelog` for the complete list of changes. + +Release tag +*********** + +The release tag for the |NCS| manifest repository (|ncs_repo|) is **v3.1.1**. +Check the :file:`west.yml` file for the corresponding tags in the project repositories. + +To use this release, check out the tag in the manifest repository and run ``west update``. +See :ref:`cloning_the_repositories` and :ref:`gs_updating_repos_examples` for more information. + +For information on the included repositories and revisions, see `Repositories and revisions for v3.1.1`_. + +IDE and tool support +******************** + +`nRF Connect extension for Visual Studio Code `_ is the recommended IDE for |NCS| v3.1.1. +See the :ref:`installation` section for more information about supported operating systems and toolchain. + +Supported modem firmware +************************ + +See `Modem firmware compatibility matrix`_ for an overview of which modem firmware versions have been tested with this version of the |NCS|. + +Use the latest version of the `Programmer app`_ of `nRF Connect for Desktop`_ to update the modem firmware. +See :ref:`nrf9160_gs_updating_fw_modem` for instructions. + +Modem-related libraries and versions +==================================== + +.. list-table:: Modem-related libraries and versions + :widths: 15 10 + :header-rows: 1 + + * - Library name + - Version information + * - Modem library + - `Changelog `_ + * - LwM2M carrier library + - `Changelog `_ + +Known issues +************ + +Known issues are only tracked for the latest official release. +See `known issues for nRF Connect SDK v3.1.1`_ for the list of issues valid for the latest release. + +.. _ncs_release_notes_311_changelog: + +Changelog +********* + +The following sections provide detailed lists of changes by component. + +IDE, OS, and tool support +========================= + +* Added macOS 26 support (Tier 3) to the table listing :ref:`supported operating systems for proprietary tools `. +* Updated the required `SEGGER J-Link`_ version to v8.60. + +Developing with PMICs +===================== + +* Added the :ref:`ug_npm1304_developing` documentation. + +Developing with coprocessors +============================ + +* Added support for the nRF54LM20 FLPR. + +Security +======== + +* Added CRACEN and nrf_oberon driver support for nRF54LM20. + For the list of supported features and limitations, see the :ref:`ug_crypto_supported_features` page. + +Protocols +========= + +This section provides detailed lists of changes by :ref:`protocol `. + +Matter +------ + +* Added support for the :zephyr:board:`nrf54lm20dk` board. +* Included fixes for the following certification test cases: + + * TC-IDM-10.3 + * TC-OPCREDS-3.8 + +Applications +============ + +This section provides detailed lists of changes by :ref:`application `. + +nRF Desktop +----------- + +* Added application configurations for the :zephyr:board:`nrf54lm20dk` board. + The configurations are supported through the ``nrf54lm20dk/nrf54lm20a/cpuapp`` board target. + For details, see the :ref:`nrf_desktop_board_configuration` page. + The :zephyr:board:`nrf54lm20dk` board support is experimental. + +Samples +======= + +This section provides detailed lists of changes by :ref:`sample `. + +Bluetooth samples +----------------- + +* Added experimental support for the :zephyr:board:`nrf54lm20dk` board in the following samples: + + * :ref:`bluetooth_central_hids` + * :ref:`peripheral_hids_keyboard` + * :ref:`peripheral_hids_mouse` + +Bluetooth Fast Pair samples +--------------------------- + +* Added experimental support for the :zephyr:board:`nrf54lm20dk` board in all Fast Pair samples. + +Matter samples +-------------- + +* Added support for the :zephyr:board:`nrf54lm20dk` board in all Matter samples. + +PMIC samples +------------ + +* Updated: + + * By renaming the nPM1300: Fuel Gauge sample to :ref:`npm13xx_fuel_gauge`. + The wiring is changed for all targets. + Refer to the :ref:`Wiring table ` in the sample documentation for details. + * By renaming the nPM1300: One button sample to :ref:`npm13xx_one_button`. + The wiring is changed for all targets. + Refer to the :ref:`Wiring table ` in the sample documentation for details. + +Thread samples +-------------- + +* Added support for the :zephyr:board:`nrf54lm20dk` board in the :ref:`ot_cli_sample` and :ref:`ot_coprocessor_sample` samples. + +Other samples +------------- + +* :ref:`coremark_sample` sample: + + * Added support for the :zephyr:board:`nrf54lm20dk` board. + +Zephyr +====== + +The Zephyr fork in |NCS| (``sdk-zephyr``) contains all commits from the upstream Zephyr repository up to and including ``0fe59bf1e4b96122c3467295b09a034e399c5ee6``. + +For a complete list of |NCS| specific commits and cherry-picked commits since v3.1.0, run the following command: + +.. code-block:: none + + git log --oneline manifest-rev ^ncs-v3.1.0 diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 3f357a993eef..9187b88ab982 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -135,6 +135,8 @@ Security :kconfig:option:`CONFIG_TFM_PARTITION_CRYPTO` with Trusted Firmware-M (TF-M) through the :kconfig:option:`CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE` Kconfig option. + * Support for AES in counter mode using CRACEN for the :zephyr:board:`nrf54lm20dk`. + Protocols ========= @@ -371,12 +373,18 @@ Cellular samples * :ref:`modem_shell_application` sample: - * Added support for NTN NB-IoT to the ``link sysmode`` and ``link edrx`` commands. + * Added: + + * Support for environment evaluation using the ``link enveval`` command. + * Support for NTN NB-IoT to the ``link sysmode`` and ``link edrx`` commands. Cryptography samples -------------------- -|no_changes_yet_note| + +* :ref:`crypto_aes_ctr` sample: + + * Added support for ``nrf54lm20dk/nrf54lm20a/cpuapp``. Debug samples ------------- @@ -391,7 +399,10 @@ DECT NR+ samples DFU samples ----------- -* Added the :ref:`dfu_multi_image_sample` sample to demonstrate how to use the :ref:`lib_dfu_target` library. +* Added: + + * The :ref:`dfu_multi_image_sample` sample to demonstrate how to use the :ref:`lib_dfu_target` library. + * The :ref:`ab_sample` sample to demonstrate how to implement the A/B firmware update strategy using :ref:`MCUboot `. Edge Impulse samples -------------------- @@ -434,7 +445,15 @@ Matter samples Networking samples ------------------ -|no_changes_yet_note| +* Added support for the nRF7002-EB II with the ``nrf54lm20dk/nrf54lm20a/cpuapp`` board target in the following samples: + + * :ref:`aws_iot` + * :ref:`net_coap_client_sample` + * :ref:`download_sample` + * :ref:`http_server` + * :ref:`https_client` + * :ref:`mqtt_sample` + * :ref:`udp_sample` NFC samples ----------- @@ -570,6 +589,7 @@ Modem libraries * Added: + * Support for environment evaluation. * Support for NTN NB-IoT system mode. * eDRX support for NTN NB-IoT. diff --git a/doc/nrf/releases_and_maturity/software_maturity.rst b/doc/nrf/releases_and_maturity/software_maturity.rst index 90e5fdb5092b..24280c0618d4 100644 --- a/doc/nrf/releases_and_maturity/software_maturity.rst +++ b/doc/nrf/releases_and_maturity/software_maturity.rst @@ -3033,10 +3033,6 @@ The following table indicates the software maturity levels of the support for Fr - Implementation - nRF52833 - nRF52840 - * - nRF2220 - - nRF2220 - - Supported - - Supported * - nRF21540 - nRF21540 GPIO - Supported @@ -3059,9 +3055,6 @@ The following table indicates the software maturity levels of the support for Fr * - FEM device - Implementation - nRF5340 - * - nRF2220 - - nRF2220 - - Supported * - nRF21540 - nRF21540 GPIO - Supported @@ -3083,11 +3076,6 @@ The following table indicates the software maturity levels of the support for Fr - nRF54L10 - nRF54L15 - nRF54LM20 - * - nRF2220 - - nRF2220 - - Supported - - Supported - - Supported * - nRF21540 - nRF21540 GPIO - Supported diff --git a/doc/nrf/samples/matter.rst b/doc/nrf/samples/matter.rst index bfc6f94b3314..52e4666f1525 100644 --- a/doc/nrf/samples/matter.rst +++ b/doc/nrf/samples/matter.rst @@ -123,3 +123,4 @@ In addition to these samples, check also the following Matter applications: ../../../samples/matter/*/README ../../../samples/matter/common/config + ../../../samples/matter/common/config_matter_stack diff --git a/doc/nrf/security/crypto/crypto_supported_features.rst b/doc/nrf/security/crypto/crypto_supported_features.rst index 4e7fc078de76..8ae569a8c954 100644 --- a/doc/nrf/security/crypto/crypto_supported_features.rst +++ b/doc/nrf/security/crypto/crypto_supported_features.rst @@ -1912,7 +1912,7 @@ The options are grouped by Series and drivers available for the device Series, a - Supported - Supported - Supported - - Experimental (with exceptions, see note) + - Experimental * - CCM* no tag - :kconfig:option:`CONFIG_PSA_WANT_ALG_CCM_STAR_NO_TAG` - -- @@ -1937,11 +1937,6 @@ The options are grouped by Series and drivers available for the device Series, a * Multi-part encrypt and decrypt APIs are not supported. - * For CTR cipher mode: - - * Only single-part full-block encryption is supported. - * A maximum of 32 bytes of plaintext or ciphertext is supported. - .. tab:: nrf_oberon .. list-table:: Cipher mode support per device (nrf_oberon driver) - nRF54 Series diff --git a/doc/versions.json b/doc/versions.json index 0361b0e0e04a..6ab2f49cd6b0 100644 --- a/doc/versions.json +++ b/doc/versions.json @@ -1,5 +1,6 @@ [ "3.1.99", + "3.1.1", "3.1.0", "3.1.0-preview3", "3.1.0-preview2", diff --git a/dts/common/nordic/nrf7120_enga.dtsi b/dts/common/nordic/nrf7120_enga.dtsi index db7daeeba47d..b24977ed2657 100644 --- a/dts/common/nordic/nrf7120_enga.dtsi +++ b/dts/common/nordic/nrf7120_enga.dtsi @@ -6,6 +6,7 @@ #include #include +#include /delete-node/ &sw_pwm; @@ -112,7 +113,7 @@ ficr: ficr@ffc000 { compatible = "nordic,nrf-ficr"; reg = <0xffc000 0x1000>; - status = "disabled"; + #nordic,ficr-cells = <1>; }; #ifdef USE_NON_SECURE_ADDRESS_MAP @@ -817,6 +818,25 @@ status = "disabled"; }; + audio_auxpll: auxpll@130000 { + compatible = "nordic,nrf-auxpll"; + reg = <0x130000 0x1000>; + interrupts = <304 NRF_DEFAULT_IRQ_PRIORITY>; + clocks = <&hfxo32m>; + #clock-cells = <0>; + /* + * Temporarily reading FICR addr 0 as FICR offsets + * not defined yet + */ + nordic,ficrs = <&ficr 0>; + nordic,out-div = <2>; + nordic,out-drive = <0>; + nordic,current-tune = <9>; + nordic,sdm-disable; + nordic,range = "high"; + status = "disabled"; + }; + cpuapp_ppb: cpuapp-ppb-bus { #address-cells = <1>; #size-cells = <1>; diff --git a/include/bluetooth/cs_de.h b/include/bluetooth/cs_de.h index 7987094f2c91..88c3b6e14df9 100644 --- a/include/bluetooth/cs_de.h +++ b/include/bluetooth/cs_de.h @@ -95,12 +95,12 @@ typedef struct { * @brief Partially populate the report. * This populates the report but does not set the distance estimates and the quality. * @param[in] local_steps Buffer to the local step data to parse. - * @param[in] peer_steps Buffer to the peer ranging data to parse. - * @param[in] role Role of the local controller. + * @param[in] peer_steps Buffer to the peer ranging data to parse. + * @param[in] config CS config of the local controller. * @param[out] p_report Report populated with the raw data from the last ranging. */ void cs_de_populate_report(struct net_buf_simple *local_steps, struct net_buf_simple *peer_steps, - enum bt_conn_le_cs_role role, cs_de_report_t *p_report); + struct bt_conn_le_cs_config *config, cs_de_report_t *p_report); /* Takes partially populated report and calculates distance estimates and quality. */ cs_de_quality_t cs_de_calc(cs_de_report_t *p_report); diff --git a/include/dfu/dfu_target_stream.h b/include/dfu/dfu_target_stream.h index 605934587b6d..bd09f8e0068e 100644 --- a/include/dfu/dfu_target_stream.h +++ b/include/dfu/dfu_target_stream.h @@ -79,6 +79,18 @@ int dfu_target_stream_init(const struct dfu_target_stream_init *init); */ int dfu_target_stream_offset_get(size_t *offset); +/** @brief Get the number of bytes buffered for the stream. + * + * This can be used to determine how much data is currently buffered + * and not yet written to flash. + * + * @param[out] out Returns the number of bytes buffered. + * + * @return Non-negative value if success, otherwise negative value if unable + * to get the buffered bytes + */ +int dfu_target_stream_bytes_buffered_get(size_t *out); + /** * @brief Write a chunk of firmware data. * diff --git a/include/modem/lte_lc.h b/include/modem/lte_lc.h index ddb55fcd576a..f3d2dcb17d96 100644 --- a/include/modem/lte_lc.h +++ b/include/modem/lte_lc.h @@ -362,6 +362,20 @@ enum lte_lc_evt_type { */ LTE_LC_EVT_RAI_UPDATE = 12, #endif /* CONFIG_LTE_LC_RAI_MODULE */ + +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) + /** + * Environment evaluation result. + * + * The associated payload is the @c lte_lc_evt.env_eval_result member of type + * @ref lte_lc_env_eval_result in the event. + * + * @note This is only supported by the following modem firmware: + * - mfw_nrf91x1 >= v2.0.3 + * - mfw_nrf9151-ntn + */ + LTE_LC_EVT_ENV_EVAL_RESULT = 13, +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ }; /** RRC connection state. */ @@ -1052,6 +1066,49 @@ struct lte_lc_ncellmeas_params { uint8_t gci_count; }; +/** Environment evaluation type. */ +enum lte_lc_env_eval_type { + /** + * PLMN search is stopped after light search if any of the PLMNs to evaluate were found. + * Search is continued over all frequency bands if light search did not find any results. + */ + LTE_LC_ENV_EVAL_TYPE_DYNAMIC = 0, + + /** PLMN search is stopped after light search even if no PLMNs to evaluate were found. */ + LTE_LC_ENV_EVAL_TYPE_LIGHT = 1, + + /** PLMN search covers all channels in all supported frequency bands. */ + LTE_LC_ENV_EVAL_TYPE_FULL = 2 +}; + +/** PLMN to evaluate. */ +struct lte_lc_env_eval_plmn { + /** Mobile Country Code (MCC). */ + int mcc; + + /** Mobile Network Code (MNC). */ + int mnc; +}; + +/** Environment evaluation parameters. */ +struct lte_lc_env_eval_params { + /** + * Environment evaluation type. + */ + enum lte_lc_env_eval_type eval_type; + + /** + * Number of PLMNs to evaluate. + * + * Must be less than or equal to @c CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT. + */ + uint8_t plmn_count; + + /** + * Pointer to an array of PLMNs to evaluate. + */ + struct lte_lc_env_eval_plmn *plmn_list; +}; /** Search pattern type. */ enum lte_lc_periodic_search_pattern_type { @@ -1214,6 +1271,38 @@ struct lte_lc_periodic_search_cfg { struct lte_lc_periodic_search_pattern patterns[4]; }; +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) +/** + * @brief Environment evaluation results. + * + * This structure is used as the payload for event @ref LTE_LC_EVT_ENV_EVAL_RESULT. + */ +struct lte_lc_env_eval_result { + /** + * Status for the environment evaluation. + * + * 0 indicates successful completion of the evaluation. + * 5 indicates that evaluation failed, aborted due to higher priority operation. + * 7 indicates that evaluation failed, unspecified. + */ + uint8_t status; + + /** + * Number of PLMN results available in the results array. + * + * Range: 0 to CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT + */ + uint8_t result_count; + + /** + * Pointer to an array of environment evaluation results for different PLMNs. + * + * Each entry contains the evaluation result for a specific PLMN. + */ + struct lte_lc_conn_eval_params *results; +}; +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ + /** Callback for modem functional mode changes. */ struct lte_lc_cfun_cb { void (*callback)(enum lte_lc_func_mode, void *ctx); @@ -1275,6 +1364,11 @@ struct lte_lc_evt { /** Payload for event @ref LTE_LC_EVT_RAI_UPDATE. */ struct lte_lc_rai_cfg rai_cfg; #endif /* CONFIG_LTE_LC_RAI_MODULE */ + +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) + /** Payload for event @ref LTE_LC_EVT_ENV_EVAL_RESULT. */ + struct lte_lc_env_eval_result env_eval_result; +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ }; }; @@ -1754,6 +1848,48 @@ int lte_lc_neighbor_cell_measurement_cancel(void); */ int lte_lc_conn_eval_params_get(struct lte_lc_conn_eval_params *params); +/** + * Start environment evaluation. + * + * Perform evaluation for PLMN selection. Evaluates available PLMNs and provides information + * of their estimated signalling conditions. Based on the evaluation results, the application + * can then select the best PLMN to use. This is useful especially in cases where the device + * has multiple SIMs or SIM profiles to select from. + * + * PLMNs (MCC/MNC pairs) to be evaluated are listed in the @ref lte_lc_env_eval_params + * structure. For each PLMN, evaluation results for the best found cell are returned. The results + * are returned with the @ref LTE_LC_EVT_ENV_EVAL_RESULT event. + * + * Environment evaluation can only be performed in receive only functional mode. The device does + * not transmit anything during the evaluation. + * + * @note This is only supported by the following modem firmware: + * - mfw_nrf91x1 >= v2.0.3 + * - mfw_nrf9151-ntn + * + * @note Requires `CONFIG_LTE_LC_ENV_EVAL_MODULE` to be enabled. + * + * @param[in] params Environment evaluation parameters. + * + * @retval 0 if environment evaluation was successfully initiated. + * @retval -EFAULT if AT command failed or feature is not supported by the modem firmware. + * @retval -EINVAL if parameters are invalid. + * @retval -EOPNOTSUPP if environment evaluation is not available in the current functional mode. + */ +int lte_lc_env_eval(struct lte_lc_env_eval_params *params); + +/** + * Cancel an ongoing environment evaluation. + * + * If environment evaluation was in progress, an @ref LTE_LC_EVT_ENV_EVAL_RESULT event is received. + * + * @note Requires `CONFIG_LTE_LC_ENV_EVAL_MODULE` to be enabled. + * + * @retval 0 if environment evaluation was cancelled. + * @retval -EFAULT if AT command failed. + */ +int lte_lc_env_eval_cancel(void); + /** * Enable modem domain events. * diff --git a/include/net/nrf_cloud_fota_poll.h b/include/net/nrf_cloud_fota_poll.h index b4bc38c11e09..7b2f3b25a09b 100644 --- a/include/net/nrf_cloud_fota_poll.h +++ b/include/net/nrf_cloud_fota_poll.h @@ -135,6 +135,7 @@ int nrf_cloud_fota_poll_process_pending(struct nrf_cloud_fota_poll_ctx *ctx); * @retval -ENOENT A FOTA job has finished and its status has been reported to the cloud. * @retval -EAGAIN No FOTA job exists. * @retval -ETIMEDOUT The FOTA job check timed out. Retry later. + * @retval -ENETDOWN The network is down. */ int nrf_cloud_fota_poll_process(struct nrf_cloud_fota_poll_ctx *ctx); diff --git a/lib/lte_link_control/Kconfig b/lib/lte_link_control/Kconfig index dcb6555968fa..473dc96a2468 100644 --- a/lib/lte_link_control/Kconfig +++ b/lib/lte_link_control/Kconfig @@ -20,7 +20,7 @@ config LTE_LC_CONN_EVAL_MODULE bool "Connection Parameters Evaluation module" config LTE_LC_EDRX_MODULE - bool "Extended Discountinuous Reception (eDRX) module" + bool "Extended Discontinuous Reception (eDRX) module" config LTE_LC_NEIGHBOR_CELL_MEAS_MODULE bool "Neighboring Cell Measurements module" @@ -40,8 +40,11 @@ config LTE_LC_MODEM_SLEEP_MODULE config LTE_LC_TAU_PRE_WARNING_MODULE bool "Tracking Area Update (TAU) module" +config LTE_LC_ENV_EVAL_MODULE + bool "Environment Evaluation module" + menuconfig LTE_LC_DNS_FALLBACK_MODULE - bool "Fallback DNS module" + bool "DNS Fallback module" default y help The device might or might not receive a DNS server address by the network during a PDN connection. @@ -442,6 +445,12 @@ config LTE_LC_MODEM_SLEEP_NOTIFICATIONS_THRESHOLD_MS endif # LTE_LC_MODEM_SLEEP_MODULE +config LTE_LC_ENV_EVAL_MAX_PLMN_COUNT + int "Maximum number of PLMNs to evaluate" + default 3 + help + Maximum number of PLMNs that can be evaluated with lte_lc_env_eval(). + config LTE_LC_TRACE bool "LTE link control tracing" help diff --git a/lib/lte_link_control/include/modules/enveval.h b/lib/lte_link_control/include/modules/enveval.h new file mode 100644 index 000000000000..d69cf0b173dd --- /dev/null +++ b/lib/lte_link_control/include/modules/enveval.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#ifndef ENVEVAL_H__ +#define ENVEVAL_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Perform environment evaluation. */ +int env_eval(struct lte_lc_env_eval_params *params); + +/* Cancel an ongoing environment evaluation. */ +int env_eval_cancel(void); + +#ifdef __cplusplus +} +#endif + +#endif /* ENVEVAL_H__ */ diff --git a/lib/lte_link_control/lte_lc.c b/lib/lte_link_control/lte_lc.c index d00ec75ec73c..309d660b3a5c 100644 --- a/lib/lte_link_control/lte_lc.c +++ b/lib/lte_link_control/lte_lc.c @@ -29,6 +29,7 @@ #include "modules/xmodemsleep.h" #include "modules/xsystemmode.h" #include "modules/xt3412.h" +#include "modules/enveval.h" #include "common/work_q.h" #include "common/event_handler_list.h" @@ -184,6 +185,16 @@ int lte_lc_conn_eval_params_get(struct lte_lc_conn_eval_params *params) return coneval_params_get(params); } +int lte_lc_env_eval(struct lte_lc_env_eval_params *params) +{ + return env_eval(params); +} + +int lte_lc_env_eval_cancel(void) +{ + return env_eval_cancel(); +} + int lte_lc_modem_events_enable(void) { return mdmev_enable(); diff --git a/lib/lte_link_control/modules/CMakeLists.txt b/lib/lte_link_control/modules/CMakeLists.txt index d570cf5ec119..b01dae52f592 100644 --- a/lib/lte_link_control/modules/CMakeLists.txt +++ b/lib/lte_link_control/modules/CMakeLists.txt @@ -18,3 +18,4 @@ zephyr_library_sources_ifdef(CONFIG_LTE_LC_PERIODIC_SEARCH_MODULE periodicsearch zephyr_library_sources_ifdef(CONFIG_LTE_LC_MODEM_SLEEP_MODULE xmodemsleep.c) zephyr_library_sources_ifdef(CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE xt3412.c) zephyr_library_sources_ifdef(CONFIG_LTE_LC_DNS_FALLBACK_MODULE dns.c) +zephyr_library_sources_ifdef(CONFIG_LTE_LC_ENV_EVAL_MODULE enveval.c) diff --git a/lib/lte_link_control/modules/enveval.c b/lib/lte_link_control/modules/enveval.c new file mode 100644 index 000000000000..070feaedd623 --- /dev/null +++ b/lib/lte_link_control/modules/enveval.c @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/event_handler_list.h" +#include "common/helpers.h" +#include "modules/cfun.h" +#include "modules/enveval.h" + +LOG_MODULE_DECLARE(lte_lc, CONFIG_LTE_LINK_CONTROL_LOG_LEVEL); + +/* ENVEVAL AT commands */ +#define AT_ENVEVAL "AT%%ENVEVAL=%d,%s" +#define AT_ENVEVAL_CANCEL "AT%%ENVEVALSTOP" + +/** "MCCMNC" (including quotes) + comma or null termination */ +#define PLMN_ENTRY_SIZE 9 + +AT_MONITOR(ltelc_atmon_enveval, "%ENVEVAL", at_handler_enveval); + +static void at_handler_enveval(const char *notif) +{ + int ret; + int earfcn; + uint32_t cell_id; + uint16_t rrc_state, energy_estimate, tau_trig, ce_level; + int16_t rsrp, rsrq, snr, phys_cell_id, band, tx_power, tx_rep, rx_rep, dl_pathloss; + uint8_t status; + /* PLMN field is a string of maximum 6 characters + null termination. */ + char plmn_str[7] = {0}; + struct lte_lc_conn_eval_params *plmn_result; + static uint8_t result_count; + static struct lte_lc_conn_eval_params results[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT]; + static bool env_eval_in_progress; + + __ASSERT_NO_MSG(notif != NULL); + + /* Initialize buffer if this is the first result */ + if (!env_eval_in_progress) { + result_count = 0; + memset(&results, 0, sizeof(results)); + env_eval_in_progress = true; + } + + /* %ENVEVAL notification format (same as %CONEVAL): + * + * %ENVEVAL: [,,,,,,,, + * ,,,,,,, + * ,] + * + * In total, 17 parameters are expected to match for a successful notification parsing. + * If only 1 parameter is present (%ENVEVAL: ), it indicates end of evaluation. + */ + ret = sscanf(notif, + "%%ENVEVAL: " + "%hhu," /* */ + "%hu," /* */ + "%hu," /* */ + "%hd," /* */ + "%hd," /* */ + "%hd," /* */ + "\"%x\"," /* */ + "\"%6[^\"]\"," /* */ + "%hd," /* */ + "%d," /* */ + "%hd," /* */ + "%hu," /* */ + "%hu," /* */ + "%hd," /* */ + "%hd," /* */ + "%hd," /* */ + "%hd", /* */ + &status, &rrc_state, &energy_estimate, &rsrp, &rsrq, &snr, &cell_id, plmn_str, + &phys_cell_id, &earfcn, &band, &tau_trig, &ce_level, &tx_power, &tx_rep, + &rx_rep, &dl_pathloss); + + if (ret == 17) { + /* Successfully parsed full notification - this is a PLMN result */ + + /* Check if we have space for more results */ + if (result_count >= CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT) { + LOG_ERR("Maximum number of PLMN results reached, ignoring notification"); + return; + } + + /* Get pointer to the next available result slot */ + plmn_result = &results[result_count]; + + plmn_result->rrc_state = (enum lte_lc_rrc_mode)rrc_state; + plmn_result->energy_estimate = (enum lte_lc_energy_estimate)energy_estimate; + plmn_result->tau_trig = (enum lte_lc_tau_triggered)tau_trig; + plmn_result->ce_level = (enum lte_lc_ce_level)ce_level; + plmn_result->earfcn = earfcn; + plmn_result->dl_pathloss = dl_pathloss; + plmn_result->rsrp = rsrp; + plmn_result->rsrq = rsrq; + plmn_result->tx_rep = tx_rep; + plmn_result->rx_rep = rx_rep; + plmn_result->phy_cid = phys_cell_id; + plmn_result->band = band; + plmn_result->snr = snr; + plmn_result->tx_power = tx_power; + plmn_result->cell_id = cell_id; + + /* Parse PLMN string: MCC (3 digits) + MNC (2-3 digits) */ + if (strlen(plmn_str) < 5) { + LOG_ERR("Invalid PLMN string length: %zu", strlen(plmn_str)); + return; + } + + /* Read MNC and store as integer. The MNC starts as the fourth character + * in the string, following three characters long MCC. + */ + ret = string_to_int(&plmn_str[3], 10, &plmn_result->mnc); + if (ret) { + LOG_ERR("Could not parse MNC from PLMN string"); + return; + } + + /* Null-terminate MCC, read and store it */ + plmn_str[3] = '\0'; + + ret = string_to_int(plmn_str, 10, &plmn_result->mcc); + if (ret) { + LOG_ERR("Could not parse MCC from PLMN string"); + return; + } + + result_count++; + + LOG_DBG("Environment evaluation result %u received for %03d%02d", + result_count, + plmn_result->mcc, plmn_result->mnc); + } else if (ret == 1) { + /* Only result parameter parsed - this indicates end of evaluation */ + LOG_DBG("Environment evaluation completed with status: %d", status); + /* Send accumulated results */ + event_handler_list_dispatch( + &(struct lte_lc_evt) { + .type = LTE_LC_EVT_ENV_EVAL_RESULT, + .env_eval_result.status = status, + .env_eval_result.result_count = result_count, + .env_eval_result.results = results + }); + env_eval_in_progress = false; + } else { + /* Failed to parse notification */ + LOG_ERR("%%ENVEVAL parsing failed, error: %d", ret); + } +} + +int env_eval(struct lte_lc_env_eval_params *params) +{ + int ret; + enum lte_lc_func_mode mode; + + if (params == NULL || params->plmn_list == NULL) { + return -EINVAL; + } + + if (params->plmn_count == 0 || + params->plmn_count > CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT) { + LOG_ERR("Invalid PLMN count, check CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT"); + return -EINVAL; + } + + ret = cfun_mode_get(&mode); + if (ret) { + LOG_ERR("Could not get functional mode"); + return -EFAULT; + } + + switch (mode) { + case LTE_LC_FUNC_MODE_RX_ONLY: + break; + default: + LOG_ERR("Environment evaluation is only available in RX only mode"); + return -EOPNOTSUPP; + } + + /* Construct PLMN string from params structure */ + char plmn_string[PLMN_ENTRY_SIZE * CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = {0}; + size_t offset = 0; + + for (size_t i = 0; i < params->plmn_count; i++) { + if (params->plmn_list[i].mcc < 0 || params->plmn_list[i].mcc > 999 || + params->plmn_list[i].mnc < 0 || params->plmn_list[i].mnc > 999) { + return -EINVAL; + } + + if (i > 0) { + /* Add comma separator between PLMNs */ + __ASSERT_NO_MSG(offset < sizeof(plmn_string) - 1); + plmn_string[offset] = ','; + offset++; + } + + /* Add quoted PLMN: "MCCMNC" */ + int written = snprintf(&plmn_string[offset], sizeof(plmn_string) - offset, + "\"%03d%02d\"", + params->plmn_list[i].mcc, params->plmn_list[i].mnc); + __ASSERT_NO_MSG(written >= 0 && written < (int)(sizeof(plmn_string) - offset)); + + offset += written; + } + + /* Null-terminate the string */ + __ASSERT_NO_MSG(offset < sizeof(plmn_string)); + plmn_string[offset] = '\0'; + + ret = nrf_modem_at_printf(AT_ENVEVAL, params->eval_type, plmn_string); + if (ret) { + LOG_ERR("AT command failed, error: %d", ret); + return -EFAULT; + } + + return 0; +} + +int env_eval_cancel(void) +{ + int ret; + + ret = nrf_modem_at_printf(AT_ENVEVAL_CANCEL); + if (ret) { + LOG_ERR("AT command failed, error: %d", ret); + return -EFAULT; + } + + return 0; +} diff --git a/modules/memfault-firmware-sdk/Kconfig b/modules/memfault-firmware-sdk/Kconfig index d303cb63f341..6b8b0a44a8ab 100644 --- a/modules/memfault-firmware-sdk/Kconfig +++ b/modules/memfault-firmware-sdk/Kconfig @@ -6,10 +6,6 @@ if MEMFAULT -config MEMFAULT_HTTP_USES_MBEDTLS - bool - default n if NRF_MODEM_LIB - config MEMFAULT_NCS_PROJECT_KEY string "Memfault API key" help diff --git a/modules/nrfxlib/nrf_802154/CMakeLists.txt b/modules/nrfxlib/nrf_802154/CMakeLists.txt index b4428dc2b0b6..32403b6e8b9b 100644 --- a/modules/nrfxlib/nrf_802154/CMakeLists.txt +++ b/modules/nrfxlib/nrf_802154/CMakeLists.txt @@ -4,9 +4,9 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) - if (CONFIG_NRF_802154_SL) - if (CONFIG_SOC_COMPATIBLE_NRF52X OR CONFIG_SOC_COMPATIBLE_NRF53X) +if(CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) + if(CONFIG_NRF_802154_SL) + if(CONFIG_SOC_COMPATIBLE_NRF52X OR CONFIG_SOC_COMPATIBLE_NRF53X) target_sources(nrf-802154-platform PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/sl/platform/nrf_802154_hp_timer.c @@ -20,9 +20,9 @@ if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) ${CMAKE_CURRENT_SOURCE_DIR}/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c ) endif() - endif () + endif() - if (CONFIG_MPSL) + if(CONFIG_MPSL) target_compile_definitions(nrf-802154-platform PUBLIC NRF_802154_VERIFY_PERIPHS_ALLOC_AGAINST_MPSL=1) endif() @@ -30,12 +30,12 @@ if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) set(SER_HOST ${CONFIG_NRF_802154_SER_HOST}) set(SL_OPENSOURCE ${CONFIG_NRF_802154_SL_OPENSOURCE}) - if (CONFIG_NRF_802154_SOURCE_NRFXLIB) + if(CONFIG_NRF_802154_SOURCE_NRFXLIB) add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/nrf_802154 nrf_802154) target_link_libraries(nrf-802154-driver-interface INTERFACE zephyr-802154-interface) target_link_libraries(nrf-802154-serialization-interface INTERFACE zephyr-802154-interface) - endif (CONFIG_NRF_802154_SOURCE_NRFXLIB) + endif(CONFIG_NRF_802154_SOURCE_NRFXLIB) target_compile_definitions(zephyr-802154-interface INTERFACE @@ -47,9 +47,15 @@ if (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS_DEFAULT=${CONFIG_NRF_802154_CSMA_CA_MAX_CSMA_BACKOFFS_DEFAULT} ) - if (CONFIG_NRF_802154_ACK_TIMEOUT_CUSTOM_US) + if(CONFIG_NRF_802154_TX_DIAGNOSTIC_MODE) + target_compile_definitions(zephyr-802154-interface + INTERFACE + NRF_802154_TX_DIAGNOSTIC_MODE=1) + endif() + + if(CONFIG_NRF_802154_ACK_TIMEOUT_CUSTOM_US) target_compile_definitions(zephyr-802154-interface INTERFACE NRF_802154_PRECISE_ACK_TIMEOUT_DEFAULT_TIMEOUT=${CONFIG_NRF_802154_ACK_TIMEOUT_CUSTOM_US}) - endif () -endif (CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) + endif() +endif(CONFIG_NRF_802154_RADIO_DRIVER OR CONFIG_NRF_802154_SERIALIZATION) diff --git a/samples/app_jwt/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/app_jwt/boards/nrf54h20dk_nrf54h20_cpuapp.conf index 3b87bc428eaa..6bf1766212bd 100644 --- a/samples/app_jwt/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/app_jwt/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -31,7 +31,3 @@ CONFIG_NRF_SECURITY=y # Enable Device Info service CONFIG_SSF_DEVICE_INFO_SERVICE_ENABLED=y - -# Enable SUIT bundling -CONFIG_SUIT=y -CONFIG_ZCBOR_CANONICAL=y diff --git a/samples/app_jwt/prj.conf b/samples/app_jwt/prj.conf index cf18a7346e08..647d06e8940c 100644 --- a/samples/app_jwt/prj.conf +++ b/samples/app_jwt/prj.conf @@ -22,7 +22,3 @@ CONFIG_NRF_SECURITY=y # Enable Device Info service CONFIG_SSF_DEVICE_INFO_SERVICE_ENABLED=y - -# Enable SUIT bundling -CONFIG_SUIT=y -CONFIG_ZCBOR_CANONICAL=y diff --git a/samples/app_jwt/sample.yaml b/samples/app_jwt/sample.yaml index cc5148e1b6dc..e9521b7d173a 100644 --- a/samples/app_jwt/sample.yaml +++ b/samples/app_jwt/sample.yaml @@ -19,12 +19,7 @@ tests: - nrf54h20dk/nrf54h20/cpuapp extra_args: - EXTRA_CONF_FILE=uart_logging.conf - - SB_CONFIG_SUIT_ENVELOPE=y extra_configs: - CONFIG_LOG_BUFFER_SIZE=4098 - - CONFIG_SUIT=y - CONFIG_ZCBOR=y - CONFIG_ZCBOR_CANONICAL=y - - CONFIG_SUIT_ENVELOPE_TARGET="application" - - CONFIG_SUIT_ENVELOPE_TEMPLATE_FILENAME="app_envelope.yaml.jinja2" - - CONFIG_SUIT_LOCAL_ENVELOPE_GENERATE=y diff --git a/samples/bluetooth/channel_sounding_ras_initiator/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/channel_sounding_ras_initiator/boards/nrf54h20dk_nrf54h20_cpuapp.conf index e68f3b0daf02..a20cc41198f5 100644 --- a/samples/bluetooth/channel_sounding_ras_initiator/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/channel_sounding_ras_initiator/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,8 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_RX_STACK_SIZE=2048 - # Enable PSA RNG CONFIG_PSA_CRYPTO_DRIVER_OBERON=n CONFIG_PSA_SSF_CRYPTO_CLIENT=y diff --git a/samples/bluetooth/channel_sounding_ras_initiator/src/main.c b/samples/bluetooth/channel_sounding_ras_initiator/src/main.c index 7f5a5d0265b7..b61da7357b92 100644 --- a/samples/bluetooth/channel_sounding_ras_initiator/src/main.c +++ b/samples/bluetooth/channel_sounding_ras_initiator/src/main.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ static K_SEM_DEFINE(sem_mtu_exchange_done, 0, 1); static K_SEM_DEFINE(sem_security, 0, 1); static K_SEM_DEFINE(sem_ras_features, 0, 1); static K_SEM_DEFINE(sem_local_steps, 1, 1); +static K_SEM_DEFINE(sem_distance_estimate_updated, 0, 1); static K_MUTEX_DEFINE(distance_estimate_buffer_mutex); @@ -60,6 +62,7 @@ static uint32_t ras_feature_bits; static uint8_t buffer_index; static uint8_t buffer_num_valid; static cs_de_dist_estimates_t distance_estimate_buffer[MAX_AP][DE_SLIDING_WINDOW_SIZE]; +static struct bt_conn_le_cs_config cs_config; static void store_distance_estimates(cs_de_report_t *p_report) { @@ -180,8 +183,7 @@ static void ranging_data_cb(struct bt_conn *conn, uint16_t ranging_counter, int /* This struct is static to avoid putting it on the stack (it's very large) */ static cs_de_report_t cs_de_report; - cs_de_populate_report(&latest_local_steps, &latest_peer_steps, BT_CONN_LE_CS_ROLE_INITIATOR, - &cs_de_report); + cs_de_populate_report(&latest_local_steps, &latest_peer_steps, &cs_config, &cs_de_report); net_buf_simple_reset(&latest_local_steps); @@ -199,6 +201,7 @@ static void ranging_data_cb(struct bt_conn *conn, uint16_t ranging_counter, int store_distance_estimates(&cs_de_report); } } + k_sem_give(&sem_distance_estimate_updated); } } @@ -394,14 +397,67 @@ static void remote_capabilities_cb(struct bt_conn *conn, } } -static void config_create_cb(struct bt_conn *conn, - uint8_t status, +static void config_create_cb(struct bt_conn *conn, uint8_t status, struct bt_conn_le_cs_config *config) { ARG_UNUSED(conn); if (status == BT_HCI_ERR_SUCCESS) { - LOG_INF("CS config creation complete. ID: %d", config->id); + cs_config = *config; + + const char *mode_str[5] = {"Unused", "1 (RTT)", "2 (PBR)", "3 (RTT + PBR)", + "Invalid"}; + const char *role_str[3] = {"Initiator", "Reflector", "Invalid"}; + const char *rtt_type_str[8] = { + "AA only", "32-bit sounding", "96-bit sounding", "32-bit random", + "64-bit random", "96-bit random", "128-bit random", "Invalid"}; + const char *phy_str[4] = {"Invalid", "LE 1M PHY", "LE 2M PHY", "LE 2M 2BT PHY"}; + const char *chsel_type_str[3] = {"Algorithm #3b", "Algorithm #3c", "Invalid"}; + const char *ch3c_shape_str[3] = {"Hat shape", "X shape", "Invalid"}; + + uint8_t main_mode_idx = config->main_mode_type > 0 && config->main_mode_type < 4 + ? config->main_mode_type + : 4; + uint8_t sub_mode_idx = config->sub_mode_type < 4 ? config->sub_mode_type : 0; + uint8_t role_idx = MIN(config->role, 2); + uint8_t rtt_type_idx = MIN(config->rtt_type, 7); + uint8_t phy_idx = config->cs_sync_phy > 0 && config->cs_sync_phy < 4 + ? config->cs_sync_phy + : 0; + uint8_t chsel_type_idx = MIN(config->channel_selection_type, 2); + uint8_t ch3c_shape_idx = MIN(config->ch3c_shape, 2); + + LOG_INF("CS config creation complete.\n" + " - id: %u\n" + " - main_mode_type: %s\n" + " - sub_mode_type: %s\n" + " - min_main_mode_steps: %u\n" + " - max_main_mode_steps: %u\n" + " - main_mode_repetition: %u\n" + " - mode_0_steps: %u\n" + " - role: %s\n" + " - rtt_type: %s\n" + " - cs_sync_phy: %s\n" + " - channel_map_repetition: %u\n" + " - channel_selection_type: %s\n" + " - ch3c_shape: %s\n" + " - ch3c_jump: %u\n" + " - t_ip1_time_us: %u\n" + " - t_ip2_time_us: %u\n" + " - t_fcs_time_us: %u\n" + " - t_pm_time_us: %u\n" + " - channel_map: 0x%08X%08X%04X\n", + config->id, mode_str[main_mode_idx], mode_str[sub_mode_idx], + config->min_main_mode_steps, config->max_main_mode_steps, + config->main_mode_repetition, config->mode_0_steps, role_str[role_idx], + rtt_type_str[rtt_type_idx], phy_str[phy_idx], + config->channel_map_repetition, chsel_type_str[chsel_type_idx], + ch3c_shape_str[ch3c_shape_idx], config->ch3c_jump, config->t_ip1_time_us, + config->t_ip2_time_us, config->t_fcs_time_us, config->t_pm_time_us, + sys_get_le32(&config->channel_map[6]), + sys_get_le32(&config->channel_map[2]), + sys_get_le16(&config->channel_map[0])); + k_sem_give(&sem_config_created); } else { LOG_WRN("CS config creation failed. (HCI status 0x%02x)", status); @@ -499,7 +555,9 @@ static int scan_init(void) int err; struct bt_scan_init_param param = { - .scan_param = NULL, .conn_param = BT_LE_CONN_PARAM_DEFAULT, .connect_if_match = 1}; + .scan_param = NULL, + .conn_param = BT_LE_CONN_PARAM(0x10, 0x10, 0, BT_GAP_MS_TO_CONN_TIMEOUT(4000)), + .connect_if_match = 1}; bt_scan_init(¶m); bt_scan_cb_register(&scan_cb); @@ -657,7 +715,7 @@ int main(void) .role = BT_CONN_LE_CS_ROLE_INITIATOR, .rtt_type = BT_CONN_LE_CS_RTT_TYPE_AA_ONLY, .cs_sync_phy = BT_CONN_LE_CS_SYNC_1M_PHY, - .channel_map_repetition = 3, + .channel_map_repetition = 1, .channel_selection_type = BT_CONN_LE_CS_CHSEL_TYPE_3B, .ch3c_shape = BT_CONN_LE_CS_CH3C_SHAPE_HAT, .ch3c_jump = 2, @@ -688,8 +746,8 @@ int main(void) .min_procedure_interval = realtime_rd ? 5 : 10, .max_procedure_interval = realtime_rd ? 5 : 10, .max_procedure_count = 0, - .min_subevent_len = 60000, - .max_subevent_len = 60000, + .min_subevent_len = 16000, + .max_subevent_len = 16000, .tone_antenna_config_selection = BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B1, .phy = BT_LE_CS_PROCEDURE_PHY_2M, .tx_power_delta = 0x80, @@ -716,21 +774,18 @@ int main(void) } while (true) { - k_sleep(K_MSEC(5000)); - + k_sem_take(&sem_distance_estimate_updated, K_FOREVER); if (buffer_num_valid != 0) { for (uint8_t ap = 0; ap < MAX_AP; ap++) { cs_de_dist_estimates_t distance_on_ap = get_distance(ap); - LOG_INF("Latest distance estimates on antenna path %u: ifft: %f, " - "phase_slope: %f, rtt: %f meters", + LOG_INF("Latest distance estimates on antenna path %u: ifft: %.2f, " + "phase_slope: %.2f, rtt: %.2f meters", ap, (double)distance_on_ap.ifft, (double)distance_on_ap.phase_slope, (double)distance_on_ap.rtt); } } - - LOG_INF("Sleeping for a few seconds..."); } return 0; diff --git a/samples/bluetooth/channel_sounding_ras_reflector/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/channel_sounding_ras_reflector/boards/nrf54h20dk_nrf54h20_cpuapp.conf index e68f3b0daf02..a20cc41198f5 100644 --- a/samples/bluetooth/channel_sounding_ras_reflector/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/channel_sounding_ras_reflector/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,8 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_RX_STACK_SIZE=2048 - # Enable PSA RNG CONFIG_PSA_CRYPTO_DRIVER_OBERON=n CONFIG_PSA_SSF_CRYPTO_CLIENT=y diff --git a/samples/bluetooth/channel_sounding_ras_reflector/src/main.c b/samples/bluetooth/channel_sounding_ras_reflector/src/main.c index 70603fd714eb..3b3b2b57a51a 100644 --- a/samples/bluetooth/channel_sounding_ras_reflector/src/main.c +++ b/samples/bluetooth/channel_sounding_ras_reflector/src/main.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -80,14 +81,65 @@ static void remote_capabilities_cb(struct bt_conn *conn, } } -static void config_create_cb(struct bt_conn *conn, - uint8_t status, - struct bt_conn_le_cs_config *config) +static void config_create_cb(struct bt_conn *conn, uint8_t status, + struct bt_conn_le_cs_config *config) { ARG_UNUSED(conn); if (status == BT_HCI_ERR_SUCCESS) { - LOG_INF("CS config creation complete. ID: %d", config->id); + const char *mode_str[5] = {"Unused", "1 (RTT)", "2 (PBR)", "3 (RTT + PBR)", + "Invalid"}; + const char *role_str[3] = {"Initiator", "Reflector", "Invalid"}; + const char *rtt_type_str[8] = { + "AA only", "32-bit sounding", "96-bit sounding", "32-bit random", + "64-bit random", "96-bit random", "128-bit random", "Invalid"}; + const char *phy_str[4] = {"Invalid", "LE 1M PHY", "LE 2M PHY", "LE 2M 2BT PHY"}; + const char *chsel_type_str[3] = {"Algorithm #3b", "Algorithm #3c", "Invalid"}; + const char *ch3c_shape_str[3] = {"Hat shape", "X shape", "Invalid"}; + + uint8_t main_mode_idx = config->main_mode_type > 0 && config->main_mode_type < 4 + ? config->main_mode_type + : 4; + uint8_t sub_mode_idx = config->sub_mode_type < 4 ? config->sub_mode_type : 0; + uint8_t role_idx = MIN(config->role, 2); + uint8_t rtt_type_idx = MIN(config->rtt_type, 7); + uint8_t phy_idx = config->cs_sync_phy > 0 && config->cs_sync_phy < 4 + ? config->cs_sync_phy + : 0; + uint8_t chsel_type_idx = MIN(config->channel_selection_type, 2); + uint8_t ch3c_shape_idx = MIN(config->ch3c_shape, 2); + + LOG_INF("CS config creation complete.\n" + " - id: %u\n" + " - main_mode_type: %s\n" + " - sub_mode_type: %s\n" + " - min_main_mode_steps: %u\n" + " - max_main_mode_steps: %u\n" + " - main_mode_repetition: %u\n" + " - mode_0_steps: %u\n" + " - role: %s\n" + " - rtt_type: %s\n" + " - cs_sync_phy: %s\n" + " - channel_map_repetition: %u\n" + " - channel_selection_type: %s\n" + " - ch3c_shape: %s\n" + " - ch3c_jump: %u\n" + " - t_ip1_time_us: %u\n" + " - t_ip2_time_us: %u\n" + " - t_fcs_time_us: %u\n" + " - t_pm_time_us: %u\n" + " - channel_map: 0x%08X%08X%04X\n", + config->id, mode_str[main_mode_idx], mode_str[sub_mode_idx], + config->min_main_mode_steps, config->max_main_mode_steps, + config->main_mode_repetition, config->mode_0_steps, role_str[role_idx], + rtt_type_str[rtt_type_idx], phy_str[phy_idx], + config->channel_map_repetition, chsel_type_str[chsel_type_idx], + ch3c_shape_str[ch3c_shape_idx], config->ch3c_jump, config->t_ip1_time_us, + config->t_ip2_time_us, config->t_fcs_time_us, config->t_pm_time_us, + sys_get_le32(&config->channel_map[6]), + sys_get_le32(&config->channel_map[2]), + sys_get_le16(&config->channel_map[0])); + k_sem_give(&sem_config); } else { LOG_WRN("CS config creation failed. (HCI status 0x%02x)", status); diff --git a/samples/bluetooth/conn_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf index 72ecaeede597..b6d8b8e04cd7 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,8 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_RX_STACK_SIZE=2048 - # Enable PSA RNG CONFIG_PSA_CRYPTO_DRIVER_OBERON=n CONFIG_PSA_SSF_CRYPTO_CLIENT=y diff --git a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/conn_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/conn_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index 0795d869eb40..5c8c4992e989 100644 --- a/samples/bluetooth/conn_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/bluetooth/conn_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/direct_test_mode/Kconfig b/samples/bluetooth/direct_test_mode/Kconfig index 93cc5688a156..c4cef6df7a80 100644 --- a/samples/bluetooth/direct_test_mode/Kconfig +++ b/samples/bluetooth/direct_test_mode/Kconfig @@ -35,8 +35,8 @@ config ANOMALY_172_TIMER_IRQ_PRIORITY Levels are from 0 (highest priority) to 6 (lowest priority) config DTM_USB - bool "DTM over USB CDC ACM class" - depends on SOC_NRF5340_CPUNET && !DTM_TRANSPORT_HCI + bool "DTM over USB CDC ACM class [EXPERIMENTAL]" + depends on (SOC_NRF5340_CPUNET || SOC_NRF54H20_CPURAD) && !DTM_TRANSPORT_HCI select EXPERIMENTAL help Use USB instead of UART as the DTM interface. For nRF5340 the USB from application core diff --git a/samples/bluetooth/direct_test_mode/README.rst b/samples/bluetooth/direct_test_mode/README.rst index bf3af3587edb..846cf58b9cdc 100644 --- a/samples/bluetooth/direct_test_mode/README.rst +++ b/samples/bluetooth/direct_test_mode/README.rst @@ -401,19 +401,26 @@ On the |nRF5340DKnoref|, you can build the sample with HCI interface with the `` USB CDC ACM transport variant ============================= -On the nRF5340 development kit, you can build this sample configured to use the USB interface as a communication interface with the tester. -Use the following command: +On the nRF5340 and nRF54H20 development kits, you can build this sample configured to use the USB interface as a communication interface with the tester. + +Use the following command for nRF54H20: + +.. code-block:: console + + west build samples/bluetooth/direct_test_mode -b nrf54h20dk/nrf54h20/cpurad -- -DFILE_SUFFIX=usb_54h20 + +Use the following command for nRF5340: .. code-block:: console - west build samples/bluetooth/direct_test_mode -b nrf5340dk/nrf5340/cpunet -- -DFILE_SUFFIX=usb + west build samples/bluetooth/direct_test_mode -b nrf5340dk/nrf5340/cpunet -- -DFILE_SUFFIX=usb_5340 You can also build this sample with support for the front-end module. Use the following command: .. code-block:: console - west build samples/bluetooth/direct_test_mode -b nrf5340dk/nrf5340/cpunet -- -DSHIELD=nrf21540ek -DFILE_SUFFIX=usb + west build samples/bluetooth/direct_test_mode -b nrf5340dk/nrf5340/cpunet -- -DSHIELD=nrf21540ek -DFILE_SUFFIX=usb_5340 .. _dtm_testing: diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad_usb_54h20.overlay b/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad_usb_54h20.overlay new file mode 100644 index 000000000000..78545df008dd --- /dev/null +++ b/samples/bluetooth/direct_test_mode/boards/nrf54h20dk_nrf54h20_cpurad_usb_54h20.overlay @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "nrf54h20dk_nrf54h20_cpurad.overlay" + +/ { + chosen { + ncs,dtm-uart = &cdc_acm_uart0; + }; +}; + +&uart135 { + status = "disabled"; +}; + +&uart136 { + status = "disabled"; +}; + +&zephyr_udc0 { + status = "okay"; + + cdc_acm_uart0: cdc_acm_uart0 { + status = "okay"; + compatible = "zephyr,cdc-acm-uart"; + current-speed = <19200>; + }; +}; diff --git a/samples/bluetooth/direct_test_mode/prj_usb.conf b/samples/bluetooth/direct_test_mode/prj_usb_5340.conf similarity index 100% rename from samples/bluetooth/direct_test_mode/prj_usb.conf rename to samples/bluetooth/direct_test_mode/prj_usb_5340.conf diff --git a/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf b/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf new file mode 100644 index 000000000000..244cefcb1da2 --- /dev/null +++ b/samples/bluetooth/direct_test_mode/prj_usb_54h20.conf @@ -0,0 +1,38 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_ASSERT=y +CONFIG_ASSERT_NO_COND_INFO=y +CONFIG_ASSERT_NO_MSG_INFO=y + +CONFIG_HW_STACK_PROTECTION=y + +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n + +CONFIG_LOG=y +CONFIG_LOG_PRINTK=y +CONFIG_USE_SEGGER_RTT=y +CONFIG_LOG_BACKEND_RTT=y +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# Enable USB CDC ACM Class +CONFIG_USB_DEVICE_STACK_NEXT=y +CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y +CONFIG_CDC_ACM_SERIAL_PID=0x5448 +CONFIG_CDC_ACM_SERIAL_PRODUCT_STRING="Nordic DTM USB" +CONFIG_UART_LINE_CTRL=y +CONFIG_DTM_USB=y +CONFIG_SERIAL=y + +# Disable the unsupported driver +CONFIG_NRFX_TIMER0=n +CONFIG_NRFX_TIMER2=n + +# Use necessary peripherals +CONFIG_NRFX_TIMER020=y +CONFIG_NRFX_GPPI=y +CONFIG_CLOCK_CONTROL=y diff --git a/samples/bluetooth/direct_test_mode/sample.yaml b/samples/bluetooth/direct_test_mode/sample.yaml index 54467f20766a..1ffca644f7db 100644 --- a/samples/bluetooth/direct_test_mode/sample.yaml +++ b/samples/bluetooth/direct_test_mode/sample.yaml @@ -63,7 +63,7 @@ tests: sample.bluetooth.direct_test_mode.nrf5340_usb: sysbuild: true build_only: true - extra_args: FILE_SUFFIX=usb + extra_args: FILE_SUFFIX=usb_5340 integration_platforms: - nrf5340dk/nrf5340/cpunet platform_allow: nrf5340dk/nrf5340/cpunet @@ -76,7 +76,7 @@ tests: build_only: true extra_args: - SHIELD=nrf21540ek - - FILE_SUFFIX=usb + - FILE_SUFFIX=usb_5340 integration_platforms: - nrf5340dk/nrf5340/cpunet platform_allow: nrf5340dk/nrf5340/cpunet @@ -127,7 +127,7 @@ tests: build_only: true extra_args: - SHIELD=nrf2220ek - - FILE_SUFFIX=usb + - FILE_SUFFIX=usb_5340 integration_platforms: - nrf5340dk/nrf5340/cpunet platform_allow: nrf5340dk/nrf5340/cpunet @@ -135,3 +135,14 @@ tests: - bluetooth - ci_build - sysbuild + sample.bluetooth.direct_test_mode.nrf54h20_usb: + sysbuild: true + build_only: true + extra_args: FILE_SUFFIX=usb_54h20 + integration_platforms: + - nrf54h20dk/nrf54h20/cpurad + platform_allow: nrf54h20dk/nrf54h20/cpurad + tags: + - bluetooth + - ci_build + - sysbuild diff --git a/samples/bluetooth/direct_test_mode/src/transport/dtm_uart_twowire.c b/samples/bluetooth/direct_test_mode/src/transport/dtm_uart_twowire.c index 36ecdc58a77b..aec64ef30bda 100644 --- a/samples/bluetooth/direct_test_mode/src/transport/dtm_uart_twowire.c +++ b/samples/bluetooth/direct_test_mode/src/transport/dtm_uart_twowire.c @@ -759,6 +759,14 @@ int dtm_tr_init(void) return -EIO; } +#if defined(CONFIG_DTM_USB) && defined(CONFIG_SOC_NRF54H20_CPURAD) + /* Enable RX path for the USB CDC ACM. + * uart_irq_rx_enable() -> cdc_acm_irq_rx_enable() -> cdc_acm_work_submit(rx_fifo_work) + * It is not needed for non CDC ACM UARTs. + */ + uart_irq_rx_enable(dtm_uart); +#endif /* defined(CONFIG_DTM_USB) && defined(CONFIG_SOC_NRF54H20_CPURAD) */ + err = dtm_init(NULL); if (err) { LOG_ERR("Error during DTM initialization: %d", err); diff --git a/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp_usb.overlay b/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp_usb_5340.overlay similarity index 100% rename from samples/bluetooth/direct_test_mode/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp_usb.overlay rename to samples/bluetooth/direct_test_mode/sysbuild/remote_shell/boards/nrf5340dk_nrf5340_cpuapp_usb_5340.overlay diff --git a/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj_usb.conf b/samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj_usb_5340.conf similarity index 100% rename from samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj_usb.conf rename to samples/bluetooth/direct_test_mode/sysbuild/remote_shell/prj_usb_5340.conf diff --git a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l05_cpuapp.conf deleted file mode 100644 index 3f76b765bd07..000000000000 --- a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l10_cpuapp.conf deleted file mode 100644 index 3f76b765bd07..000000000000 --- a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l15_cpuapp.conf deleted file mode 100644 index 3f76b765bd07..000000000000 --- a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf deleted file mode 100644 index 2081370e18a8..000000000000 --- a/samples/bluetooth/iso_combined_bis_and_cis/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf index 72ecaeede597..b6d8b8e04cd7 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,8 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_RX_STACK_SIZE=2048 - # Enable PSA RNG CONFIG_PSA_CRYPTO_DRIVER_OBERON=n CONFIG_PSA_SSF_CRYPTO_CLIENT=y diff --git a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf index f9cf1f1b5e72..c9646c9123bc 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/bluetooth/iso_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/bluetooth/iso_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index 0795d869eb40..5c8c4992e989 100644 --- a/samples/bluetooth/iso_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/bluetooth/iso_time_sync/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -5,4 +5,3 @@ # CONFIG_NRFX_GPPI=y -CONFIG_BT_RX_STACK_SIZE=2048 diff --git a/samples/cellular/gnss/sample.yaml b/samples/cellular/gnss/sample.yaml index 93281beeb07e..bb71de0ba9a5 100644 --- a/samples/cellular/gnss/sample.yaml +++ b/samples/cellular/gnss/sample.yaml @@ -35,6 +35,7 @@ tests: - CONFIG_GNSS_SAMPLE_REFERENCE_LONGITUDE="23.77588976" - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y - CONFIG_LOG_BUFFER_SIZE=2048 + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: gnss_SNIPPET="nrf91-modem-trace-uart" integration_platforms: - nrf9151dk/nrf9151/ns @@ -62,6 +63,7 @@ tests: - CONFIG_GNSS_SAMPLE_REFERENCE_LONGITUDE="23.77588976" - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y - CONFIG_LOG_BUFFER_SIZE=2048 + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: gnss_SNIPPET="nrf91-modem-trace-uart" integration_platforms: - nrf9151dk/nrf9151/ns @@ -88,6 +90,7 @@ tests: - CONFIG_GNSS_SAMPLE_REFERENCE_LONGITUDE="23.77588976" - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y - CONFIG_LOG_BUFFER_SIZE=2048 + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: - EXTRA_CONF_FILE=overlay-pgps.conf - gnss_SNIPPET="nrf91-modem-trace-uart" @@ -117,6 +120,7 @@ tests: - CONFIG_GNSS_SAMPLE_REFERENCE_LONGITUDE="23.77588976" - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y - CONFIG_LOG_BUFFER_SIZE=2048 + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: gnss_SNIPPET="nrf91-modem-trace-uart" integration_platforms: - nrf9151dk/nrf9151/ns diff --git a/samples/cellular/location/sample.yaml b/samples/cellular/location/sample.yaml index 26392d144a42..c39114d511c0 100644 --- a/samples/cellular/location/sample.yaml +++ b/samples/cellular/location/sample.yaml @@ -84,6 +84,7 @@ tests: extra_configs: - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y - CONFIG_LOG_BUFFER_SIZE=2048 + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: location_SNIPPET="nrf91-modem-trace-uart" integration_platforms: - nrf9151dk/nrf9151/ns diff --git a/samples/cellular/modem_shell/README.rst b/samples/cellular/modem_shell/README.rst index 81a38860ceeb..6b6b2ab24b5a 100644 --- a/samples/cellular/modem_shell/README.rst +++ b/samples/cellular/modem_shell/README.rst @@ -103,6 +103,14 @@ Examples link search --read link search --start +* Perform environment evaluation for PLMNs 24405, 24412 and 24491: + + .. code-block:: console + + link funmode --flightmode + link funmode --rxonly + link enveval --eval_type dynamic --plmns 24405,24412,24491 + ---- AT commands diff --git a/samples/cellular/modem_shell/prj.conf b/samples/cellular/modem_shell/prj.conf index 06180293e503..bc8c927bc9a5 100644 --- a/samples/cellular/modem_shell/prj.conf +++ b/samples/cellular/modem_shell/prj.conf @@ -119,6 +119,7 @@ CONFIG_LTE_LC_PSM_MODULE=y CONFIG_LTE_LC_RAI_MODULE=y CONFIG_LTE_LC_MODEM_SLEEP_MODULE=y CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE=y +CONFIG_LTE_LC_ENV_EVAL_MODULE=y CONFIG_DATE_TIME=y diff --git a/samples/cellular/modem_shell/sample.yaml b/samples/cellular/modem_shell/sample.yaml index 62725ffa1a04..40e9ed18739c 100644 --- a/samples/cellular/modem_shell/sample.yaml +++ b/samples/cellular/modem_shell/sample.yaml @@ -713,6 +713,7 @@ tests: extra_configs: - CONFIG_LTE_NETWORK_MODE_LTE_M=y - CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y + - CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y extra_args: modem_shell_SNIPPET="nrf91-modem-trace-uart" integration_platforms: - nrf9151dk/nrf9151/ns diff --git a/samples/cellular/modem_shell/src/link/link.c b/samples/cellular/modem_shell/src/link/link.c index b988d7f7e03b..a0c9fd114468 100644 --- a/samples/cellular/modem_shell/src/link/link.c +++ b/samples/cellular/modem_shell/src/link/link.c @@ -270,6 +270,60 @@ void link_ind_handler(const struct lte_lc_evt *const evt) */ mosh_print("TAU pre warning: time %lld", evt->time); break; +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) + case LTE_LC_EVT_ENV_EVAL_RESULT: { + struct mapping_tbl_item const enveval_status_strs[] = { + { 0, "successful" }, + { 5, "failed, aborted because of higher priority operation" }, + { 7, "failed, unspecified" }, + { -1, NULL } + }; + struct mapping_tbl_item const enveval_energy_est_strs[] = { + { LTE_LC_ENERGY_CONSUMPTION_EXCESSIVE, + "bad conditions, excessive energy consumption" }, + { LTE_LC_ENERGY_CONSUMPTION_INCREASED, + "poor conditions, slightly increased energy consumption" }, + { LTE_LC_ENERGY_CONSUMPTION_NORMAL, + "normal conditions" }, + { LTE_LC_ENERGY_CONSUMPTION_REDUCED, + "good conditions, slightly reduced energy consumption" }, + { LTE_LC_ENERGY_CONSUMPTION_EFFICIENT, + "excellent conditions, energy efficient transmission" }, + { -1, NULL } + }; + const struct lte_lc_env_eval_result *result = &evt->env_eval_result; + + mosh_print("Environment evaluation completed with status: %d (%s)", + result->status, + link_shell_map_to_string(enveval_status_strs, result->status, snum)); + mosh_print("Number of PLMN results: %u", result->result_count); + + for (int i = 0; i < result->result_count; i++) { + const struct lte_lc_conn_eval_params *plmn = &result->results[i]; + + mosh_print("PLMN %u:", i + 1); + mosh_print(" MCC: %03d, MNC: %02d", plmn->mcc, plmn->mnc); + mosh_print(" Energy estimate: %d (%s)", + plmn->energy_estimate, + link_shell_map_to_string(enveval_energy_est_strs, + plmn->energy_estimate, snum)); + mosh_print(" Cell ID: %d", plmn->cell_id); + /* rrc_state is ignored because it's always 0 */ + mosh_print(" RSRP: %d dBm, RSRQ: %.1f dB, SNR: %d dB", + RSRP_IDX_TO_DBM(plmn->rsrp), (double)RSRQ_IDX_TO_DB(plmn->rsrq), + SNR_IDX_TO_DB(plmn->snr)); + mosh_print(" EARFCN: %d, Band: %d", + plmn->earfcn, plmn->band); + mosh_print(" CE level: %d, TX power: %d dBm", + plmn->ce_level, plmn->tx_power); + /* tau_trig is ignored because it's always 1 */ + mosh_print(" TX rep: %d, RX rep: %d", plmn->tx_rep, plmn->rx_rep); + mosh_print(" DL pathloss: %d, Phy cell ID: %d", + plmn->dl_pathloss, plmn->phy_cid); + } + break; + } +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ case LTE_LC_EVT_NEIGHBOR_CELL_MEAS: { int i; struct lte_lc_cells_info cells = evt->cells_info; diff --git a/samples/cellular/modem_shell/src/link/link_shell.c b/samples/cellular/modem_shell/src/link/link_shell.c index 3231ab160a84..cb650f0ebf0d 100644 --- a/samples/cellular/modem_shell/src/link/link_shell.c +++ b/samples/cellular/modem_shell/src/link/link_shell.c @@ -22,6 +22,7 @@ #include "link_shell_pdn.h" #include "link_settings.h" #include "net_utils.h" +#include "str_utils.h" #define LINK_SHELL_EDRX_VALUE_STR_LENGTH 4 #define LINK_SHELL_EDRX_PTW_STR_LENGTH 4 @@ -31,6 +32,7 @@ enum link_shell_command { LINK_CMD_STATUS = 0, LINK_CMD_SETTINGS, LINK_CMD_CONEVAL, + LINK_CMD_ENVEVAL, LINK_CMD_DEFCONT, LINK_CMD_DEFCONTAUTH, LINK_CMD_RSRP, @@ -377,6 +379,28 @@ static const char link_modem_usage_str[] = "\n" "Several options can be given and they are run in the given order."; +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) +static const char link_enveval_usage_str[] = + "Usage: link enveval --eval_type --plmns [,,...] | --cancel\n" + "Options:\n" + " --eval_type, [str] Evaluation type:\n" + " 'dynamic', 'light' or 'full'\n" + " --plmns, [str] Mobile Country Code and Mobile Network Code pairs\n" + " --cancel, Cancel ongoing environment evaluation\n" + " -h, --help, Shows this help information\n" + "\n" + "Evaluation types explained:\n" + " Dynamic: PLMN search is stopped after light search if any of the\n" + " PLMNs to evaluate were found. Search is continued over all\n" + " frequency bands if light search did not find any results.\n" + "\n" + " Light: PLMN search is stopped after light search even if no PLMNs\n" + " to evaluate were found.\n" + "\n" + " Full: PLMN search covers all channels in all supported frequency\n" + " bands.\n"; +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ + /* The following do not have short options */ enum { LINK_SHELL_OPT_MEM_SLOT_1 = 1001, @@ -424,6 +448,8 @@ enum { LINK_SHELL_OPT_MODEM_INIT, LINK_SHELL_OPT_MODEM_SHUTDOWN, LINK_SHELL_OPT_MODEM_SHUTDOWN_CFUN0, + LINK_SHELL_OPT_ENVEVAL_EVAL_TYPE, + LINK_SHELL_OPT_ENVEVAL_PLMNS, }; /* Specifying the expected options (both long and short) */ @@ -502,6 +528,8 @@ static struct option long_options[] = { { "init", no_argument, 0, LINK_SHELL_OPT_MODEM_INIT }, { "shutdown", no_argument, 0, LINK_SHELL_OPT_MODEM_SHUTDOWN }, { "shutdown_cfun0", no_argument, 0, LINK_SHELL_OPT_MODEM_SHUTDOWN_CFUN0 }, + { "eval_type", required_argument, 0, LINK_SHELL_OPT_ENVEVAL_EVAL_TYPE }, + { "plmns", required_argument, 0, LINK_SHELL_OPT_ENVEVAL_PLMNS }, { 0, 0, 0, 0 } }; @@ -521,6 +549,11 @@ static void link_shell_print_usage(enum link_shell_command command) case LINK_CMD_DEFCONTAUTH: mosh_print_no_format(link_defcontauth_usage_str); break; +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) + case LINK_CMD_ENVEVAL: + mosh_print_no_format(link_enveval_usage_str); + break; +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ case LINK_CMD_CONNECT: mosh_print_no_format(link_connect_usage_str); break; @@ -649,6 +682,25 @@ static enum lte_lc_neighbor_search_type return search_type; } +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) +#define MOSH_ENVEVAL_EVAL_TYPE_NONE 0xFF + +static enum lte_lc_env_eval_type link_shell_string_to_env_eval_type(const char *eval_type_str) +{ + enum lte_lc_env_eval_type eval_type = MOSH_ENVEVAL_EVAL_TYPE_NONE; + + if (strcmp(eval_type_str, "dynamic") == 0) { + eval_type = LTE_LC_ENV_EVAL_TYPE_DYNAMIC; + } else if (strcmp(eval_type_str, "light") == 0) { + eval_type = LTE_LC_ENV_EVAL_TYPE_LIGHT; + } else if (strcmp(eval_type_str, "full") == 0) { + eval_type = LTE_LC_ENV_EVAL_TYPE_FULL; + } + + return eval_type; +} +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ + int link_shell_get_and_print_current_system_modes( enum lte_lc_system_mode *sys_mode_current, enum lte_lc_system_mode_preference *sys_mode_preferred, @@ -827,6 +879,170 @@ static int link_shell_coneval(const struct shell *shell, size_t argc, char **arg return 0; } +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) +static int link_shell_string_to_env_eval_plmn_list( + char *plmn_str, + struct lte_lc_env_eval_plmn *plmn_list, + uint8_t *plmn_count) +{ + int ret = 0; + size_t plmn_str_len; + char *plmn_ptr; + uint8_t count = 0; + + __ASSERT_NO_MSG(plmn_str != NULL); + __ASSERT_NO_MSG(plmn_list != NULL); + __ASSERT_NO_MSG(plmn_count != NULL); + + *plmn_count = 0; + + plmn_str_len = strlen(plmn_str); + plmn_ptr = plmn_str; + + /* Replace commas with nul-terminators. */ + for (int i = 0; i < plmn_str_len; i++) { + if (plmn_ptr[i] == ',') { + plmn_ptr[i] = '\0'; + } + } + + while (plmn_ptr < (plmn_str + plmn_str_len)) { + if (count >= CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT) { + mosh_error("Number of PLMNs exceeds CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT" + " (%d)", + CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT); + return -EINVAL; + } + + if (strlen(plmn_ptr) < 5) { + mosh_error("Invalid PLMN: %s", plmn_ptr); + return -EBADMSG; + } + + /* Read MNC and store as integer. The MNC starts as the fourth character + * in the string, following three characters long MCC. + */ + ret = mosh_string_to_int(&plmn_ptr[3], 10, &plmn_list[count].mnc); + if (ret) { + return -EBADMSG; + } + + /* Nul-terminate MCC, read and store it. */ + plmn_ptr[3] = '\0'; + ret = mosh_string_to_int(&plmn_ptr[0], 10, &plmn_list[count].mcc); + if (ret) { + return -EBADMSG; + } + + if (plmn_list[count].mcc == 0 || plmn_list[count].mnc == 0) { + mosh_error("Invalid PLMN: MCC: %03d, MNC: %02d", + plmn_list[count].mcc, plmn_list[count].mnc); + return -EBADMSG; + } + + count++; + + /* Skip parsed PLMN, which is at least 5 digits. */ + plmn_ptr += 5; + + if (*plmn_ptr != '\0') { + /* Skip 6th digit.*/ + plmn_ptr++; + } + /* Skip nul-terminator. */ + plmn_ptr++; + } + + *plmn_count = count; + + return ret; +} + +static int link_shell_enveval(const struct shell *shell, size_t argc, char **argv) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = {0}; + struct lte_lc_env_eval_params params = { + .eval_type = MOSH_ENVEVAL_EVAL_TYPE_NONE, + .plmn_list = plmn_list + }; + bool cancel = false; + + if (argc < 2) { + goto show_usage; + } + + optreset = 1; + optind = 1; + int opt; + + while ((opt = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) { + switch (opt) { + case LINK_SHELL_OPT_ENVEVAL_EVAL_TYPE: + params.eval_type = link_shell_string_to_env_eval_type(optarg); + if (params.eval_type == MOSH_ENVEVAL_EVAL_TYPE_NONE) { + mosh_error("Unknown evaluation type. See usage:"); + goto show_usage; + } + break; + case LINK_SHELL_OPT_ENVEVAL_PLMNS: + ret = link_shell_string_to_env_eval_plmn_list( + optarg, params.plmn_list, ¶ms.plmn_count); + if (ret) { + mosh_error("Invalid PLMN list. See usage:"); + goto show_usage; + } + break; + case LINK_SHELL_OPT_STOP: + cancel = true; + break; + + case 'h': + goto show_usage; + case '?': + default: + mosh_error("Unknown option (%s). See usage:", argv[optind - 1]); + goto show_usage; + } + } + + if (cancel) { + mosh_print("Cancelling environment evaluation..."); + ret = lte_lc_env_eval_cancel(); + if (ret) { + mosh_error("lte_lc_env_eval_cancel() returned %d", ret); + return -ENOEXEC; + } + return 0; + } + + /* Validate that both eval_type and plmns were provided */ + if (params.eval_type == MOSH_ENVEVAL_EVAL_TYPE_NONE) { + mosh_error("Evaluation type must be specified. See usage:"); + goto show_usage; + } + + if (params.plmn_count == 0) { + mosh_error("At least one PLMN must be specified. See usage:"); + goto show_usage; + } + + mosh_print("Starting environment evaluation for %zu PLMN(s)...", params.plmn_count); + + ret = lte_lc_env_eval(¶ms); + if (ret) { + mosh_error("lte_lc_env_eval() returned %d", ret); + return -ENOEXEC; + } + + return 0; + +show_usage: + link_shell_print_usage(LINK_CMD_ENVEVAL); + return -EINVAL; +} +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ + static int link_shell_defcont(const struct shell *shell, size_t argc, char **argv) { int ret = 0; @@ -2756,6 +2972,12 @@ SHELL_STATIC_SUBCMD_SET_CREATE( edrx, NULL, "Enable/disable eDRX with default or with custom parameters.", link_shell_edrx, 0, 10), +#if defined(CONFIG_LTE_LC_ENV_EVAL_MODULE) + SHELL_CMD_ARG( + enveval, NULL, + "Perform environment evaluation for specified PLMNs.", + link_shell_enveval, 0, 20), +#endif /* CONFIG_LTE_LC_ENV_EVAL_MODULE */ SHELL_CMD_ARG( funmode, NULL, "Set/read functional modes of the modem.", diff --git a/samples/cellular/modem_shell/src/utils/str_utils.c b/samples/cellular/modem_shell/src/utils/str_utils.c index 3beff3c4e56a..224db55aaff9 100644 --- a/samples/cellular/modem_shell/src/utils/str_utils.c +++ b/samples/cellular/modem_shell/src/utils/str_utils.c @@ -133,3 +133,23 @@ const char *gnss_system_str_get(uint8_t system_id) return "unknown"; } } + +int mosh_string_to_int(const char *str_buf, int base, int *output) +{ + int temp; + char *end_ptr; + + __ASSERT_NO_MSG(str_buf != NULL); + + errno = 0; + temp = strtol(str_buf, &end_ptr, base); + + if (end_ptr == str_buf || *end_ptr != '\0' || + ((temp == LONG_MAX || temp == LONG_MIN) && errno == ERANGE)) { + return -ENODATA; + } + + *output = temp; + + return 0; +} diff --git a/samples/cellular/modem_shell/src/utils/str_utils.h b/samples/cellular/modem_shell/src/utils/str_utils.h index 53b9c311cac2..5c52dcdd7b6f 100644 --- a/samples/cellular/modem_shell/src/utils/str_utils.h +++ b/samples/cellular/modem_shell/src/utils/str_utils.h @@ -29,4 +29,7 @@ void agnss_data_flags_str_get(char *flags_string, uint32_t data_flags); /* Returns the given GNSS system as a string. */ const char *gnss_system_str_get(uint8_t system_id); +/* Converts a string to an integer. Uses strtol(), but adds error checks. */ +int mosh_string_to_int(const char *str_buf, int base, int *output); + #endif diff --git a/samples/cellular/nrf_cloud_coap_fota/src/main.c b/samples/cellular/nrf_cloud_coap_fota/src/main.c index 65e3ad28425e..84974daf0942 100644 --- a/samples/cellular/nrf_cloud_coap_fota/src/main.c +++ b/samples/cellular/nrf_cloud_coap_fota/src/main.c @@ -581,16 +581,13 @@ int main(void) * it. This is a blocking operation which can take a long time. * This function is likely to reboot in order to complete the FOTA update. */ - while (true) { - err = nrf_cloud_fota_poll_process(&fota_ctx); - if (err == -ENOTRECOVERABLE) { - sample_reboot(FOTA_REBOOT_SYS_ERROR); - } else if ((err == -ENOENT) || (err == -EFAULT)) { - /* A job has finished or failed, check again for another */ - continue; - } - - break; + err = nrf_cloud_fota_poll_process(&fota_ctx); + if (err == -ENOTRECOVERABLE) { + LOG_ERR("A fatal error occurred during FOTA processing"); + sample_reboot(FOTA_REBOOT_SYS_ERROR); + } else if (err == -ENOENT) { + /* A job has finished, check again for another */ + continue; } /* Check the configuration in the shadow to determine the FOTA check interval */ diff --git a/samples/cellular/nrf_cloud_rest_fota/src/main.c b/samples/cellular/nrf_cloud_rest_fota/src/main.c index 9973323c67d7..0a5bede28877 100644 --- a/samples/cellular/nrf_cloud_rest_fota/src/main.c +++ b/samples/cellular/nrf_cloud_rest_fota/src/main.c @@ -473,16 +473,14 @@ int main(void) * it. This is a blocking operation which can take a long time. * This function is likely to reboot in order to complete the FOTA update. */ - while (true) { - err = nrf_cloud_fota_poll_process(&fota_ctx); - if (err == -ENOTRECOVERABLE) { - sample_reboot(FOTA_REBOOT_SYS_ERROR); - } else if ((err == -ENOENT) || (err == -EFAULT)) { - /* A job has finished or failed, check again for another */ - continue; - } - break; + err = nrf_cloud_fota_poll_process(&fota_ctx); + if (err == -ENOTRECOVERABLE) { + LOG_ERR("A fatal error occurred during FOTA processing"); + sample_reboot(FOTA_REBOOT_SYS_ERROR); + } else if (err == -ENOENT) { + /* A job has finished, check again for another */ + continue; } /* Check the configuration in the shadow to determine the FOTA check interval */ diff --git a/samples/crypto/aes_ctr/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/crypto/aes_ctr/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..365cf3c99fab --- /dev/null +++ b/samples/crypto/aes_ctr/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,11 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_PSA_CRYPTO_DRIVER_OBERON=n +CONFIG_PSA_CRYPTO_DRIVER_CRACEN=y + +# Mbedtls configuration +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_HEAP_SIZE=8192 diff --git a/samples/dfu/ab/CMakeLists.txt b/samples/dfu/ab/CMakeLists.txt new file mode 100644 index 000000000000..754f479ca6b0 --- /dev/null +++ b/samples/dfu/ab/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(ab) + +target_sources(app PRIVATE src/main.c) +target_sources(app PRIVATE src/ab_utils.c) + +target_include_directories( + app PRIVATE + ${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/bootutil/include + ${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/include + ${ZEPHYR_BASE}/samples/subsys/mgmt/mcumgr/smp_svr/src + ) + +target_sources_ifdef(CONFIG_MCUMGR_TRANSPORT_BT app PRIVATE + ${ZEPHYR_BASE}/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c) diff --git a/samples/dfu/ab/Kconfig b/samples/dfu/ab/Kconfig new file mode 100644 index 000000000000..98160fae0f97 --- /dev/null +++ b/samples/dfu/ab/Kconfig @@ -0,0 +1,14 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +config N_BLINKS + int "Number of fast blinks" + default 1 + +config EMULATE_APP_HEALTH_CHECK_FAILURE + bool "Blocks confirmation of being healthy after the update" + +source "Kconfig.zephyr" diff --git a/samples/dfu/ab/README.rst b/samples/dfu/ab/README.rst new file mode 100644 index 000000000000..a6592b018e3c --- /dev/null +++ b/samples/dfu/ab/README.rst @@ -0,0 +1,178 @@ +.. _ab_sample: + +A/B with MCUboot +################ + +.. contents:: + :local: + :depth: 2 + +The A/B with MCUboot sample demonstrates how to configure the application for updates using the A/B method using MCUboot. +It also includes an example to perform a device health check before confirming the image after the update. + +You can update the sample using the Simple Management Protocol (SMP) with UART or Bluetooth® Low Energy. + +Requirements +************ + +The sample supports the following development kits: + +.. table-from-sample-yaml:: + +You need the nRF Device Manager app for update over Bluetooth Low Energy: + +* `nRF Device Manager mobile app for Android`_ +* `nRF Device Manager mobile app for iOS`_ + + +Overview +******** + +This sample demonstrates firmware update using the A/B method. +This method allows two copies of the application in the NVM memory. +It is possible to switch between these copies without performing a swap, which significantly reduces time of device's unavailability during the update. +The switch between images can be triggered by the application or, for example, by a hardware button. + +This sample implements an SMP server. +SMP is a basic transfer encoding used with the MCUmgr management protocol. +For more information about MCUmgr and SMP, see :ref:`device_mgmt`. + +The sample supports the following MCUmgr transports by default: + +* Bluetooth +* Serial (UART) + +A/B functionality +================= + +When the A/B functionality is used, the device has two slots for the application: slot A and slot B. +The slots are equivalent, and the device can boot from either of them. +In case of MCUBoot this is achieved by using the Direct XIP feature. +Thus, note that the terms slot 0/primary slot/slot A and slot 1/secondary slot/slot B are used interchangeably in the documentation. +This configuration allows for performing a background update of the non-active slot while the application runs from the active slot. +After the update is complete, the device can quickly switch to the updated slot on the next reboot. + +The following conditions decide which slot will be booted (active) on the next reboot: + +1. If one of the slots is not valid the other slot is selected as active. +2. If both slots are valid, the slot marked as "preferred" is selected as active. +3. If both slots are valid and none is marked as "preferred", the slot with the higher version number is selected as active. +4. If none of the above conditions is met, slot A is selected as active. + +Setting the preffered slot can be done using the ``boot_request_set_preferred_slot`` function. +Currently, this only allows for setting the boot preference for a single reboot. + +Getting the currently running slot +---------------------------------- + +If the project uses the Partition Manager, the currently running slot can be identified by checking if ``CONFIG_NCS_IS_VARIANT_IMAGE`` is defined. +If it is, the application is running from slot B. +Otherwise, it is running from slot A. + +If the project does not use the Partition Manager (configuration currently only supported on nRF54H20), the currently running slot can be identified by comparing the address pointed `zephyr,code-partition` to specific node addresses defined in the device tree. +The following node partitions are used by default: + +* ``slot0_partition`` - application core slot A +* ``slot1_partition`` - application core slot B +* ``cpurad_slot0_partition`` - radio core slot A +* ``cpurad_slot1_partition`` - radio core slot B + +For example, verifying that the application is running from slot A can be done by using the following macro: + +.. code-block:: c + + #define IS_RUNNING_FROM_SLOT_A \ + (FIXED_PARTITION_NODE_OFFSET(DT_CHOSEN(zephyr_code_partition)) == \ + FIXED_PARTITION_OFFSET(slot0_partition)) + +.. _ab_build_files: + +Build files +----------- + +If building with nRF54H20, the merge slot feature is used when Direct XIP is enabled. +This means that for both slot A and slot B the application image and the radio image are merged and treated as a single image by MCUboot. +In this case the following files should be sent to the device when performing an update: + +* :file:`build/zephyr/zephyr_secondary_app.merged.bin` contains slot B image, should be uploaded to the secondary slot when running from slot A. +* :file:`build/zephyr/zephyr.merged.bin` contains slot A image, should be uploaded to the primary slot when running from slot B. + +If building on other supported platforms, where there is no separate radio core, only the application core is updated. +In this case the mcuboot files for the application image are used: + +* :file:`build/mcuboot_secondary_app/zephyr/zephyr.signed.bin` contains slot B image, should be uploaded to the secondary slot when running from slot A. +* :file:`build/ab/zephyr/zephyr.signed.bin` contains slot A image, should be uploaded to the primary slot when running from slot B. + +User interface +************** + +LED 0: + This LED indicates that the application is running from slot A. + It is controlled as active low, meaning it will turn on once the application is booted and blinks (turns off) in short intervals. + The number of short blinks is configurable using the :kconfig:option:`CONFIG_N_BLINKS` Kconfig option. + It will remain off if the application is running from slot B. + +LED 1: + This LED indicates that the application is running from slot B. + It is controlled as active low, meaning it will turn on once the application is booted and blinks (turns off) in short intervals. + The number of short blinks is configurable using the :kconfig:option:`CONFIG_N_BLINKS` Kconfig option. + It will remain off if the application is running from slot A. + +Button 0: + By pressing this button, the non-active slot will be selected as the preferred slot on the next reboot. + This preference applies only to the next boot and is cleared after the subsequent reset. + +Configuration +************* + +|config| + +Configuration options +===================== + +Check and configure the following configuration option for the sample: + +.. _CONFIG_N_BLINKS: + +CONFIG_N_BLINKS - The number of blinks. + This configuration option sets the number of times the LED corresponding to the currently active slot blinks (LED0 for slot A, LED1 for slot B). + The default value of the option is set to ``1``, causing a single blink to indicate *Version 1*. + You can increment this value to represent an update, such as set it to ``2`` to indicate *Version 2*. + +.. _CONFIG_EMULATE_APP_HEALTH_CHECK_FAILURE: + +CONFIG_EMULATE_APP_HEALTH_CHECK_FAILURE - Enables emulation of a broken application that fails the self-test. + This configuration option emulates a broken application that does not pass the self-test. + +Additional configuration +======================== + +Check and configure the :kconfig:option:`CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION` library Kconfig option specific to the MCUboot library. +This configuration option sets the version to pass to imgtool when signing. +To ensure the updated build is preferred after a DFU, set this option to a higher version than the version currently running on the device. + +Building and running +******************** + +.. |sample path| replace:: :file:`samples/dfu/ab` + +.. include:: /includes/build_and_run.txt + +Testing +======= + +To perform DFU using the `nRF Connect Device Manager`_ mobile app, complete the following steps: + +.. include:: /app_dev/device_guides/nrf52/fota_update.rst + :start-after: fota_upgrades_over_ble_nrfcdm_common_dfu_steps_start + :end-before: fota_upgrades_over_ble_nrfcdm_common_dfu_steps_end + +Instead of using the ``dfu_application.zip`` file, you can also send the appropriate binary file directly as described in :ref:`ab_build_files`. +Make sure to select the correct file based on the currently running slot. + +Dependencies +************ + +This sample uses the following |NCS| library: + +* :ref:`MCUboot ` diff --git a/samples/dfu/ab/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/samples/dfu/ab/boards/nrf54h20dk_nrf54h20_cpuapp.overlay new file mode 100644 index 000000000000..af0e3a2720c9 --- /dev/null +++ b/samples/dfu/ab/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "../sysbuild/nrf54h20dk_nrf54h20_memory_map.dtsi" + +/ { + chosen { + zephyr,boot-mode = &boot_request; + }; +}; diff --git a/samples/dfu/ab/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/dfu/ab/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..81b178f64b70 --- /dev/null +++ b/samples/dfu/ab/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "../sysbuild/nrf54l15dk_nrf54l15_cpuapp_common.dtsi" diff --git a/samples/dfu/ab/prj.conf b/samples/dfu/ab/prj.conf new file mode 100644 index 000000000000..8a3e61b2d71d --- /dev/null +++ b/samples/dfu/ab/prj.conf @@ -0,0 +1,102 @@ +# Enable MCUmgr and dependencies. +CONFIG_NET_BUF=y +CONFIG_ZCBOR=y +CONFIG_CRC=y +CONFIG_MCUMGR=y +CONFIG_STREAM_FLASH=y +CONFIG_FLASH_MAP=y + +# Some command handlers require a large stack. +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304 +CONFIG_MAIN_STACK_SIZE=2176 + +# Ensure an MCUboot-compatible binary is generated. +CONFIG_BOOTLOADER_MCUBOOT=y + +# Enable flash operations. +CONFIG_FLASH=y + +# Required by the `taskstat` command. +CONFIG_THREAD_MONITOR=y + +# Support for taskstat command +CONFIG_MCUMGR_GRP_OS_TASKSTAT=y + +# Enable statistics and statistic names. +CONFIG_STATS=y +CONFIG_STATS_NAMES=y + +# Enable most core commands. +CONFIG_FLASH=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUMGR_GRP_IMG=y +CONFIG_MCUMGR_GRP_OS=y +CONFIG_MCUMGR_GRP_STAT=y + +# Enable logging +CONFIG_LOG=y +CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y + +# Disable debug logging +CONFIG_LOG_MAX_LEVEL=3 + +# Enable boot requests through retained memory. +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_NRF_MCUBOOT_BOOT_REQUEST=y + +CONFIG_RETENTION_BOOT_MODE=y +CONFIG_MCUMGR_GRP_OS_RESET_BOOT_MODE=y + +# Enable DK LED/button library +CONFIG_DK_LIBRARY=y + +# Configure bluetooth + +CONFIG_BT=y +CONFIG_BT_PERIPHERAL=y + +# Allow for large Bluetooth data packets. +CONFIG_BT_L2CAP_TX_MTU=498 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=502 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 + +# Enable the Bluetooth mcumgr transport (unauthenticated). +CONFIG_MCUMGR_TRANSPORT_BT=y +CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y + +# Enable the Shell mcumgr transport. +CONFIG_BASE64=y +CONFIG_CRC=y +CONFIG_SHELL=y +CONFIG_SHELL_BACKEND_SERIAL=y +CONFIG_MCUMGR_TRANSPORT_SHELL=y + +# Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies. +# MCUmgr buffer size is optimized to fit one SMP packet divided into five Bluetooth Write Commands, +# transmitted with the maximum possible MTU value: 498 bytes. +CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y +CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475 +CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y +CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=4608 + +# Enable the LittleFS file system. +CONFIG_FILE_SYSTEM=y +CONFIG_FILE_SYSTEM_LITTLEFS=y + +# Enable file system commands +CONFIG_MCUMGR_GRP_FS=y + +# Enable the storage erase command. +CONFIG_MCUMGR_GRP_ZBASIC=y +CONFIG_MCUMGR_GRP_ZBASIC_STORAGE_ERASE=y + +# Disable Bluetooth ping support +CONFIG_BT_CTLR_LE_PING=n + +# Disable shell commands that are not needed +CONFIG_CLOCK_CONTROL_NRF_SHELL=n +CONFIG_DEVICE_SHELL=n +CONFIG_DEVMEM_SHELL=n +CONFIG_FLASH_SHELL=n diff --git a/samples/dfu/ab/sample.yaml b/samples/dfu/ab/sample.yaml new file mode 100644 index 000000000000..6e79e04b5a21 --- /dev/null +++ b/samples/dfu/ab/sample.yaml @@ -0,0 +1,19 @@ +sample: + description: AB update sample + name: ab +common: + sysbuild: true + build_only: true + tags: + - dfu_ab + - ci_samples_dfu + +tests: + sample.dfu.ab: + sysbuild: true + platform_allow: + - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + integration_platforms: + - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l15/cpuapp diff --git a/samples/dfu/ab/src/ab_utils.c b/samples/dfu/ab/src/ab_utils.c new file mode 100644 index 000000000000..6fa6766fae46 --- /dev/null +++ b/samples/dfu/ab/src/ab_utils.c @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include + +#include + +LOG_MODULE_DECLARE(ab_sample); + +#define ACTIVE_IMAGE 0 + +#ifdef CONFIG_PARTITION_MANAGER_ENABLED + +#define SLOT_A_FLASH_AREA_ID PM_MCUBOOT_PRIMARY_ID +#define SLOT_B_FLASH_AREA_ID PM_MCUBOOT_SECONDARY_ID + +#ifdef CONFIG_NCS_IS_VARIANT_IMAGE +#define IS_SLOT_A 0 +#define IS_SLOT_B 1 +#else +#define IS_SLOT_A 1 +#define IS_SLOT_B 0 +#endif + +#else /* CONFIG_PARTITION_MANAGER_ENABLED */ + +#define CODE_PARTITION DT_CHOSEN(zephyr_code_partition) +#define CODE_PARTITION_OFFSET FIXED_PARTITION_NODE_OFFSET(CODE_PARTITION) + +#define SLOT_A_PARTITION slot0_partition +#define SLOT_B_PARTITION slot1_partition + +#define SLOT_A_OFFSET FIXED_PARTITION_OFFSET(SLOT_A_PARTITION) +#define SLOT_B_OFFSET FIXED_PARTITION_OFFSET(SLOT_B_PARTITION) + +#define SLOT_A_FLASH_AREA_ID FIXED_PARTITION_ID(SLOT_A_PARTITION) +#define SLOT_B_FLASH_AREA_ID FIXED_PARTITION_ID(SLOT_B_PARTITION) + +#define IS_SLOT_A (CODE_PARTITION_OFFSET == SLOT_A_OFFSET) +#define IS_SLOT_B (CODE_PARTITION_OFFSET == SLOT_B_OFFSET) + +#endif /* CONFIG_PARTITION_MANAGER_ENABLED */ + +#define STATUS_LEDS_THREAD_STACK_SIZE 512 +#define STATUS_LEDS_THREAD_PRIORITY (CONFIG_NUM_PREEMPT_PRIORITIES - 1) +K_THREAD_STACK_DEFINE(status_leds_thread_stack_area, STATUS_LEDS_THREAD_STACK_SIZE); + +enum ab_boot_slot { + SLOT_A = 0, + SLOT_B = 1, + SLOT_INVALID, +}; + +/** @brief Radio firmware self test + * + * @details + * End-device specific self test should be implemented here. + */ +static bool radio_domain_healthy(void) +{ + return bt_is_ready(); +} + +/** @brief Application firmware self test + * + * @details + * End-device specific self test should be implemented here. Enabling + * CONFIG_EMULATE_APP_HEALTH_CHECK_FAILURE allows to emulate a faulty + * firmware, unable to confirm its health, and ultimately to test + * a rollback to previous firmware after the update. + */ +static bool app_domain_healthy(void) +{ + if (IS_ENABLED(CONFIG_EMULATE_APP_HEALTH_CHECK_FAILURE)) { + return false; + } + + return true; +} + +static enum ab_boot_slot active_boot_slot_get(void) +{ + enum ab_boot_slot active_slot = SLOT_INVALID; + + if (IS_SLOT_A) { + active_slot = SLOT_A; + } else if (IS_SLOT_B) { + active_slot = SLOT_B; + } else { + LOG_ERR("Cannot determine current slot"); + } + + return active_slot; +} + +static void device_healthcheck(void) +{ + int err; + char *img_set = NULL; + const struct flash_area *fa; + int area_id = -1; + enum ab_boot_slot active_slot = active_boot_slot_get(); + + if (active_slot == SLOT_INVALID) { + return; + } + + /* Confirming only in non-degraded boot states + */ + if (active_slot == SLOT_A) { + img_set = "A"; + area_id = SLOT_A_FLASH_AREA_ID; + } else if (active_slot == SLOT_B) { + img_set = "B"; + area_id = SLOT_B_FLASH_AREA_ID; + } + + LOG_INF("Testing image set %s...", img_set); + + bool healthy = true; + + if (!radio_domain_healthy()) { + LOG_ERR("Radio domain is NOT healthy"); + healthy = false; + } + + if (!app_domain_healthy()) { + LOG_ERR("App domain is NOT healthy"); + healthy = false; + } + + if (!healthy) { + LOG_ERR("Reboot the device to try to boot from previous firmware"); + return; + } + + LOG_INF("Confirming..."); + + if (flash_area_open(area_id, &fa) != 0) { + LOG_ERR("Cannot open flash area for slot %s", img_set); + return; + } + + err = boot_set_next(fa, true, true); + + flash_area_close(fa); + if (err == 0) { + LOG_INF("Confirmed\n"); + } else { + LOG_ERR("Failed to confirm, err: %d", err); + } +} + +static void toggle_slot_for_single_boot(void) +{ + int err = 0; + enum ab_boot_slot active_slot = active_boot_slot_get(); + enum ab_boot_slot new_slot = SLOT_INVALID; + + if (active_slot == SLOT_A) { + LOG_INF("Temporarily switching slots (A -> B)"); + new_slot = SLOT_B; + } else if (active_slot == SLOT_B) { + LOG_INF("Temporarily switching slots (B -> A)"); + new_slot = SLOT_A; + } else { + LOG_ERR("Cannot determine active slot, cannot toggle"); + return; + } + + err = boot_request_set_preferred_slot(ACTIVE_IMAGE, new_slot); + + if (err == 0) { + LOG_INF("Slot toggled, restart the device to enforce"); + } else { + LOG_ERR("Failed to toggle slots, err: %d", err); + } +} + +static void boot_state_report(void) +{ + enum ab_boot_slot active_slot = active_boot_slot_get(); + + if (active_slot == SLOT_A) { + LOG_INF("Booted from slot A"); + } else if (active_slot == SLOT_B) { + LOG_INF("Booted from slot B"); + } else { + LOG_INF("Cannot determine active slot"); + } +} + +static void button_handler(uint32_t button_state, uint32_t has_changed) +{ + if ((has_changed & DK_BTN1_MSK) && (button_state & DK_BTN1_MSK)) { + toggle_slot_for_single_boot(); + } +} + +struct k_thread status_leds_thread_data; + +static void status_leds_thread_entry_point(void *p1, void *p2, void *p3) +{ + int blinking_led = DK_LED1; + enum ab_boot_slot active_slot = active_boot_slot_get(); + + if (active_slot == SLOT_A) { + blinking_led = DK_LED1; + } else if (active_slot == SLOT_B) { + blinking_led = DK_LED2; + } else { + return; + } + + while (1) { + for (int i = 0; i < CONFIG_N_BLINKS; i++) { + dk_set_led_off(blinking_led); + k_msleep(250); + dk_set_led_on(blinking_led); + k_msleep(250); + } + + k_msleep(5000); + } +} + +void ab_actions_perform(void) +{ + int ret; + + boot_state_report(); + + ret = dk_leds_init(); + if (ret) { + LOG_ERR("Cannot init LEDs (err: %d)", ret); + } + + ret = dk_buttons_init(button_handler); + if (ret) { + LOG_ERR("Cannot init buttons (err: %d)", ret); + } + + k_thread_create(&status_leds_thread_data, status_leds_thread_stack_area, + K_THREAD_STACK_SIZEOF(status_leds_thread_stack_area), + status_leds_thread_entry_point, + NULL, NULL, NULL, + STATUS_LEDS_THREAD_PRIORITY, 0, K_NO_WAIT); + + device_healthcheck(); +} diff --git a/samples/dfu/ab/src/ab_utils.h b/samples/dfu/ab/src/ab_utils.h new file mode 100644 index 000000000000..abaabbda163a --- /dev/null +++ b/samples/dfu/ab/src/ab_utils.h @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +void ab_actions_perform(void); diff --git a/samples/dfu/ab/src/main.c b/samples/dfu/ab/src/main.c new file mode 100644 index 000000000000..1343bdbf530c --- /dev/null +++ b/samples/dfu/ab/src/main.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2012-2014 Wind River Systems, Inc. + * Copyright (c) 2020 Prevas A/S + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include "ab_utils.h" + +#define LOG_LEVEL LOG_LEVEL_DBG +#include +LOG_MODULE_REGISTER(ab_sample); + +int main(void) +{ +#ifdef CONFIG_MCUMGR_TRANSPORT_BT + start_smp_bluetooth_adverts(); +#endif + + /* Give BLE a moment to start up */ + k_sleep(K_MSEC(1000)); + + ab_actions_perform(); + + /* using __TIME__ ensure that a new binary will be built on every + * compile which is convenient when testing firmware upgrade. + */ + LOG_INF("build time: " __DATE__ " " __TIME__); + + /* The system work queue handles all incoming mcumgr requests. Let the + * main thread idle while the mcumgr server runs. + */ + while (1) { + k_sleep(K_MSEC(1000)); + } + + return 0; +} diff --git a/samples/dfu/ab/sysbuild.conf b/samples/dfu/ab/sysbuild.conf new file mode 100644 index 000000000000..88552323ea65 --- /dev/null +++ b/samples/dfu/ab/sysbuild.conf @@ -0,0 +1,9 @@ +# Enable MCUboot bootloader support +SB_CONFIG_BOOTLOADER_MCUBOOT=y + +# Enable radiocore +SB_CONFIG_NETCORE_IPC_RADIO=y +SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y + +# Enable direct XIP with revert support +SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP_WITH_REVERT=y diff --git a/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54h20dk_nrf54h20_cpuapp.overlay new file mode 100644 index 000000000000..34ce53982244 --- /dev/null +++ b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + + #include "../../nrf54h20dk_nrf54h20_memory_map.dtsi" + +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..077bd792d5da --- /dev/null +++ b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,9 @@ +CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10800 + +# The default MCUboot is too large to support fprotect. +# To use fprotect disable logs or perform other size optimizations. +# For example, do: +# CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xE800 +# CONFIG_LOG=n +# CONFIG_FPROTECT=y +CONFIG_FPROTECT=n diff --git a/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..2bac5c89a493 --- /dev/null +++ b/samples/dfu/ab/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "../../nrf54l15dk_nrf54l15_cpuapp_common.dtsi" diff --git a/samples/dfu/ab/sysbuild/mcuboot/prj.conf b/samples/dfu/ab/sysbuild/mcuboot/prj.conf new file mode 100644 index 000000000000..1d44edf17d6e --- /dev/null +++ b/samples/dfu/ab/sysbuild/mcuboot/prj.conf @@ -0,0 +1,33 @@ +# Enable boot requests through retained memory. +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_NRF_MCUBOOT_BOOT_REQUEST=y + +CONFIG_NRF_SECURITY=y +CONFIG_MULTITHREADING=y + + +# Configuration below is copied from mcuboot/boot/zephyr/prj.conf, as creating +# the sysbuild/mcuboot directory inside a sample removes the default configuration. + +CONFIG_PM=n + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_ENCRYPT_IMAGE=n + +CONFIG_BOOT_UPGRADE_ONLY=n +CONFIG_BOOT_BOOTSTRAP=n + +CONFIG_FLASH=y + +CONFIG_LOG=y +CONFIG_LOG_MODE_MINIMAL=y +CONFIG_LOG_DEFAULT_LEVEL=0 +CONFIG_MCUBOOT_LOG_LEVEL_INF=y +CONFIG_CBPRINTF_NANO=y +CONFIG_PICOLIBC=y +CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0 + +CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="MCUboot" diff --git a/samples/dfu/ab/sysbuild/nrf54h20dk_nrf54h20_memory_map.dtsi b/samples/dfu/ab/sysbuild/nrf54h20dk_nrf54h20_memory_map.dtsi new file mode 100644 index 000000000000..30efd3fbe45a --- /dev/null +++ b/samples/dfu/ab/sysbuild/nrf54h20dk_nrf54h20_memory_map.dtsi @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* On nRF54H20 the Direct XIP mode is supported in the merged slot configuration + * Merge application and radio slots by extending the application partition. + */ +&cpuapp_slot0_partition { + reg = <0x40000 DT_SIZE_K(656)>; +}; + +&cpuapp_slot1_partition { + reg = <0x100000 DT_SIZE_K(656)>; +}; + +/ { + chosen { + nrf,bootloader-request = &boot_request; + }; +}; + +/ { + reserved-memory { + cpuapp_retained_mem: memory@e1ad000 { + compatible = "zephyr,memory-region"; + reg = <0xe1ad000 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + boot_request: boot_request@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 16>; + prefix = [0B 01]; + checksum = <4>; + }; + }; + }; + }; +}; diff --git a/samples/dfu/ab/sysbuild/nrf54l15dk_nrf54l15_cpuapp_common.dtsi b/samples/dfu/ab/sysbuild/nrf54l15dk_nrf54l15_cpuapp_common.dtsi new file mode 100644 index 000000000000..c532170c7dd7 --- /dev/null +++ b/samples/dfu/ab/sysbuild/nrf54l15dk_nrf54l15_cpuapp_common.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nrf,bootloader-request = &boot_request; + }; +}; + +/ { + cpuapp_sram@2003FFF0 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2003FFF0 0x10>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + boot_request: boot_request@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x10>; + prefix = [0B 01]; + checksum = <4>; + }; + }; + }; +}; diff --git a/samples/dfu/dfu_target/README.rst b/samples/dfu/dfu_target/README.rst index cdc0e43400ac..f49fbeb4ca69 100644 --- a/samples/dfu/dfu_target/README.rst +++ b/samples/dfu/dfu_target/README.rst @@ -75,6 +75,10 @@ After programming the sample to your development kit, perform the following step +===================+==================+ | nRF52840 DK | ``0xa8000`` | +-------------------+------------------+ + | nRF54H20 DK | ``0xe092000`` | + +-------------------+------------------+ + | nRF54L15 DK | ``0xf2000`` | + +-------------------+------------------+ #. Upload the second version of the image to the device using ``nrfutil device``: diff --git a/samples/dfu/dfu_target/boards/nrf52840dk_nrf52840.overlay b/samples/dfu/dfu_target/boards/nrf52840dk_nrf52840.overlay deleted file mode 100644 index c99dc472ce00..000000000000 --- a/samples/dfu/dfu_target/boards/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2025 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -/delete-node/ &slot0_partition; -/delete-node/ &slot1_partition; - -/ { - aliases { - dfu-target-helper = &dfu_target_helper_partition; - }; -}; - -&flash0 { - partitions { - slot0_partition: partition@c000 { - label = "image-0"; - reg = <0xc000 0x4e000>; - }; - - slot1_partition: partition@5a000 { - label = "image-1"; - reg = <0x5a000 0x4e000>; - }; - - dfu_target_helper_partition: partition@a8000 { - label = "helper"; - reg = <0xa8000 0x4e000>; - }; - }; -}; diff --git a/samples/dfu/dfu_target/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/samples/dfu/dfu_target/boards/nrf54h20dk_nrf54h20_cpuapp.overlay new file mode 100644 index 000000000000..7a27cc385676 --- /dev/null +++ b/samples/dfu/dfu_target/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* This sample does not use the radio core, so the radio partition ca be reused */ +/delete-node/ &cpurad_slot0_partition; + +/ { + aliases { + dfu-target-helper = &dfu_target_helper_partition; + }; +}; + +&mram1x { + partitions { + dfu_target_helper_partition: partition@92000 { + label = "helper"; + reg = <0x92000 DT_SIZE_K(328)>; + }; + }; +}; diff --git a/samples/dfu/dfu_target/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/dfu/dfu_target/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..6d74215ae741 --- /dev/null +++ b/samples/dfu/dfu_target/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml @@ -0,0 +1,75 @@ +EMPTY_0: + address: 0xd800 + end_address: 0xe000 + placement: + after: + - mcuboot + region: flash_primary + size: 0x800 +EMPTY_1: + address: 0x164000 + end_address: 0x165000 + placement: + after: + - mcuboot_secondary + region: flash_primary + size: 0x1000 +app: + address: 0xe800 + end_address: 0xb9000 + region: flash_primary + size: 0xaa800 +bootconf: + address: 0xffd080 + end_address: 0xffd084 + region: bootconf + size: 0x4 +mcuboot: + address: 0x0 + end_address: 0xd800 + placement: + before: + - mcuboot_primary + region: flash_primary + size: 0xd800 +mcuboot_pad: + address: 0xe000 + end_address: 0xe800 + placement: + before: + - mcuboot_primary_app + region: flash_primary + size: 0x800 +mcuboot_primary: + address: 0xe000 + end_address: 0x80000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + sharers: 0x1 + size: 0x72000 + span: *id001 +mcuboot_primary_app: + address: 0xe800 + end_address: 0x80000 + orig_span: &id002 + - app + region: flash_primary + size: 0x71800 + span: *id002 +mcuboot_secondary: + address: 0x80000 + end_address: 0xf2000 + placement: + after: + - mcuboot_primary + region: flash_primary + share_size: + - mcuboot_primary + size: 0x72000 +dfu_target_helper: + address: 0xf2000 + end_address: 0x164000 + region: flash_primary + size: 0x72000 diff --git a/samples/dfu/dfu_target/sample.yaml b/samples/dfu/dfu_target/sample.yaml index ee294cab6ec3..f2fab15e6e93 100644 --- a/samples/dfu/dfu_target/sample.yaml +++ b/samples/dfu/dfu_target/sample.yaml @@ -8,7 +8,10 @@ sample: description: DFU target sample application name: dfu_target sample common: - platform_allow: nrf52840dk/nrf52840 + platform_allow: + - nrf52840dk/nrf52840 + - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l15/cpuapp build_only: true sysbuild: true tests: @@ -18,3 +21,5 @@ tests: - ci_samples_dfu integration_platforms: - nrf52840dk/nrf52840 + - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l15/cpuapp diff --git a/samples/dfu/dfu_target/src/dfu_target_shell.c b/samples/dfu/dfu_target/src/dfu_target_shell.c index ec55578b3e51..b6ed1b15ace5 100644 --- a/samples/dfu/dfu_target/src/dfu_target_shell.c +++ b/samples/dfu/dfu_target/src/dfu_target_shell.c @@ -14,7 +14,9 @@ #include #include +#ifdef CONFIG_PARTITION_MANAGER_ENABLED #include +#endif #define STREAM_BUF_SIZE 256 @@ -22,7 +24,10 @@ #define DFU_TARGET_HELPER_ADDRESS PM_DFU_TARGET_HELPER_ADDRESS #define DFU_TARGET_HELPER_SIZE PM_DFU_TARGET_HELPER_SIZE #else -#define DFU_TARGET_HELPER_ADDRESS DT_REG_ADDR(DT_ALIAS(dfu_target_helper)) +#define DFU_TARGET_HELPER_CONTAINER_ADDRESS DT_REG_ADDR(DT_GPARENT(DT_ALIAS(dfu_target_helper))) +#define DFU_TARGET_HELPER_OFFSET DT_REG_ADDR(DT_ALIAS(dfu_target_helper)) +#define DFU_TARGET_HELPER_ADDRESS ((uint32_t) DFU_TARGET_HELPER_CONTAINER_ADDRESS + \ + DFU_TARGET_HELPER_OFFSET) #define DFU_TARGET_HELPER_SIZE DT_REG_SIZE(DT_ALIAS(dfu_target_helper)) #endif diff --git a/samples/matter/common/config.rst b/samples/matter/common/config.rst index b3547c1fb78d..419ef6d4b689 100644 --- a/samples/matter/common/config.rst +++ b/samples/matter/common/config.rst @@ -94,7 +94,7 @@ CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS .. _CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_TEST: -ONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_TEST +CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_TEST ``bool`` - Enable the testing module for the diagnostic logs cluster. .. _CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_REDIRECT: diff --git a/samples/matter/common/config_matter_stack.rst b/samples/matter/common/config_matter_stack.rst new file mode 100644 index 000000000000..1e0cc14e2e54 --- /dev/null +++ b/samples/matter/common/config_matter_stack.rst @@ -0,0 +1,80 @@ +.. _matter_stack_config: + +Shared configurations in Matter stack +##################################### + +.. contents:: + :local: + :depth: 2 + +This page lists Kconfig options and snippets shared by ``sdk-connectedhomeip``. +See the :ref:`ug_matter_device_advanced_kconfigs` page for more detailed information. + +Configuration options +********************* + +Check and configure the following configuration options: + +.. _CONFIG_CHIP_LAST_FABRIC_REMOVED_ACTION_DELAY: + +CONFIG_CHIP_LAST_FABRIC_REMOVED_ACTION_DELAY + ``int`` - After removing the last fabric wait defined time [in milliseconds] to perform an action. + After removing the last fabric the device will wait for the defined time and then perform an action chosen by the ``CHIP_LAST_FABRIC_REMOVED_ACTION`` option. + This schedule will allow for avoiding race conditions before the device removes non-volatile data. + +.. _CONFIG_FACTORY_DATA_CUSTOM_BACKEND: + +CONFIG_FACTORY_DATA_CUSTOM_BACKEND + ``bool`` - Enable a custom backend for factory data. + This option is used to enable a custom backend for factory data. + The custom backend is used to store the factory data in a custom location. + +.. _CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_PAIRING_START: + +CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_PAIRING_START + ``bool`` - After removing the last fabric erase NVS and start Bluetooth LE advertising. + After removing the last fabric the device will perform the factory reset without rebooting and start the Bluetooth LE advertisement automatically. + The current RAM state will be saved and the new commissioning to the next fabric will use the next possible fabric index. + This option should not be used for devices that normally do not advertise Bluetooth LE on boot to keep their original behavior. + +.. _CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT: + +CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_AND_REBOOT + ``bool`` - After removing the last fabric erase NVS and reboot. + After removing the last fabric the device will perform the factory reset and then reboot. + The current RAM state will be removed and the new commissioning to the new fabric will use the initial fabric index. + This option is the safest. + +.. _CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_ONLY: + +CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_ONLY + ``bool`` - After removing the last fabric erase NVS only. + After removing the last fabric the device will perform the factory reset only without rebooting. + The current RAM state will be saved and the new commissioning to the next fabric will use the next possible fabric index. + +.. _CONFIG_CHIP_LAST_FABRIC_REMOVED_NONE: + +CONFIG_CHIP_LAST_FABRIC_REMOVED_NONE + ``bool`` - After removing the last fabric do not perform any action. + After removing the last fabric the device will not perform factory reset or reboot. + The current state will be left as it is and the Bluetooth LE advertising will not start automatically. + +.. _CONFIG_CHIP_MEMORY_PROFILING: + +CONFIG_CHIP_MEMORY_PROFILING + ``bool`` - Enable features for tracking memory usage. + Enables features for tracking memory usage in Matter. + +.. _CONFIG_CHIP_NUS: + +CONFIG_CHIP_NUS + ``bool`` - Enable Nordic UART service for Matter purposes. + Enables Nordic UART service (NUS) for Matter samples. + Using the NUS service, you can control a Matter sample using pre-defined Bluetooth LE commands and perform defined operations. + The CHIP NUS service can be useful to keep communication with a smart home device when a connection within Matter network is lost. + +.. _CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN: + +CONFIG_CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN + ``int`` - Maximum length of rotating device ID unique ID in bytes + Maximum acceptable length of rotating device ID unique ID in bytes. diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index eb809a84a9fa..f700fa842c28 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -23,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 9010d99d03a8..1b2641544496 100644 --- a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -28,3 +28,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/light_bulb/Kconfig.sysbuild b/samples/matter/light_bulb/Kconfig.sysbuild index 77a196a2835d..1bd4290ab273 100644 --- a/samples/matter/light_bulb/Kconfig.sysbuild +++ b/samples/matter/light_bulb/Kconfig.sysbuild @@ -58,12 +58,13 @@ config NETCORE_APP_UPDATE config DFU_MULTI_IMAGE_PACKAGE_NET default y -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/light_bulb/README.rst b/samples/matter/light_bulb/README.rst index b318d8d529eb..df109b202a0d 100644 --- a/samples/matter/light_bulb/README.rst +++ b/samples/matter/light_bulb/README.rst @@ -187,10 +187,6 @@ To set up an AWS IoT instance and configure the sample, complete the following s #. Observe that the light bulb changes state. The local changes to the attributes always take precedence over what is set in the shadow's desired state. -.. note:: - The integration layer has built-in reconnection logic and tries to maintain the connection as long as the device is connected to the internet. - The reconnection interval can be configured using the :kconfig:option:`CONFIG_AWS_IOT_RECONNECTION_INTERVAL_SECONDS` option. - User interface ************** diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/light_bulb/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/light_bulb/sysbuild/mcuboot/prj.conf b/samples/matter/light_bulb/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/light_bulb/sysbuild/mcuboot/prj.conf +++ b/samples/matter/light_bulb/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/light_switch/Kconfig.sysbuild b/samples/matter/light_switch/Kconfig.sysbuild index 35d328860cfe..de4f655a9cf2 100644 --- a/samples/matter/light_switch/Kconfig.sysbuild +++ b/samples/matter/light_switch/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/light_switch/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/light_switch/sysbuild/mcuboot/prj.conf b/samples/matter/light_switch/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/light_switch/sysbuild/mcuboot/prj.conf +++ b/samples/matter/light_switch/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/lock/Kconfig.sysbuild b/samples/matter/lock/Kconfig.sysbuild index 35d328860cfe..de4f655a9cf2 100644 --- a/samples/matter/lock/Kconfig.sysbuild +++ b/samples/matter/lock/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/lock/README.rst b/samples/matter/lock/README.rst index 0e7800ba30b1..da5d340b935d 100644 --- a/samples/matter/lock/README.rst +++ b/samples/matter/lock/README.rst @@ -138,7 +138,7 @@ In the door lock sample, you can use the following commands with the Bluetooth L * ``Lock`` - To lock the door of the connected device. * ``Unlock`` - To unlock the door of the connected device. -If the device is already connected to the Matter network, the notification about changing the lock state will be send to the Bluetooth controller. +If the device is already connected to the Matter network, the notification about changing the lock state will be sent to the Bluetooth controller. Currently, the door lock's Bluetooth LE service extension with NUS is only available for the nRF52840 and the nRF5340 DKs in the :ref:`Matter over Thread ` network variant. However, you can use the Bluetooth LE service extension regardless of whether the device is connected to a Matter over Thread network or not. @@ -340,7 +340,7 @@ Factory data support Enabling Matter Bluetooth LE with Nordic UART Service ===================================================== -You can enable the :ref:`matter_lock_sample_ble_nus` feature by setting the :kconfig:option:`CONFIG_CHIP_NUS` Kconfig option to ``y``. +You can enable the :ref:`matter_lock_sample_ble_nus` feature by setting the :ref:`CONFIG_CHIP_NUS` Kconfig option to ``y``. .. note:: This sample supports one Bluetooth LE connection at a time. @@ -556,7 +556,7 @@ Onboarding information ++++++++++++++++++++++ When you start the commissioning procedure, the controller must get the onboarding information from the Matter accessory device. -The onboarding information representation depends on your commissioner setup. +The onboarding information representation depends on your commissioner set-up. For this sample, you can use one of the following :ref:`onboarding information formats ` to provide the commissioner with the data payload that includes the device discriminator and the setup PIN code: @@ -809,7 +809,7 @@ To test the :ref:`matter_lock_sample_ble_nus` feature, complete the following st Some of the steps depend on which :ref:`configuration ` the sample was built with. #. Install `nRF Toolbox`_ on your Android (Android 11 or newer) or iOS (iOS 16.1 or newer) smartphone. -#. Build the door lock application for Matter over Thread with the :kconfig:option:`CONFIG_CHIP_NUS` set to ``y``. +#. Build the door lock application for Matter over Thread with the :ref:`CONFIG_CHIP_NUS` set to ``y``. For example, if you build from command line for the ``nrf52840dk/nrf52840``, use the following command: .. code-block:: console @@ -822,7 +822,7 @@ To test the :ref:`matter_lock_sample_ble_nus` feature, complete the following st west flash --erase -#. If you built the sample with the debug configuration, connect the board to an UART console to see the log entries from the device. +#. If you built the sample with the debug configuration, connect the board to a UART console to see the log entries from the device. #. Open the nRF Toolbox application on your smartphone. #. Select :guilabel:`Universal Asynchronous Receiver/Transmitter UART` from the list in the nRF Toolbox application. #. Tap on :guilabel:`Connect`. diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/lock/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/lock/sysbuild/mcuboot/prj.conf b/samples/matter/lock/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/lock/sysbuild/mcuboot/prj.conf +++ b/samples/matter/lock/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/manufacturer_specific/Kconfig.sysbuild b/samples/matter/manufacturer_specific/Kconfig.sysbuild index 46b70e826254..30b29ea50aff 100644 --- a/samples/matter/manufacturer_specific/Kconfig.sysbuild +++ b/samples/matter/manufacturer_specific/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK # Mcuboot padding size is modified to 0x1000 in pm_static file. if SOC_NRF54L10 diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/manufacturer_specific/sysbuild/mcuboot/prj.conf b/samples/matter/manufacturer_specific/sysbuild/mcuboot/prj.conf index 84308ea5fbcd..421f4a8ed983 100644 --- a/samples/matter/manufacturer_specific/sysbuild/mcuboot/prj.conf +++ b/samples/matter/manufacturer_specific/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/smoke_co_alarm/Kconfig.sysbuild b/samples/matter/smoke_co_alarm/Kconfig.sysbuild index b9dc97c5b755..c85955a498ff 100644 --- a/samples/matter/smoke_co_alarm/Kconfig.sysbuild +++ b/samples/matter/smoke_co_alarm/Kconfig.sysbuild @@ -57,13 +57,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK -# Disable checking the external drivers for nRF54L15 DKs. +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK # Mcuboot padding size is modified to 0x1000 in pm_static file. if SOC_NRF54L10 diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/prj.conf b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/prj.conf index 17b3e8b90ff3..5df9597e5ab9 100644 --- a/samples/matter/smoke_co_alarm/sysbuild/mcuboot/prj.conf +++ b/samples/matter/smoke_co_alarm/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/temperature_sensor/Kconfig.sysbuild b/samples/matter/temperature_sensor/Kconfig.sysbuild index 389425aae266..be1d23576ade 100644 --- a/samples/matter/temperature_sensor/Kconfig.sysbuild +++ b/samples/matter/temperature_sensor/Kconfig.sysbuild @@ -60,13 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK -# Disable checking the external drivers for nRF54L15 DKs. +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/temperature_sensor/sysbuild/mcuboot/prj.conf b/samples/matter/temperature_sensor/sysbuild/mcuboot/prj.conf index 84308ea5fbcd..421f4a8ed983 100644 --- a/samples/matter/temperature_sensor/sysbuild/mcuboot/prj.conf +++ b/samples/matter/temperature_sensor/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/template/Kconfig.sysbuild b/samples/matter/template/Kconfig.sysbuild index ac7ef528c05d..cb7309e3cf8b 100644 --- a/samples/matter/template/Kconfig.sysbuild +++ b/samples/matter/template/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if (BOARD_NRF54L15DK || BOARD_NRF54LM20DK) +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # (BOARD_NRF54L15DK || BOARD_NRF54LM20DK) +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK # Mcuboot padding size is modified to 0x1000 in pm_static file. if SOC_NRF54L10 diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/template/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/template/sysbuild/mcuboot/prj.conf b/samples/matter/template/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/template/sysbuild/mcuboot/prj.conf +++ b/samples/matter/template/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/thermostat/Kconfig.sysbuild b/samples/matter/thermostat/Kconfig.sysbuild index df0eb568b366..44dfc3a46e5e 100644 --- a/samples/matter/thermostat/Kconfig.sysbuild +++ b/samples/matter/thermostat/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/thermostat/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/thermostat/sysbuild/mcuboot/prj.conf b/samples/matter/thermostat/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/thermostat/sysbuild/mcuboot/prj.conf +++ b/samples/matter/thermostat/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/matter/window_covering/Kconfig.sysbuild b/samples/matter/window_covering/Kconfig.sysbuild index e3b7d3ef93b9..5703acc308f9 100644 --- a/samples/matter/window_covering/Kconfig.sysbuild +++ b/samples/matter/window_covering/Kconfig.sysbuild @@ -60,12 +60,13 @@ config DFU_MULTI_IMAGE_PACKAGE_NET endif # SOC_SERIES_NRF53X -if BOARD_NRF54L15DK +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK default y -endif # BOARD_NRF54L15DK +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK endif # BOOTLOADER_MCUBOOT diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf index d3b7b8b30b85..f700fa842c28 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -13,7 +13,6 @@ CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_SFDP_DEVICETREE=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y # Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). CONFIG_BOOT_MAX_IMG_SECTORS=512 @@ -24,3 +23,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf index 763aca603c7e..2ea7fac5afc3 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf +++ b/samples/matter/window_covering/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -41,3 +41,7 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512 # reset + 1. Hence, the reboot time increases more and more. # To avoid it enable tickles kernel for mcuboot. CONFIG_TICKLESS_KERNEL=y + +# Use minimal C library instead of picolibc due to fault on this SoC +# KRKNWK-20774 +CONFIG_MINIMAL_LIBC=y diff --git a/samples/matter/window_covering/sysbuild/mcuboot/prj.conf b/samples/matter/window_covering/sysbuild/mcuboot/prj.conf index 350bdca19926..243b5b97dcb7 100644 --- a/samples/matter/window_covering/sysbuild/mcuboot/prj.conf +++ b/samples/matter/window_covering/sysbuild/mcuboot/prj.conf @@ -13,10 +13,9 @@ CONFIG_PM=n CONFIG_FLASH=y CONFIG_FPROTECT=y -# Use minimal C library instead of the Picolib -CONFIG_MINIMAL_LIBC=y - # Bootloader size optimization +CONFIG_CBPRINTF_NANO=y +CONFIG_PRINTK=n CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n diff --git a/samples/net/aws_iot/Kconfig.sysbuild b/samples/net/aws_iot/Kconfig.sysbuild index 5de0b938beb1..4e3e0ac2c78c 100644 --- a/samples/net/aws_iot/Kconfig.sysbuild +++ b/samples/net/aws_iot/Kconfig.sysbuild @@ -5,13 +5,19 @@ # choice BOOTLOADER - default BOOTLOADER_MCUBOOT if !BOARD_NATIVE_SIM && !BOARD_NRF54L15DK_NRF54L15_CPUAPP + default BOOTLOADER_MCUBOOT if !BOARD_NATIVE_SIM && \ + !BOARD_NRF54L15DK_NRF54L15_CPUAPP && \ + !BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP endchoice config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF5340DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 099e104a920b..465fdf65f3dd 100644 --- a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -102,3 +102,6 @@ CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/aws_iot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/aws_iot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..05b468949ddb --- /dev/null +++ b/samples/net/aws_iot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,104 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# MQTT +CONFIG_MQTT_HELPER_PROVISION_CERTIFICATES=y + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=1024 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4800 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=45000 +CONFIG_HEAP_MEM_POOL_SIZE=32000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 44ae03e280ae..a451cd1dd7ef 100644 --- a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -113,3 +113,6 @@ CONFIG_PM_PARTITION_SIZE_TFM=0x1fe00 # Enable LTO to save flash memory CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/aws_iot/sample.yaml b/samples/net/aws_iot/sample.yaml index 246065fd9443..7902a17a29fe 100644 --- a/samples/net/aws_iot/sample.yaml +++ b/samples/net/aws_iot/sample.yaml @@ -55,3 +55,17 @@ tests: extra_args: - aws_iot_SHIELD="nrf7002eb2" - aws_iot_SNIPPET=nrf70-wifi + sample.net.aws_iot.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + tags: + - ci_build + - sysbuild + - ci_samples_net + build_only: true + build_on_all: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + extra_args: + - aws_iot_SHIELD="nrf7002eb2" diff --git a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index d4dabb7b2f99..fb3cf4f6ce07 100644 --- a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -108,3 +108,6 @@ CONFIG_PM_PARTITION_SIZE_TFM=0x1fe00 # Enable LTO to save flash memory CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/coap_client/Kconfig.sysbuild b/samples/net/coap_client/Kconfig.sysbuild index 420c95ed6eea..3ccccc580338 100644 --- a/samples/net/coap_client/Kconfig.sysbuild +++ b/samples/net/coap_client/Kconfig.sysbuild @@ -7,6 +7,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ - BOARD_NRF5340DK_NRF5340_CPUAPP_NS + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/coap_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/coap_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index a1aab514f6a2..bebc2725dfbf 100644 --- a/samples/net/coap_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/coap_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -56,3 +56,6 @@ CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000 CONFIG_L2_WIFI_CONNECTIVITY=y CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 5afec8a3dcbf..8f2d3144b478 100644 --- a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -91,3 +91,6 @@ CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/coap_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/coap_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..fd7f809c60df --- /dev/null +++ b/samples/net/coap_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,93 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4800 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=32000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=15000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 8a6f64cd50be..c245fc7b1430 100644 --- a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -60,3 +60,6 @@ CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000 CONFIG_L2_WIFI_CONNECTIVITY=y CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/coap_client/sample.yaml b/samples/net/coap_client/sample.yaml index 48248e045fa5..5fba366292ea 100644 --- a/samples/net/coap_client/sample.yaml +++ b/samples/net/coap_client/sample.yaml @@ -64,3 +64,16 @@ tests: extra_args: - coap_client_SHIELD="nrf7002eb2" - coap_client_SNIPPET=nrf70-wifi + sample.net.coap_client.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - coap_client_SHIELD="nrf7002eb2" diff --git a/samples/net/download/Kconfig.sysbuild b/samples/net/download/Kconfig.sysbuild index 420c95ed6eea..3ccccc580338 100644 --- a/samples/net/download/Kconfig.sysbuild +++ b/samples/net/download/Kconfig.sysbuild @@ -7,6 +7,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ - BOARD_NRF5340DK_NRF5340_CPUAPP_NS + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/download/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/download/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index 939f0f59a1cd..bb738aa56837 100644 --- a/samples/net/download/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/download/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -67,3 +67,6 @@ CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf index f1c5b8ca2305..d054f66b5c2e 100644 --- a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -103,3 +103,6 @@ CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/download/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/download/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..55abd69046c3 --- /dev/null +++ b/samples/net/download/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,105 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y +CONFIG_MBEDTLS_RSA_C=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4800 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=65000 +CONFIG_HEAP_MEM_POOL_SIZE=32000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 993079dedec0..0e0c050dc008 100644 --- a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -67,3 +67,6 @@ CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/download/sample.yaml b/samples/net/download/sample.yaml index 5b7e45d69fed..73bf7328bec3 100644 --- a/samples/net/download/sample.yaml +++ b/samples/net/download/sample.yaml @@ -79,3 +79,16 @@ tests: extra_args: - download_SHIELD="nrf7002eb2" - download_SNIPPET=nrf70-wifi + sample.net.downloader.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + tags: + - ci_build + - sysbuild + - ci_samples_net + build_only: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + extra_args: + - download_SHIELD="nrf7002eb2" diff --git a/samples/net/http_server/Kconfig.sysbuild b/samples/net/http_server/Kconfig.sysbuild index 420c95ed6eea..3ccccc580338 100644 --- a/samples/net/http_server/Kconfig.sysbuild +++ b/samples/net/http_server/Kconfig.sysbuild @@ -7,6 +7,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ - BOARD_NRF5340DK_NRF5340_CPUAPP_NS + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/http_server/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/http_server/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index 2ae1fce25a72..17d0f482feb0 100644 --- a/samples/net/http_server/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/http_server/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -54,3 +54,6 @@ CONFIG_SHELL_STACK_SIZE=6144 CONFIG_NET_L2_WIFI_SHELL=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_SHELL=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf index d6a758a7f93f..0aca943c92f1 100644 --- a/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -82,3 +82,6 @@ CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_HEAP_MEM_POOL_SIZE=37000 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/http_server/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/http_server/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..d6a758a7f93f --- /dev/null +++ b/samples/net/http_server/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,84 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# IP address config +CONFIG_NET_CONFIG_SETTINGS=y +CONFIG_NET_CONFIG_INIT_TIMEOUT=0 + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# DNS +CONFIG_MDNS_RESPONDER=y +CONFIG_DNS_SD=y +CONFIG_MDNS_RESPONDER_DNS_SD=y +CONFIG_NET_HOSTNAME_ENABLE=y +CONFIG_NET_HOSTNAME_UNIQUE=n +CONFIG_NET_HOSTNAME="httpserver" +CONFIG_POSIX_SINGLE_PROCESS=n + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y +CONFIG_SHELL=y +CONFIG_NET_SHELL=y + +# Zephyr NET Connection Manager connectivity layer +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n +CONFIG_MAIN_STACK_SIZE=6144 + +# mbedTLS and sockets +CONFIG_ZVFS_OPEN_MAX=25 + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=6144 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=37000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 diff --git a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 86d04a9be3d7..33b01fb17622 100644 --- a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -54,3 +54,6 @@ CONFIG_SHELL_STACK_SIZE=6144 CONFIG_NET_L2_WIFI_SHELL=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_SHELL=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/http_server/sample.yaml b/samples/net/http_server/sample.yaml index 6758c13f0dde..05451845371c 100644 --- a/samples/net/http_server/sample.yaml +++ b/samples/net/http_server/sample.yaml @@ -105,3 +105,16 @@ tests: extra_args: - http_server_SHIELD="nrf7002eb2" - http_server_SNIPPET=nrf70-wifi + sample.net.http_server.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - http_server_SHIELD="nrf7002eb2" diff --git a/samples/net/https_client/Kconfig.sysbuild b/samples/net/https_client/Kconfig.sysbuild index 420c95ed6eea..3ccccc580338 100644 --- a/samples/net/https_client/Kconfig.sysbuild +++ b/samples/net/https_client/Kconfig.sysbuild @@ -7,6 +7,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ - BOARD_NRF5340DK_NRF5340_CPUAPP_NS + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/https_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index 4563f4b13954..538a5eca5796 100644 --- a/samples/net/https_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/https_client/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 0dc23d3a47c5..76f1ccd282bc 100644 --- a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -102,3 +102,6 @@ CONFIG_HEAP_MEM_POOL_SIZE=37000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/https_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/https_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..9b484e902052 --- /dev/null +++ b/samples/net/https_client/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,104 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4900 +CONFIG_ISR_STACK_SIZE=512 +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 + +# Heap sizes +CONFIG_MBEDTLS_HEAP_SIZE=65000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 +# Needed to fix RAM overflow +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=37000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index cc6a771230e5..bcc356678393 100644 --- a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/https_client/sample.yaml b/samples/net/https_client/sample.yaml index 29fdf73a8ca0..d97ca4fbe338 100644 --- a/samples/net/https_client/sample.yaml +++ b/samples/net/https_client/sample.yaml @@ -92,3 +92,16 @@ tests: extra_args: - https_client_SHIELD="nrf7002eb2" - https_client_SNIPPET=nrf70-wifi + sample.net.https_client.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - https_client_SHIELD="nrf7002eb2" diff --git a/samples/net/mqtt/Kconfig.sysbuild b/samples/net/mqtt/Kconfig.sysbuild index b6994cf76d87..4da1aaf9dfa1 100644 --- a/samples/net/mqtt/Kconfig.sysbuild +++ b/samples/net/mqtt/Kconfig.sysbuild @@ -8,6 +8,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ BOARD_NRF7002DK_NRF5340_CPUAPP || \ - BOARD_NRF5340DK_NRF5340_CPUAPP_NS + BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/mqtt/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/mqtt/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index 86cc5acf15ce..7680d75131dc 100644 --- a/samples/net/mqtt/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/mqtt/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -61,3 +61,6 @@ CONFIG_PM_PARTITION_SIZE_TFM=0x20000 # Link-time optimizations CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 54158557339f..6a78b18068de 100644 --- a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -92,3 +92,6 @@ CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/mqtt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/mqtt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..8ef8cf977258 --- /dev/null +++ b/samples/net/mqtt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,95 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4800 +CONFIG_ISR_STACK_SIZE=512 +CONFIG_MQTT_HELPER_STACK_SIZE=2900 +CONFIG_MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE=5000 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=60000 +CONFIG_HEAP_MEM_POOL_SIZE=32000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=15000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp.conf b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp.conf index 62323b5b5610..1af7eb9db0e9 100644 --- a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -63,3 +63,6 @@ CONFIG_SETTINGS=y # Link-time optimizations CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index cd709fcc5997..9a44adc491cd 100644 --- a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -65,3 +65,6 @@ CONFIG_PM_PARTITION_SIZE_TFM=0x20000 # Link-time optimizations CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/mqtt/doc/description.rst b/samples/net/mqtt/doc/description.rst index b4840ee3d5b6..d983749113df 100644 --- a/samples/net/mqtt/doc/description.rst +++ b/samples/net/mqtt/doc/description.rst @@ -110,6 +110,7 @@ The sample provides predefined configuration files for the following development * :file:`thingy91x_nrf9151_ns.conf` - Configuration file for the Thingy:91 X. * :file:`boards/nrf7002dk_nrf5340_cpuapp.conf` - Configuration file for the nRF7002 DK. * :file:`nrf54l15dk_nrf54l15_cpuapp.conf` - Configuration file for the nRF54L15 DK. +* :file:`nrf54lm20dk_nrf54lm20a_cpuapp.conf` - Configuration file for the nRF54LM20 DK. * :file:`boards/native_sim.conf` - Configuration file for the native simulator board. Files that are located under the :file:`/boards` folder is automatically merged with the :file:`prj.conf` file when you build for corresponding target. @@ -117,8 +118,8 @@ Files that are located under the :file:`/boards` folder is automatically merged In addition, the sample provides the following overlay configuration files, which are used to enable additional features in the sample: * :file:`overlay-tls-nrf91.conf` - TLS overlay configuration file for nRF91 Series devices. -* :file:`overlay-tls-nrf70.conf` - TLS overlay configuration file for nRF70 Series devices. -* :file:`overlay-tls-nrf54l15-nrf70.conf` - TLS overlay configuration file for nRF54L15 DK. +* :file:`overlay-tls-nrf7002.conf` - TLS overlay configuration file for nRF70 Series devices. +* :file:`overlay-tls-nrf54l-nrf70.conf` - TLS overlay configuration file for nRF54L Series devices. * :file:`overlay-tls-native_sim.conf` - TLS overlay configuration file for the native simulator board. They are located in :file:`samples/net/mqtt` folder. diff --git a/samples/net/mqtt/overlay-tls-nrf54l15-nrf70.conf b/samples/net/mqtt/overlay-tls-nrf54l-nrf70.conf similarity index 100% rename from samples/net/mqtt/overlay-tls-nrf54l15-nrf70.conf rename to samples/net/mqtt/overlay-tls-nrf54l-nrf70.conf diff --git a/samples/net/mqtt/overlay-tls-nrf70.conf b/samples/net/mqtt/overlay-tls-nrf7002.conf similarity index 100% rename from samples/net/mqtt/overlay-tls-nrf70.conf rename to samples/net/mqtt/overlay-tls-nrf7002.conf diff --git a/samples/net/mqtt/sample.yaml b/samples/net/mqtt/sample.yaml index 63620c8e0aad..912703d9f922 100644 --- a/samples/net/mqtt/sample.yaml +++ b/samples/net/mqtt/sample.yaml @@ -36,7 +36,7 @@ tests: - ci_build - sysbuild - ci_samples_net - extra_args: EXTRA_CONF_FILE=overlay-tls-nrf70.conf + extra_args: EXTRA_CONF_FILE=overlay-tls-nrf7002.conf sample.net.mqtt.nrf7002ek.wifi: sysbuild: true build_only: true @@ -63,7 +63,7 @@ tests: - ci_samples_net extra_args: - mqtt_SHIELD="nrf7002ek" - - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf70.conf + - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf7002.conf sample.net.mqtt.nrf54l15.wifi: sysbuild: true build_only: true @@ -86,7 +86,7 @@ tests: extra_args: - mqtt_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" - mqtt_SNIPPET=nrf70-wifi - - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf54l15-nrf70.conf + - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf54l-nrf70.conf sample.net.mqtt.nrf54l15_nrf7002eb2.wifi: sysbuild: true build_only: true @@ -109,7 +109,28 @@ tests: extra_args: - mqtt_SHIELD="nrf7002eb2" - mqtt_SNIPPET=nrf70-wifi - - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf54l15-nrf70.conf + - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf54l-nrf70.conf + sample.net.mqtt.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + build_only: true + platform_allow: nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - mqtt_SHIELD="nrf7002eb2" + sample.net.mqtt.nrf54lm20_nrf7002eb2.wifi.tls: + sysbuild: true + build_only: true + platform_allow: nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - mqtt_SHIELD="nrf7002eb2" + - EXTRA_CONF_FILE=overlay-tls-nrf54l-nrf70.conf sample.net.mqtt.nrf91.tls: sysbuild: true build_only: true diff --git a/samples/net/udp/Kconfig.sysbuild b/samples/net/udp/Kconfig.sysbuild index 029a21b827ea..e18bb5d766df 100644 --- a/samples/net/udp/Kconfig.sysbuild +++ b/samples/net/udp/Kconfig.sysbuild @@ -7,6 +7,7 @@ config WIFI_NRF70 default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \ BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \ - BOARD_NRF54L15DK_NRF54L15_CPUAPP + BOARD_NRF54L15DK_NRF54L15_CPUAPP || \ + BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP source "share/sysbuild/Kconfig" diff --git a/samples/net/udp/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/net/udp/boards/nrf5340dk_nrf5340_cpuapp_ns.conf index a46daa45390c..5c1762747648 100644 --- a/samples/net/udp/boards/nrf5340dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/udp/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -47,3 +47,6 @@ CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 403e1ade1bd5..35945aeddaf3 100644 --- a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -90,3 +90,6 @@ CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 CONFIG_POSIX_FD_MGMT=n CONFIG_POSIX_MESSAGE_PASSING=n CONFIG_POSIX_THREAD_THREADS_MAX=0 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/udp/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/net/udp/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..1ed8af421548 --- /dev/null +++ b/samples/net/udp/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,92 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_CREDENTIALS=y +# Needed for Wi-Fi credentials +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_ZMS=y +CONFIG_SETTINGS=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_ZVFS_OPEN_MAX=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Zephyr NET Connection Manager Connectivity layer. +CONFIG_L2_WIFI_CONNECTIVITY=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=y +CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=5000 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4800 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=32000 +CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=15000 +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index d1477be278ee..fbc8f8c644bb 100644 --- a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -47,3 +47,6 @@ CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n CONFIG_TFM_PROFILE_TYPE_SMALL=y CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 + +# Floating-point printf support +CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/net/udp/sample.yaml b/samples/net/udp/sample.yaml index 245627fe7e6c..a4bfe9744dbb 100644 --- a/samples/net/udp/sample.yaml +++ b/samples/net/udp/sample.yaml @@ -72,3 +72,16 @@ tests: extra_args: - udp_SHIELD="nrf7002eb2" - udp_SNIPPET=nrf70-wifi + sample.net.udp.nrf54lm20_nrf7002eb2.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_net + extra_args: + - udp_SHIELD="nrf7002eb2" diff --git a/samples/nrf_compress/mcuboot_update/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/nrf_compress/mcuboot_update/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml index 1fafdae63199..b11dc03661b3 100644 --- a/samples/nrf_compress/mcuboot_update/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml +++ b/samples/nrf_compress/mcuboot_update/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml @@ -1,34 +1,34 @@ app: - address: 0x10800 + address: 0xb800 end_address: 0xcf000 region: flash_primary - size: 0xbe800 + size: 0xc3800 mcuboot: address: 0x0 - end_address: 0x10000 + end_address: 0xb000 region: flash_primary - size: 0x10000 + size: 0xb000 mcuboot_pad: - address: 0x10000 - end_address: 0x10800 + address: 0xb000 + end_address: 0xb800 region: flash_primary size: 0x800 mcuboot_primary: - address: 0x10000 + address: 0xb000 end_address: 0xcf000 orig_span: &id001 - mcuboot_pad - app region: flash_primary - size: 0xbf000 + size: 0xc4000 span: *id001 mcuboot_primary_app: - address: 0x10800 + address: 0xb800 end_address: 0xcf000 orig_span: &id002 - app region: flash_primary - size: 0xbe800 + size: 0xc3800 span: *id002 mcuboot_secondary: address: 0xcf000 diff --git a/samples/nrf_compress/mcuboot_update/sample.yaml b/samples/nrf_compress/mcuboot_update/sample.yaml index 6dd53cf13c00..db8fb970f51c 100644 --- a/samples/nrf_compress/mcuboot_update/sample.yaml +++ b/samples/nrf_compress/mcuboot_update/sample.yaml @@ -26,5 +26,3 @@ tests: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp - extra_args: - - platform:nrf54l15dk/nrf54l15/cpuapp:mcuboot_CONFIG_FPROTECT=n diff --git a/samples/peripheral/802154_phy_test/prj.conf b/samples/peripheral/802154_phy_test/prj.conf index e76bf6dbc497..cbf71a1d26ed 100644 --- a/samples/peripheral/802154_phy_test/prj.conf +++ b/samples/peripheral/802154_phy_test/prj.conf @@ -25,6 +25,7 @@ CONFIG_RING_BUFFER=y # Additional radio driver configurations CONFIG_NRF_802154_CARRIER_FUNCTIONS=y CONFIG_NRF_802154_ENCRYPTION=n +CONFIG_NRF_802154_TX_DIAGNOSTIC_MODE=y # Shell configuration CONFIG_SHELL=y diff --git a/samples/zephyr/drivers/adc/adc_dt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/samples/zephyr/drivers/adc/adc_dt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay index 7bd25b397c86..7543a7f54be2 100644 --- a/samples/zephyr/drivers/adc/adc_dt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay +++ b/samples/zephyr/drivers/adc/adc_dt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay @@ -6,7 +6,7 @@ / { zephyr,user { - io-channels = <&adc 0>, <&adc 1>, <&adc 7>; + io-channels = <&adc 0>, <&adc 1>, <&adc 3>; }; }; @@ -34,8 +34,8 @@ zephyr,oversampling = <8>; }; - channel@7 { - reg = <7>; + channel@3 { + reg = <3>; zephyr,gain = "ADC_GAIN_1"; zephyr,reference = "ADC_REF_INTERNAL"; zephyr,acquisition-time = ; diff --git a/samples/zephyr/drivers/adc/adc_sequence/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/samples/zephyr/drivers/adc/adc_sequence/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay index 5cef7ffa1a05..d11acc7afd40 100644 --- a/samples/zephyr/drivers/adc/adc_sequence/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay +++ b/samples/zephyr/drivers/adc/adc_sequence/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay @@ -6,7 +6,7 @@ / { zephyr,user { - io-channels = <&adc 0>, <&adc 1>, <&adc 7>; + io-channels = <&adc 0>, <&adc 1>, <&adc 3>; }; }; @@ -40,8 +40,8 @@ zephyr,oversampling = <8>; }; - channel@7 { - reg = <7>; + channel@3 { + reg = <3>; zephyr,gain = "ADC_GAIN_1"; zephyr,reference = "ADC_REF_INTERNAL"; zephyr,acquisition-time = ; diff --git a/samples/zephyr/smp_svr_mini_boot/prj.conf b/samples/zephyr/smp_svr_mini_boot/prj.conf index 0dec9ebd3ba5..74e7768a1e24 100644 --- a/samples/zephyr/smp_svr_mini_boot/prj.conf +++ b/samples/zephyr/smp_svr_mini_boot/prj.conf @@ -44,9 +44,9 @@ CONFIG_BT=y CONFIG_BT_PERIPHERAL=y # Allow for large Bluetooth data packets. -CONFIG_BT_L2CAP_TX_MTU=498 -CONFIG_BT_BUF_ACL_RX_SIZE=502 -CONFIG_BT_BUF_ACL_TX_SIZE=502 +CONFIG_BT_L2CAP_TX_MTU=247 +CONFIG_BT_BUF_ACL_RX_SIZE=251 +CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 # Enable the Bluetooth mcumgr transport (unauthenticated). @@ -62,9 +62,9 @@ CONFIG_MCUMGR_TRANSPORT_SHELL=y # Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies. # MCUmgr buffer size is optimized to fit one SMP packet divided into five Bluetooth Write Commands, -# transmitted with the maximum possible MTU value: 498 bytes. +# transmitted with the maximum possible MTU value: 247 bytes. CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y -CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475 +CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=1220 CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=4608 diff --git a/samples/zephyr/subsys/mgmt/mcumgr/smp_svr/sample.yaml b/samples/zephyr/subsys/mgmt/mcumgr/smp_svr/sample.yaml index c647c070886f..b8fd0950a218 100644 --- a/samples/zephyr/subsys/mgmt/mcumgr/smp_svr/sample.yaml +++ b/samples/zephyr/subsys/mgmt/mcumgr/smp_svr/sample.yaml @@ -38,7 +38,7 @@ tests: extra_args: - OVERLAY_CONFIG="overlay-bt.conf" - DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay" - - mcuboot_CONF_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf" + - mcuboot_OVERLAY_CONFIG="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf" - mcuboot_EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay" - SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y - SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y @@ -52,7 +52,7 @@ tests: extra_args: - OVERLAY_CONFIG="overlay-bt.conf" - DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay" - - mcuboot_CONF_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf" + - mcuboot_OVERLAY_CONFIG="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf" - mcuboot_EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay" - SB_CONFIG_PARTITION_MANAGER=n platform_allow: diff --git a/scripts/ci/tags.yaml b/scripts/ci/tags.yaml index 70aaef849aee..0cb55632604d 100644 --- a/scripts/ci/tags.yaml +++ b/scripts/ci/tags.yaml @@ -49,6 +49,7 @@ bluetooth: - modules/crypto/mbedtls/ - modules/crypto/oberon-psa-crypto/ - modules/crypto/tinycrypt/ + - modules/lib/memfault-firmware-sdk/ - nrf/applications/ipc_radio/ - nrf/cmake/ - nrf/drivers/mpsl/ diff --git a/scripts/quarantine.yaml b/scripts/quarantine.yaml index c02ff859b1b7..a8ef6a55f3e4 100644 --- a/scripts/quarantine.yaml +++ b/scripts/quarantine.yaml @@ -99,3 +99,14 @@ platforms: - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35382" + +- scenarios: + - sample.bluetooth.peripheral_mds + platforms: + - nrf52840dk/nrf52840 + - nrf54l15dk/nrf54l05/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35468" diff --git a/scripts/quarantine_zephyr.yaml b/scripts/quarantine_zephyr.yaml index de8bef1fa29c..50f13976c153 100644 --- a/scripts/quarantine_zephyr.yaml +++ b/scripts/quarantine_zephyr.yaml @@ -213,6 +213,39 @@ - testing.ctest.base comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35402" +- scenarios: + - sample.mgmt.osdp.peripheral_device + - sample.mgmt.osdp.control_panel_sc + - sample.mgmt.osdp.peripheral_device_sc + - sample.mgmt.osdp.control_panel + platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35494" + +- scenarios: + - sample.drivers.crypto.mbedtls + platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35493" + +- scenarios: + - mgmt.mcumgr.fs.mgmt.hash.supported.sha256 + platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35492" + +- scenarios: + - kernel.common.misra + platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35491" + +- scenarios: + - drivers.i2c.target_api.single_role + platforms: + - nrf54lm20dk/nrf54lm20a/cpuapp + comment: "https://nordicsemi.atlassian.net/browse/NCSDK-35490" + # --------------------------------- Won't fix section ----------------------------------- - scenarios: diff --git a/soc/nordic/nrf71/Kconfig b/soc/nordic/nrf71/Kconfig index 52fd9ff01460..3c80b3dc5e41 100644 --- a/soc/nordic/nrf71/Kconfig +++ b/soc/nordic/nrf71/Kconfig @@ -24,6 +24,8 @@ config SOC_NRF7120_ENGA_CPUAPP config SOC_NRF7120_ENGA_CPUFLPR select RISCV_CORE_NORDIC_VPR +if SOC_SERIES_NRF71X + DT_MPC_REGION_SIZE := $(dt_nodelabel_path,nrf_mpc_region) config NRF_TRUSTZONE_FLASH_REGION_SIZE @@ -45,3 +47,5 @@ config NRF_TRUSTZONE_RAM_REGION_SIZE requirements for the partitions. This abstraction allows us to configure TRUSTZONE without depending on peripheral specific symbols. + +endif # SOC_SERIES_NRF71X diff --git a/soc/sercomm/nrf91/Kconfig b/soc/sercomm/nrf91/Kconfig index 70ca0d657101..6cd2063e3efc 100644 --- a/soc/sercomm/nrf91/Kconfig +++ b/soc/sercomm/nrf91/Kconfig @@ -2,5 +2,3 @@ # Copyright (c) 2025 Nordic Semiconductor ASA # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - -source "soc/nordic/Kconfig" diff --git a/soc/sercomm/nrf91/Kconfig.soc b/soc/sercomm/nrf91/Kconfig.soc index 6139e935fad5..6b5b05bb960b 100644 --- a/soc/sercomm/nrf91/Kconfig.soc +++ b/soc/sercomm/nrf91/Kconfig.soc @@ -9,5 +9,3 @@ config SOC_TPM530M config SOC default "tpm530m" if SOC_TPM530M - -source "soc/nordic/nrf91/Kconfig.soc" diff --git a/subsys/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig index 097ebb2febc0..990b298d4904 100644 --- a/subsys/bluetooth/controller/Kconfig +++ b/subsys/bluetooth/controller/Kconfig @@ -80,6 +80,7 @@ config BT_RX_STACK_SIZE default 2200 if BT_SETTINGS default 3200 if BT_SMP && SOC_SERIES_NRF54LX default 1536 if BT_SMP + default 2048 if !BT_SMP && (SOC_SERIES_NRF54LX || SOC_SERIES_NRF54HX) default 1024 range 512 65536 if BT_HCI_RAW range 1100 65536 if BT_MESH diff --git a/subsys/bluetooth/cs_de/cs_de.c b/subsys/bluetooth/cs_de/cs_de.c index cd8f6a21cd25..816b20cf9a1f 100644 --- a/subsys/bluetooth/cs_de/cs_de.c +++ b/subsys/bluetooth/cs_de/cs_de.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(cs_de, CONFIG_BT_CS_DE_LOG_LEVEL); #define CHANNEL_INDEX_OFFSET (2) #define NUM_CHANNELS (75) -#define TONE_QI_BAD_TONE_COUNT_THRESHOLD (4) +#define TONE_QI_OK_TONE_COUNT_THRESHOLD (15) #define PHASE_INVALID (2 * PI) @@ -153,7 +153,7 @@ static int32_t calculate_left_null_compensation_of_peak(int32_t peak_index, CONFIG_BT_CS_DE_NFFT_SIZE) > 0 ? (left_null_index + NORMAL_PEAK_TO_NULL - CONFIG_BT_CS_DE_NFFT_SIZE) - : 0; + : peak_index; } else { compensated_peak_index = left_null_index + NORMAL_PEAK_TO_NULL; } @@ -161,38 +161,9 @@ static int32_t calculate_left_null_compensation_of_peak(int32_t peak_index, return compensated_peak_index; } -static void interpolate_missing_frequencies(float *iq) -{ - /* Channels 23, 24, and 25 are not allowed for use with channel sounding. - * However, the FFT algorithm requires evenly spaced samples. - * IQ values are therefore linearly interpolated from channels 22 and 26. - */ - - const uint8_t ch_22 = 22 - CHANNEL_INDEX_OFFSET; - const uint8_t ch_26 = 26 - CHANNEL_INDEX_OFFSET; - const float i_slope = (iq[2 * ch_26] - iq[2 * ch_22]) / 4.0f; - const float q_slope = (iq[2 * ch_26 + 1] - iq[2 * ch_22 + 1]) / 4.0f; - - for (uint8_t i = ch_22 + 1; i < ch_26; i++) { - iq[2 * i] = iq[2 * ch_22] + i_slope * (i - ch_22); - iq[2 * i + 1] = iq[2 * ch_22 + 1] + q_slope * (i - ch_22); - } -} static void calculate_dist_ifft(float *dist, float iq_tones_comb[2 * CONFIG_BT_CS_DE_NFFT_SIZE]) { - interpolate_missing_frequencies(iq_tones_comb); - - for (uint8_t n = 0; n < 2 * NUM_CHANNELS; n += 2) { - if (iq_tones_comb[n] == 0.0f && iq_tones_comb[n + 1] == 0.0f) { - /* Phase measurements are missing for some channels. - * FFT cannot be used. - */ - LOG_DBG("Could not compute iFFT due to missing frequencies."); - return; - } - } - #if CONFIG_BT_CS_DE_NFFT_SIZE == 512 arm_cfft_f32(&arm_cfft_sR_f32_len512, iq_tones_comb, 0, 1); #elif CONFIG_BT_CS_DE_NFFT_SIZE == 1024 @@ -279,16 +250,16 @@ static void calculate_dist_rtt(cs_de_report_t *p_report) } } -static bool m_is_tone_quality_bad(cs_de_tone_quality_t *p_tone_qi) +static bool m_is_tone_quality_ok(cs_de_tone_quality_t *p_tone_qi, uint8_t channel_map[10]) { - uint8_t bad_tones_count = 0; - + uint8_t ok_tones_count = 0; for (uint8_t i = 0; i < NUM_CHANNELS; ++i) { - if (p_tone_qi[i] == CS_DE_TONE_QUALITY_BAD) { - bad_tones_count += 1; + if (BT_LE_CS_CHANNEL_BIT_GET(channel_map, i + CHANNEL_INDEX_OFFSET) && + p_tone_qi[i] == CS_DE_TONE_QUALITY_OK) { + ok_tones_count += 1; } } - return (bad_tones_count > TONE_QI_BAD_TONE_COUNT_THRESHOLD); + return (ok_tones_count >= TONE_QI_OK_TONE_COUNT_THRESHOLD); } static void cumulate_mean(float *avg, float new_value, uint16_t *N) @@ -422,17 +393,18 @@ static bool process_step_data(struct bt_le_cs_subevent_step *local_step, } void cs_de_populate_report(struct net_buf_simple *local_steps, struct net_buf_simple *peer_steps, - enum bt_conn_le_cs_role role, cs_de_report_t *p_report) + struct bt_conn_le_cs_config *config, cs_de_report_t *p_report) { memset(p_report, 0x0, sizeof(*p_report)); memset(m_n_iqs, 0, sizeof(m_n_iqs)); memset(m_tone_quality_indicators, CS_DE_TONE_QUALITY_BAD, sizeof(m_tone_quality_indicators)); - p_report->role = role; + p_report->role = config->role; - bt_ras_rreq_rd_subevent_data_parse(peer_steps, local_steps, role, process_ranging_header, - NULL, process_step_data, p_report); + bt_ras_rreq_rd_subevent_data_parse(peer_steps, local_steps, config->role, + process_ranging_header, NULL, process_step_data, + p_report); for (uint8_t ap = 0; ap < p_report->n_ap; ap++) { p_report->distance_estimates[ap].ifft = NAN; @@ -440,10 +412,10 @@ void cs_de_populate_report(struct net_buf_simple *local_steps, struct net_buf_si p_report->distance_estimates[ap].rtt = NAN; p_report->distance_estimates[ap].best = NAN; - if (m_is_tone_quality_bad(&m_tone_quality_indicators[ap][0])) { - p_report->tone_quality[ap] = CS_DE_TONE_QUALITY_BAD; - } else { + if (m_is_tone_quality_ok(&m_tone_quality_indicators[ap][0], config->channel_map)) { p_report->tone_quality[ap] = CS_DE_TONE_QUALITY_OK; + } else { + p_report->tone_quality[ap] = CS_DE_TONE_QUALITY_BAD; } } } diff --git a/subsys/dfu/dfu_target/src/dfu_target_full_modem.c b/subsys/dfu/dfu_target/src/dfu_target_full_modem.c index 7adf5b1f77dc..bd645647c226 100644 --- a/subsys/dfu/dfu_target/src/dfu_target_full_modem.c +++ b/subsys/dfu/dfu_target/src/dfu_target_full_modem.c @@ -105,11 +105,26 @@ int dfu_target_full_modem_init(size_t file_size, int img_num, dfu_target_callbac int dfu_target_full_modem_offset_get(size_t *out) { + size_t bytes_written, bytes_buffered; + int err; + if (!configured) { return -EPERM; } - return dfu_target_stream_offset_get(out); + err = dfu_target_stream_offset_get(&bytes_written); + if (err) { + return err; + } + + err = dfu_target_stream_bytes_buffered_get(&bytes_buffered); + if (err) { + return err; + } + + *out = bytes_written + bytes_buffered; + + return 0; } int dfu_target_full_modem_write(const void *const buf, size_t len) diff --git a/subsys/dfu/dfu_target/src/dfu_target_mcuboot.c b/subsys/dfu/dfu_target/src/dfu_target_mcuboot.c index a4ffa3d308cc..d30ba3ecdb66 100644 --- a/subsys/dfu/dfu_target/src/dfu_target_mcuboot.c +++ b/subsys/dfu/dfu_target/src/dfu_target_mcuboot.c @@ -17,7 +17,11 @@ #include #include +#ifdef CONFIG_PARTITION_MANAGER_ENABLED #include +#else +#include +#endif #include #include #include @@ -31,6 +35,8 @@ LOG_MODULE_REGISTER(dfu_target_mcuboot, CONFIG_DFU_TARGET_LOG_LEVEL); #define IS_ALIGNED_32(POINTER) (((uintptr_t)(const void *)(POINTER)) % 4 == 0) +#ifdef CONFIG_PARTITION_MANAGER_ENABLED + #define _MB_SEC_PAT(i, x) PM_MCUBOOT_SECONDARY_ ## i ## _ ## x #define _MB_SEC_PAT_STRING(i, x) STRINGIFY(PM_MCUBOOT_SECONDARY_ ## i ## _ ## x) @@ -44,8 +50,6 @@ LOG_MODULE_REGISTER(dfu_target_mcuboot, CONFIG_DFU_TARGET_LOG_LEVEL); #define _MB_SEC_LA(i, _) _H_MB_SEC_LA(i) -#define _STR_TARGET_NAME(i, _) STRINGIFY(MCUBOOT##i) - #ifdef PM_MCUBOOT_SECONDARY_2_ID #define TARGET_IMAGE_COUNT 3 #elif defined(PM_MCUBOOT_SECONDARY_1_ID) @@ -62,6 +66,36 @@ LOG_MODULE_REGISTER(dfu_target_mcuboot, CONFIG_DFU_TARGET_LOG_LEVEL); #define PM_MCUBOOT_SECONDARY_0_NAME STRINGIFY(PM_MCUBOOT_SECONDARY_NAME) #define PM_MCUBOOT_SECONDARY_0_DEV PM_MCUBOOT_SECONDARY_DEV +#else /* CONFIG_PARTITION_MANAGER_ENABLED */ + +/** + * These definitions are named to align with those used when Partition Manager + * is enabled, ensuring compatibility for use in the array definitions below. + */ + +/** + * The labels are defined: slot1_partition for image 0, slot3_partition for image 1, etc. + */ +#define SEC_PAT_NODELABEL(i) UTIL_CAT(slot, UTIL_CAT(UTIL_INC(UTIL_X2(i)), _partition)) + +#define SEC_PAT_ADDRESS(i) FIXED_PARTITION_OFFSET(SEC_PAT_NODELABEL(i)) + +#define SEC_PAT_SIZE(i) FIXED_PARTITION_SIZE(SEC_PAT_NODELABEL(i)) + +#define _MB_SEC_PAT(i, x) UTIL_CAT(SEC_PAT_, x)(i) + +/* Ignore the 'x' parameter, it is needed for compatibility with Partition Manager scenarios. */ +#define _MB_SEC_PAT_DEV(i, x) FIXED_PARTITION_DEVICE(SEC_PAT_NODELABEL(i)) + +/* Ignore the 'x' parameter, it is needed for compatibility with Partition Manager scenarios. */ +#define _MB_SEC_PAT_STRING(i, x) STRINGIFY(SEC_PAT_NODELABEL(i)) + +#define TARGET_IMAGE_COUNT CONFIG_UPDATEABLE_IMAGE_NUMBER + +#endif /* CONFIG_PARTITION_MANAGER_ENABLED */ + +#define _STR_TARGET_NAME(i, _) STRINGIFY(MCUBOOT##i) + static const size_t secondary_size[] = { LIST_DROP_EMPTY(LISTIFY(TARGET_IMAGE_COUNT, _MB_SEC_PAT, (,), SIZE)) }; diff --git a/subsys/dfu/dfu_target/src/dfu_target_stream.c b/subsys/dfu/dfu_target/src/dfu_target_stream.c index 649c204c8663..268b2f9f05e2 100644 --- a/subsys/dfu/dfu_target/src/dfu_target_stream.c +++ b/subsys/dfu/dfu_target/src/dfu_target_stream.c @@ -149,11 +149,26 @@ int dfu_target_stream_init(const struct dfu_target_stream_init *init) int dfu_target_stream_offset_get(size_t *out) { + if (!out) { + return -EINVAL; + } + *out = stream_flash_bytes_written(&stream); return 0; } +int dfu_target_stream_bytes_buffered_get(size_t *out) +{ + if (!out) { + return -EINVAL; + } + + *out = stream_flash_bytes_buffered(&stream); + + return 0; +} + int dfu_target_stream_write(const uint8_t *buf, size_t len) { #ifdef CONFIG_DFU_TARGET_STREAM_SYNCHRONOUS diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_fota_poll.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_fota_poll.c index e0a014ea11c3..f9b18539b8d7 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_fota_poll.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_fota_poll.c @@ -22,6 +22,9 @@ LOG_MODULE_REGISTER(nrf_cloud_fota_poll, CONFIG_NRF_CLOUD_FOTA_POLL_LOG_LEVEL); #define JOB_WAIT_S 30 +#define IS_RECOVERABLE_NETWORK_ERR(err) \ + ((err) == -ENETDOWN || (err) == -ENETUNREACH || (err) == -EFAULT) + /* FOTA job status strings that provide additional details for nrf_cloud_fota_status values */ const char * const FOTA_STATUS_DETAILS_TIMEOUT = "Download did not complete in the allotted time"; const char * const FOTA_STATUS_DETAILS_CANCELED = "Download was canceled"; @@ -192,21 +195,6 @@ static void cancel_if_job_is_not_valid(struct nrf_cloud_fota_poll_ctx *ctx, } } -/* Function that resets the downloaded image in case full modem FOTA fails. - * This is to avoid resuming the download when doing a full modem FOTA, - * which does not currently work. - */ -static void reset_image(enum dfu_target_image_type img_type) -{ - if (img_type == DFU_TARGET_IMAGE_TYPE_FULL_MODEM) { - int err = fota_download_util_image_reset(DFU_TARGET_IMAGE_TYPE_FULL_MODEM); - - if (err) { - LOG_ERR("fota_download_util_image_reset() failed: %d", err); - } - } -} - /****************************************************/ /* End of transport-specific wrappers. */ /****************************************************/ @@ -237,8 +225,6 @@ static void fota_dl_handler(const struct fota_download_evt *evt) nrf_cloud_download_end(); - reset_image(ctx_ptr->img_type); - fota_status = NRF_CLOUD_FOTA_FAILED; fota_status_details = FOTA_STATUS_DETAILS_DL_ERR; @@ -272,8 +258,6 @@ static void fota_dl_handler(const struct fota_download_evt *evt) LOG_DBG("FOTA download cancelled"); nrf_cloud_download_end(); - reset_image(ctx_ptr->img_type); - fota_status = NRF_CLOUD_FOTA_CANCELED; fota_status_details = FOTA_STATUS_DETAILS_CANCELED; @@ -450,7 +434,7 @@ static int check_for_job(struct nrf_cloud_fota_poll_ctx *ctx, return err; } else if (err) { LOG_ERR("Failed to fetch FOTA job, error: %d", err); - return -ENOENT; + return err; } if (job_ref->type == NRF_CLOUD_FOTA_TYPE__INVALID) { @@ -690,7 +674,8 @@ int nrf_cloud_fota_poll_process(struct nrf_cloud_fota_poll_ctx *ctx) if (validate_in_progress_job()) { err = update_job_status(ctx); if (err) { - return -ENOTRECOVERABLE; + LOG_ERR("Failed to update in-progress FOTA job, error: %d", err); + return IS_RECOVERABLE_NETWORK_ERR(err) ? err : -ENOTRECOVERABLE; } wait_after_job_update(); @@ -705,7 +690,8 @@ int nrf_cloud_fota_poll_process(struct nrf_cloud_fota_poll_ctx *ctx) cleanup(&job); return err; } else if (err < 0) { - return -ENOTRECOVERABLE; + LOG_ERR("Failed to check for FOTA job, error: %d", err); + return IS_RECOVERABLE_NETWORK_ERR(err) ? err : -ENOTRECOVERABLE; } else if (err > 0) { /* No job. */ cleanup(&job); @@ -750,7 +736,8 @@ int nrf_cloud_fota_poll_process(struct nrf_cloud_fota_poll_ctx *ctx) /* Job was not successful, send status to nRF Cloud */ err = update_job_status(ctx); if (err) { - return -ENOTRECOVERABLE; + LOG_ERR("Failed to update nRF Cloud with unsuccessful FOTA job, error: %d", err); + return IS_RECOVERABLE_NETWORK_ERR(err) ? err : -ENOTRECOVERABLE; } wait_after_job_update(); diff --git a/subsys/nrf_security/src/drivers/cracen/CMakeLists.txt b/subsys/nrf_security/src/drivers/cracen/CMakeLists.txt index a70b6e2a040c..34062d9f8cc8 100644 --- a/subsys/nrf_security/src/drivers/cracen/CMakeLists.txt +++ b/subsys/nrf_security/src/drivers/cracen/CMakeLists.txt @@ -11,6 +11,9 @@ set(cracen_driver_sources) include(sxsymcrypt/sxsymcrypt.cmake) include(silexpk/silexpk.cmake) include(cracenpsa/cracenpsa.cmake) +if(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS OR (CONFIG_SOC_NRF54LV10A AND CONFIG_PSA_NEED_CRACEN_CTR_AES)) + include(cracen_sw/cracen_sw.cmake) +endif() # Add include-directories target_include_directories(psa_crypto_library_config diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/cracen_sw.cmake b/subsys/nrf_security/src/drivers/cracen/cracen_sw/cracen_sw.cmake new file mode 100644 index 000000000000..7896873c154d --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/cracen_sw.cmake @@ -0,0 +1,36 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# This directory contains C sources for the CRACEN software workarounds + +list(APPEND cracen_driver_include_dirs + ${CMAKE_CURRENT_LIST_DIR}/include +) + +if(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS OR (CONFIG_SOC_NRF54LV10A AND CONFIG_PSA_NEED_CRACEN_CTR_AES)) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_common.c + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_cipher.c + ) +endif() + +if(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS AND CONFIG_PSA_NEED_CRACEN_MAC_DRIVER) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_mac.c + ) + + if(CONFIG_PSA_NEED_CRACEN_CMAC) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_mac_cmac.c + ) + endif() +endif() + +if((CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS OR CONFIG_SOC_NRF54LV10A) AND CONFIG_PSA_NEED_CRACEN_CTR_AES) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_aes_ctr.c + ) +endif() diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_aes_ctr.h b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_aes_ctr.h new file mode 100644 index 000000000000..df981eff4d41 --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_aes_ctr.h @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#ifndef CRACEN_SW_AES_CTR_H +#define CRACEN_SW_AES_CTR_H + +#include +#include +#include +#include "cracen_psa_primitives.h" + +/** + * @brief Setup software AES-CTR operation + * + * @param operation Pointer to the cipher operation structure. + * @param attributes Key attributes. + * @param key_buffer Key material. + * @param key_buffer_size Size of the key material. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise + */ +psa_status_t cracen_sw_aes_ctr_setup(cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size); + +/** + * @brief Set IV (Counter) for the software AES-CTR operation + * + * @param operation Pointer to the cipher operation structure. + * @param iv IV (Counter) value (16 bytes). + * @param iv_length Length of IV (must be 16). + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise + */ +psa_status_t cracen_sw_aes_ctr_set_iv(cracen_cipher_operation_t *operation, const uint8_t *iv, + size_t iv_length); + +/** + * @brief Update the software AES-CTR operation with new data + * + * @param operation Pointer to cipher operation structure. + * @param input Input data. + * @param input_length Length of the input data. + * @param output Output buffer. + * @param output_size Size of the output buffer. + * @param output_length Pointer where to store the actual output length. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise + */ +psa_status_t cracen_sw_aes_ctr_update(cracen_cipher_operation_t *operation, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length); + +/** + * @brief Finish the software AES-CTR operation + * + * @param operation Pointer to the cipher operation structure. + * @param output_length Pointer to the store actual output length (always 0 for CTR). + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise + */ +psa_status_t cracen_sw_aes_ctr_finish(cracen_cipher_operation_t *operation, size_t *output_length); + +/** + * @brief Perform a single-shot software AES-CTR encryption or decryption. + * + * @param attributes Key attributes. + * @param key_buffer Key material. + * @param key_buffer_size Size of the key material. + * @param iv IV (Counter) value (16 bytes). + * @param iv_length Length of IV (must be 16). + * @param input Input data to encrypt or decrypt. + * @param input_length Length of input data. + * @param output Output buffer. + * @param output_size Size of output buffer. + * @param output_length Pointer to store the actual output length. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise. + */ +psa_status_t cracen_sw_aes_ctr_crypt(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + const uint8_t *iv, size_t iv_length, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length); + +#endif /* CRACEN_SW_AES_CTR_H */ diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_common.h b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_common.h new file mode 100644 index 000000000000..f8573baa628f --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_common.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ +#ifndef CRACEN_SW_COMMON_H +#define CRACEN_SW_COMMON_H + +#include +#include +#include +#include + +/** + * @brief Encrypt a single AES block using ECB mode. + * + * This function is designed for CRACEN software workarounds that need + * AES-ECB encryption functionality. + * + * @param key The AES key reference. + * @param input Pointer to the input block. + * @param input_length Length of the input block. + * @param output Pointer to a 16-byte output buffer. + * @param output_size Size of the output buffer. + * @param output_length Pointer where to store the actual output length. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise. + */ +psa_status_t cracen_aes_ecb_encrypt(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length); + +/** @brief Decrypt a single AES block using ECB mode. + * + * This function is designed for CRACEN software workarounds that need + * AES-ECB decryption functionality. + * + * @param key The AES key reference. + * @param input Pointer to the input block. + * @param input_length Length of the input block. + * @param output Pointer to a 16-byte output buffer. + * @param output_size Size of the output buffer. + * @param output_length Pointer where to store the actual output length. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise. + */ +psa_status_t cracen_aes_ecb_decrypt(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length); + +/** @brief Perform a single AES block encryption operation. + * + * This function is designed for use as an AES primitive in CRACEN software workarounds that require + * it. + * + * @param key The AES key reference. + * @param input Pointer to the input block. + * @param output Pointer to a 16-byte output buffer. + * + * @retval psa_status_t PSA_SUCCESS on success, error code otherwise. + */ +psa_status_t cracen_aes_primitive(const struct sxkeyref *key, const uint8_t *input, + uint8_t *output); + +#endif /* CRACEN_SW_COMMON_H */ diff --git a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.h b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_mac_cmac.h similarity index 92% rename from subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.h rename to subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_mac_cmac.h index fd65e944c42f..9f4a33afa12f 100644 --- a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.h +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/include/cracen_sw_mac_cmac.h @@ -3,13 +3,16 @@ * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#ifndef CRACEN_SW_CMAC_H +#define CRACEN_PSA_SW_CMAC_H #include -#include "common.h" #include "cracen_psa_primitives.h" +#include "../../../cracenpsa/src/common.h" +#include "cracen_sw_common.h" /** - * @brief Setup for software based CMAC operation + * @brief Set up for software based CMAC operation * * This function initializes a CMAC operation with the provided key attributes * and key buffer. It prepares the operation structure for subsequent CMAC @@ -64,3 +67,5 @@ psa_status_t cracen_sw_cmac_finish(cracen_mac_operation_t *op); */ psa_status_t cracen_cmac_compute(cracen_mac_operation_t *op, const uint8_t *input, size_t input_length, uint8_t *mac); + +#endif /* CRACEN_SW_CMAC_H */ diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_aes_ctr.c b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_aes_ctr.c new file mode 100644 index 000000000000..bcbad058e2b9 --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_aes_ctr.c @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "../../../cracenpsa/src/common.h" +#include +#include "cracen_sw_aes_ctr.h" + +/* AES CTR mode counter field is the rightmost 32 bits (4 bytes) of the 16-byte block */ +#define AES_BLOCK_LAST_BYTE_INDEX (SX_BLKCIPHER_AES_BLK_SZ - 1) +#define AES_CTR_COUNTER_START_BYTE (SX_BLKCIPHER_AES_BLK_SZ - 4) + +/* Increments the counter by one block */ +static void increment_counter(uint8_t *ctr) +{ + /* CTR mode increments the rightmost 32 bits in big-endian */ + for (int i = AES_BLOCK_LAST_BYTE_INDEX; i >= AES_CTR_COUNTER_START_BYTE; i--) { + if (++ctr[i] != 0) { + break; + } + } +} + +psa_status_t cracen_sw_aes_ctr_setup(cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size) +{ + psa_status_t status; + + /* Validate AES key size */ + if (key_buffer_size != 16 && key_buffer_size != 24 && key_buffer_size != 32) { + return PSA_ERROR_NOT_SUPPORTED; + } + + /* Verify key buffer fits in operation structure */ + if (key_buffer_size > sizeof(operation->key_buffer)) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + /* Copy the key into the operation struct */ + memcpy(operation->key_buffer, key_buffer, key_buffer_size); + + /* Load the key reference for ECB operations */ + status = cracen_load_keyref(attributes, operation->key_buffer, key_buffer_size, + &operation->keyref); + if (status != PSA_SUCCESS) { + return status; + } + + /* Initialize the operation */ + operation->alg = PSA_ALG_CTR; + operation->dir = CRACEN_ENCRYPT; /* CTR mode is identical for encrypt/decrypt */ + operation->blk_size = SX_BLKCIPHER_AES_BLK_SZ; + operation->unprocessed_input_bytes = 0; + /* We don't consider the initalization finalized until IV is set */ + operation->initialized = false; + + return PSA_SUCCESS; +} + +psa_status_t cracen_sw_aes_ctr_set_iv(cracen_cipher_operation_t *operation, const uint8_t *iv, + size_t iv_length) +{ + if (operation->alg != PSA_ALG_CTR) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + if (iv_length != SX_BLKCIPHER_AES_BLK_SZ) { + return PSA_ERROR_INVALID_ARGUMENT; + } + operation->unprocessed_input_bytes = 0; + /* Copy the IV (which includes the initial counter) */ + memcpy(operation->iv, iv, iv_length); + operation->initialized = true; + + return PSA_SUCCESS; +} + +psa_status_t cracen_sw_aes_ctr_update(cracen_cipher_operation_t *operation, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length) +{ + psa_status_t status = PSA_SUCCESS; + size_t bytes_written = 0; + size_t remaining_input; + const uint8_t *current_input; + uint8_t *current_output; + uint8_t *keystream_block; + size_t keystream_used; + size_t remaining_keystream_bytes; + size_t bytes_to_process; + + *output_length = 0; + + if (!operation->initialized) { + return PSA_ERROR_BAD_STATE; + } + + /* Valid operation, we just don't do anything */ + if (input_length == 0) { + return PSA_SUCCESS; + } + + /* CTR is a stream mode operation so output must be same length as input */ + if (output == NULL || output_size < input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + remaining_input = input_length; + current_input = input; + current_output = output; + + keystream_block = operation->unprocessed_input; + keystream_used = operation->unprocessed_input_bytes; + + while (remaining_input > 0) { + /* Generate a keystream block when starting a new one */ + if (keystream_used == 0) { + uint8_t current_ctr[SX_BLKCIPHER_AES_BLK_SZ]; + + memcpy(current_ctr, operation->iv, SX_BLKCIPHER_AES_BLK_SZ); + + status = cracen_aes_primitive(&operation->keyref, current_ctr, + keystream_block); + if (status != PSA_SUCCESS) { + return status; + } + } + + remaining_keystream_bytes = SX_BLKCIPHER_AES_BLK_SZ - keystream_used; + bytes_to_process = MIN(remaining_input, remaining_keystream_bytes); + + /* XOR keystream slice with input into output */ + for (size_t j = 0; j < bytes_to_process; j++) { + current_output[j] = current_input[j] ^ keystream_block[keystream_used + j]; + } + + + current_input += bytes_to_process; + current_output += bytes_to_process; + remaining_input -= bytes_to_process; + bytes_written += bytes_to_process; + keystream_used += bytes_to_process; + + /* If the keystream block was fully consumed, bump counter for next block */ + if (keystream_used == SX_BLKCIPHER_AES_BLK_SZ) { + keystream_used = 0; + increment_counter(operation->iv); + } + } + + operation->unprocessed_input_bytes = keystream_used; + + *output_length = bytes_written; + return PSA_SUCCESS; +} + +psa_status_t cracen_sw_aes_ctr_finish(cracen_cipher_operation_t *operation, + size_t *output_length) +{ + *output_length = 0; + + if (!operation->initialized) { + return PSA_ERROR_BAD_STATE; + } + + /* CTR is a stream mode operation all data is produced during update(). */ + operation->unprocessed_input_bytes = 0; + + memset(operation->unprocessed_input, 0, SX_BLKCIPHER_AES_BLK_SZ); + + operation->initialized = false; + + return PSA_SUCCESS; +} + +/* Single Shot Crypt which handles both encryption and decryption */ +psa_status_t cracen_sw_aes_ctr_crypt(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + const uint8_t *iv, size_t iv_length, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length) +{ + psa_status_t status; + cracen_cipher_operation_t operation = {0}; + size_t finish_length; + + if (input_length > 0 && input == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + if (output_size > 0 && output == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + *output_length = 0; + + status = cracen_sw_aes_ctr_setup(&operation, attributes, key_buffer, key_buffer_size); + if (status != PSA_SUCCESS) { + return status; + } + + status = cracen_sw_aes_ctr_set_iv(&operation, iv, iv_length); + if (status != PSA_SUCCESS) { + return status; + } + + status = cracen_sw_aes_ctr_update(&operation, input, input_length, output, output_size, + output_length); + if (status != PSA_SUCCESS) { + return status; + } + status = cracen_sw_aes_ctr_finish(&operation, &finish_length); + if (status != PSA_SUCCESS) { + return status; + } + + *output_length += finish_length; + return PSA_SUCCESS; +} diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_cipher.c b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_cipher.c new file mode 100644 index 000000000000..9a8655684c79 --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_cipher.c @@ -0,0 +1,845 @@ +/** + * + * @file + * + * @copyright Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "../../../cracenpsa/src/common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cracen_psa_primitives.h" + +static bool is_alg_supported(psa_algorithm_t alg, const psa_key_attributes_t *attributes) +{ + bool is_supported = false; + + switch (alg) { + case PSA_ALG_STREAM_CIPHER: + /* This is needed because in the PSA APIs the PSA_ALG_STREAM_CIPHER + * relies on the key type to identify which algorithm to use. Here we + * make sure that the key type is supported before we continue. + */ + if (IS_ENABLED(PSA_NEED_CRACEN_STREAM_CIPHER_CHACHA20)) { + is_supported = (psa_get_key_type(attributes) == PSA_KEY_TYPE_CHACHA20) + ? true + : false; + } + break; + case PSA_ALG_CBC_NO_PADDING: + IF_ENABLED(PSA_NEED_CRACEN_CBC_NO_PADDING_AES, + (is_supported = psa_get_key_type(attributes) == PSA_KEY_TYPE_AES)); + break; + case PSA_ALG_CBC_PKCS7: + IF_ENABLED(PSA_NEED_CRACEN_CBC_PKCS7_AES, + (is_supported = psa_get_key_type(attributes) == PSA_KEY_TYPE_AES)); + break; + case PSA_ALG_CTR: + IF_ENABLED(PSA_NEED_CRACEN_CTR_AES, + (is_supported = psa_get_key_type(attributes) == PSA_KEY_TYPE_AES)); + break; + case PSA_ALG_ECB_NO_PADDING: + IF_ENABLED(PSA_NEED_CRACEN_ECB_NO_PADDING_AES, + (is_supported = psa_get_key_type(attributes) == PSA_KEY_TYPE_AES)); + break; + default: + is_supported = false; + break; + } + + return is_supported; +} + +static psa_status_t setup(enum cipher_operation dir, cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, const uint8_t *key_buffer, + size_t key_buffer_size, psa_algorithm_t alg) +{ + if (!is_alg_supported(alg, attributes)) { + return PSA_ERROR_NOT_SUPPORTED; + } + + /* + * Copy the key into the operation struct as it is not guaranteed + * to be valid longer than the function call. + */ + + if (key_buffer_size > sizeof(operation->key_buffer)) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + memcpy(operation->key_buffer, key_buffer, key_buffer_size); + + psa_status_t status = cracen_load_keyref(attributes, operation->key_buffer, key_buffer_size, + &operation->keyref); + if (status != PSA_SUCCESS) { + return status; + } + + operation->alg = alg; + operation->dir = dir; + operation->blk_size = + (alg == PSA_ALG_STREAM_CIPHER) ? SX_BLKCIPHER_MAX_BLK_SZ : SX_BLKCIPHER_AES_BLK_SZ; + + return PSA_SUCCESS; +} + +static psa_status_t crypt(cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, psa_algorithm_t alg, + const uint8_t *input, size_t input_length, uint8_t *output, + size_t output_size, size_t *output_length) +{ + size_t update_output_length = 0; + size_t finish_output_length = 0; + psa_status_t status = cracen_cipher_update(operation, input, input_length, output, + output_size, &update_output_length); + if (status != PSA_SUCCESS) { + return status; + } + + status = cracen_cipher_finish(operation, output + update_output_length, + output_size - update_output_length, &finish_output_length); + if (status != PSA_SUCCESS) { + return status; + } + + *output_length = update_output_length + finish_output_length; + + return status; +} + +static psa_status_t encrypt_cbc(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length, const uint8_t *iv) +{ + int sx_status; + struct sxblkcipher cipher_ctx; + uint8_t padded_input_block[SX_BLKCIPHER_AES_BLK_SZ]; + size_t remaining_bytes = input_length % SX_BLKCIPHER_AES_BLK_SZ; + uint8_t padding = SX_BLKCIPHER_AES_BLK_SZ - remaining_bytes; + size_t padded_input_length = input_length + padding; + size_t full_blocks_length = input_length - remaining_bytes; + + if (output_size < padded_input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + sx_status = sx_blkcipher_create_aescbc_enc(&cipher_ctx, key, iv); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + if (full_blocks_length > 0) { + sx_status = sx_blkcipher_crypt(&cipher_ctx, input, full_blocks_length, output); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + } + + memset(padded_input_block, padding, sizeof(padded_input_block)); + if (remaining_bytes > 0) { + memcpy(padded_input_block, input + full_blocks_length, remaining_bytes); + } + + sx_status = sx_blkcipher_crypt(&cipher_ctx, padded_input_block, sizeof(padded_input_block), + output + full_blocks_length); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_run(&cipher_ctx); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(&cipher_ctx); + if (sx_status == SX_OK) { + *output_length = padded_input_length; + return PSA_SUCCESS; + } else { + return silex_statuscodes_to_psa(sx_status); + } +} + +static psa_status_t decrypt_cbc(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length, const uint8_t *iv) +{ + int sx_status; + struct sxblkcipher cipher_ctx; + + if (input_length % SX_BLKCIPHER_AES_BLK_SZ != 0) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + if (output_size < input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + sx_status = sx_blkcipher_create_aescbc_dec(&cipher_ctx, key, iv); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_crypt(&cipher_ctx, input, input_length, output); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_run(&cipher_ctx); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(&cipher_ctx); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + size_t padding_length = output[input_length - 1]; + size_t padding_index = input_length - padding_length; + uint32_t failure = 0; + + failure |= (padding_length > SX_BLKCIPHER_AES_BLK_SZ); + failure |= (padding_length == 0); + + for (size_t i = 0; i < input_length; i++) { + failure |= (output[i] ^ padding_length) * (i >= padding_index); + } + + *output_length = padding_index; + + return (failure == 0) ? PSA_SUCCESS : PSA_ERROR_INVALID_PADDING; +} + +psa_status_t cracen_cipher_encrypt(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg, const uint8_t *iv, size_t iv_length, + const uint8_t *input, size_t input_length, uint8_t *output, + size_t output_size, size_t *output_length) +{ + __ASSERT_NO_MSG(iv != NULL); + __ASSERT_NO_MSG(input != NULL || input_length == 0); + __ASSERT_NO_MSG(output != NULL); + __ASSERT_NO_MSG(output_length != NULL); + + psa_status_t status; + *output_length = 0; + cracen_cipher_operation_t operation = {0}; + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (alg == PSA_ALG_CTR) { + if (output_size < input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + /* Handle inplace encryption by moving plaintext to right to free space for + * iv + */ + if (input_length && output > input && output < input + input_length) { + memmove(output, input, input_length); + input = output; + } + + return cracen_sw_aes_ctr_crypt(attributes, key_buffer, key_buffer_size, iv, + iv_length, input, input_length, output, + output_size, output_length); + } + } + + if (IS_ENABLED(PSA_NEED_CRACEN_ECB_NO_PADDING_AES) && alg == PSA_ALG_ECB_NO_PADDING) { + struct sxkeyref key; + + status = cracen_load_keyref(attributes, key_buffer, key_buffer_size, &key); + if (status != PSA_SUCCESS) { + return status; + } + return cracen_aes_ecb_encrypt(&key, input, input_length, output, output_size, + output_length); + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CBC_PKCS7_AES) && alg == PSA_ALG_CBC_PKCS7) { + struct sxkeyref key; + + status = cracen_load_keyref(attributes, key_buffer, key_buffer_size, &key); + if (status != PSA_SUCCESS) { + return status; + } + return encrypt_cbc(&key, input, input_length, output, output_size, output_length, + iv); + } + + status = setup(CRACEN_ENCRYPT, &operation, attributes, key_buffer, key_buffer_size, alg); + if (status != PSA_SUCCESS) { + return status; + } + + status = cracen_cipher_set_iv(&operation, iv, iv_length); + if (status != PSA_SUCCESS) { + return status; + } + + return crypt(&operation, attributes, alg, input, input_length, output, output_size, + output_length); +} + +psa_status_t cracen_cipher_decrypt(const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg, const uint8_t *input, size_t input_length, + uint8_t *output, size_t output_size, size_t *output_length) +{ + __ASSERT_NO_MSG(input != NULL || input_length == 0); + __ASSERT_NO_MSG(output != NULL); + __ASSERT_NO_MSG(output_length != NULL); + + cracen_cipher_operation_t operation = {0}; + psa_status_t status; + /* ChaCha20 only supports 12 bytes IV in the single part decryption function */ + const size_t iv_size = (alg == PSA_ALG_STREAM_CIPHER) ? 12 : SX_BLKCIPHER_IV_SZ; + *output_length = 0; + + if (input_length == 0) { + return PSA_SUCCESS; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (alg == PSA_ALG_CTR) { + return cracen_sw_aes_ctr_crypt(attributes, key_buffer, key_buffer_size, + input, iv_size, input + iv_size, + input_length - iv_size, output, output_size, + output_length); + } + } + + if (IS_ENABLED(PSA_NEED_CRACEN_ECB_NO_PADDING_AES) && alg == PSA_ALG_ECB_NO_PADDING) { + struct sxkeyref key; + + status = cracen_load_keyref(attributes, key_buffer, key_buffer_size, &key); + if (status != PSA_SUCCESS) { + return status; + } + return cracen_aes_ecb_decrypt(&key, input, input_length, output, output_size, + output_length); + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CBC_PKCS7_AES) && alg == PSA_ALG_CBC_PKCS7) { + struct sxkeyref key; + + status = cracen_load_keyref(attributes, key_buffer, key_buffer_size, &key); + if (status != PSA_SUCCESS) { + return status; + } + return decrypt_cbc(&key, input + iv_size, input_length - iv_size, output, + output_size, output_length, input); + } + + if (input_length < iv_size) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + status = setup(CRACEN_DECRYPT, &operation, attributes, key_buffer, key_buffer_size, alg); + if (status != PSA_SUCCESS) { + return status; + } + + status = cracen_cipher_set_iv(&operation, input, iv_size); + if (status != PSA_SUCCESS) { + return status; + } + + return crypt(&operation, attributes, alg, input + iv_size, input_length - iv_size, output, + output_size, output_length); +} + +static psa_status_t initialize_cipher(cracen_cipher_operation_t *operation) +{ + int sx_status = SX_ERR_UNINITIALIZED_OBJ; + + switch (operation->alg) { + case PSA_ALG_CBC_NO_PADDING: + if (IS_ENABLED(PSA_NEED_CRACEN_CBC_NO_PADDING_AES)) { + sx_status = operation->dir == CRACEN_DECRYPT + ? sx_blkcipher_create_aescbc_dec(&operation->cipher, + &operation->keyref, + operation->iv) + : sx_blkcipher_create_aescbc_enc(&operation->cipher, + &operation->keyref, + operation->iv); + } + break; + case PSA_ALG_CBC_PKCS7: + if (IS_ENABLED(PSA_NEED_CRACEN_CBC_PKCS7_AES)) { + sx_status = operation->dir == CRACEN_DECRYPT + ? sx_blkcipher_create_aescbc_dec(&operation->cipher, + &operation->keyref, + operation->iv) + : sx_blkcipher_create_aescbc_enc(&operation->cipher, + &operation->keyref, + operation->iv); + } + break; + case PSA_ALG_CTR: + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + sx_status = operation->dir == CRACEN_DECRYPT + ? sx_blkcipher_create_aesctr_dec(&operation->cipher, + &operation->keyref, + operation->iv) + : sx_blkcipher_create_aesctr_enc(&operation->cipher, + &operation->keyref, + operation->iv); + } + break; + case PSA_ALG_STREAM_CIPHER: + if (IS_ENABLED(PSA_NEED_CRACEN_STREAM_CIPHER_CHACHA20)) { + sx_status = operation->dir == CRACEN_DECRYPT + ? sx_blkcipher_create_chacha20_dec( + &operation->cipher, &operation->keyref, + &operation->iv[0], &operation->iv[4]) + : sx_blkcipher_create_chacha20_enc( + &operation->cipher, &operation->keyref, + &operation->iv[0], &operation->iv[4]); + } + break; + default: + sx_status = SX_ERR_INCOMPATIBLE_HW; + } + + operation->initialized = true; + + return silex_statuscodes_to_psa(sx_status); +} + +psa_status_t cracen_cipher_encrypt_setup(cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg) +{ + if (!is_alg_supported(alg, attributes)) { + return PSA_ERROR_NOT_SUPPORTED; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (alg == PSA_ALG_CTR) { + return cracen_sw_aes_ctr_setup(operation, attributes, key_buffer, + key_buffer_size); + } + } + + return setup(CRACEN_ENCRYPT, operation, attributes, key_buffer, key_buffer_size, alg); +} + +psa_status_t cracen_cipher_decrypt_setup(cracen_cipher_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg) +{ + if (!is_alg_supported(alg, attributes)) { + return PSA_ERROR_NOT_SUPPORTED; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + return cracen_sw_aes_ctr_setup(operation, attributes, key_buffer, key_buffer_size); + } + + return setup(CRACEN_DECRYPT, operation, attributes, key_buffer, key_buffer_size, alg); +} + +psa_status_t cracen_cipher_set_iv(cracen_cipher_operation_t *operation, const uint8_t *iv, + size_t iv_length) +{ + __ASSERT_NO_MSG(iv != NULL); + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (operation->alg == PSA_ALG_CTR) { + return cracen_sw_aes_ctr_set_iv(operation, iv, iv_length); + } + } + + /* Set IV is called after the encrypt/decrypt setup functions thus we + * know that we have CHACHA20 as the stream cipher here. Chacha20 + * supports IV length of 12 bytes which uses a zero counter. + * The internal operation->iv is always 16 bytes where the first + * 4 bytes contain the counter. Since the operation is always + * initialized with 0s we can just place the IV in the correct offset. + */ + + if (IS_ENABLED(PSA_NEED_CRACEN_STREAM_CIPHER_CHACHA20)) { + if (operation->alg == PSA_ALG_STREAM_CIPHER) { + if (iv_length == 12) { + memcpy(&operation->iv[4], iv, iv_length); + return PSA_SUCCESS; + } else { + return (iv_length == 8 || iv_length == 16) + ? PSA_ERROR_NOT_SUPPORTED + : PSA_ERROR_INVALID_ARGUMENT; + } + } + } + + if (iv_length != SX_BLKCIPHER_IV_SZ) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + memcpy(operation->iv, iv, iv_length); + return PSA_SUCCESS; +} + +psa_status_t cracen_cipher_update(cracen_cipher_operation_t *operation, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length) +{ + __ASSERT_NO_MSG(input != NULL || input_length == 0); + __ASSERT_NO_MSG(output_length != NULL); + + int sx_status = SX_ERR_UNINITIALIZED_OBJ; + psa_status_t psa_status = PSA_ERROR_CORRUPTION_DETECTED; + *output_length = 0; + + if (input_length == 0) { + return PSA_SUCCESS; + } + + if (output == NULL || output_size < input_length + operation->unprocessed_input_bytes) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (operation->alg == PSA_ALG_CTR) { + return cracen_sw_aes_ctr_update(operation, input, input_length, output, + output_size, output_length); + } + } + + if (operation->unprocessed_input_bytes > 0) { + size_t fill_block_bytes = operation->blk_size - operation->unprocessed_input_bytes; + + if (input_length < fill_block_bytes) { + memcpy(operation->unprocessed_input + operation->unprocessed_input_bytes, + input, input_length); + operation->unprocessed_input_bytes += input_length; + return PSA_SUCCESS; + } + + memcpy(operation->unprocessed_input + operation->unprocessed_input_bytes, input, + fill_block_bytes); + operation->unprocessed_input_bytes += fill_block_bytes; + + /* Adjust input pointers */ + input += fill_block_bytes; + input_length -= fill_block_bytes; + } + + /* Clamp processed data to multiple of block size */ + size_t block_bytes = input_length & ~((uint32_t)operation->blk_size - 1); + + if (operation->dir == CRACEN_DECRYPT && operation->alg == PSA_ALG_CBC_PKCS7) { + /* The last block contains padding. The block containing padding + * must be handled in finish operation. If input data is block + * aligned we must postpone processing of the last block. + */ + if (block_bytes == input_length) { + block_bytes -= (uint32_t)operation->blk_size; + } + } + + if (block_bytes || operation->unprocessed_input_bytes) { + size_t total_output = block_bytes + operation->unprocessed_input_bytes; + + /* sxsymcrypt doesn't support context saving for ECB, as each encrypted block is + * independent from the previous one we just encrypt the so far available full + * blocks. + */ + if (operation->alg == PSA_ALG_ECB_NO_PADDING) { + if (IS_ENABLED(PSA_NEED_CRACEN_ECB_NO_PADDING_AES)) { + + if (operation->unprocessed_input_bytes) { + __ASSERT_NO_MSG(operation->unprocessed_input_bytes == + operation->blk_size); + if (operation->dir == CRACEN_ENCRYPT) { + psa_status = cracen_aes_ecb_encrypt( + &operation->keyref, + operation->unprocessed_input, + operation->unprocessed_input_bytes, output, + output_size, output_length); + } else { + psa_status = cracen_aes_ecb_decrypt( + &operation->keyref, + operation->unprocessed_input, + operation->unprocessed_input_bytes, output, + output_size, output_length); + } + if (psa_status != PSA_SUCCESS) { + return psa_status; + } + output += (uint32_t)operation->unprocessed_input_bytes; + operation->unprocessed_input_bytes = 0; + } + + if (block_bytes) { + if (operation->dir == CRACEN_ENCRYPT) { + psa_status = cracen_aes_ecb_encrypt( + &operation->keyref, input, block_bytes, + output, output_size, output_length); + } else { + psa_status = cracen_aes_ecb_decrypt( + &operation->keyref, input, block_bytes, + output, output_size, output_length); + } + if (psa_status != PSA_SUCCESS) { + return psa_status; + } + } + } + + } else { + if (operation->initialized) { + sx_status = sx_blkcipher_resume_state(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + } else { + psa_status = initialize_cipher(operation); + + if (psa_status != PSA_SUCCESS) { + return psa_status; + } + } + + if (operation->unprocessed_input_bytes) { + __ASSERT_NO_MSG(operation->unprocessed_input_bytes == + operation->blk_size); + sx_status = sx_blkcipher_crypt( + &operation->cipher, operation->unprocessed_input, + operation->unprocessed_input_bytes, output); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + operation->unprocessed_input_bytes = 0; + /* Adjust output pointer. */ + output += (uint32_t)operation->blk_size; + } + + if (block_bytes) { + sx_status = sx_blkcipher_crypt(&operation->cipher, input, + block_bytes, output); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + } + + sx_status = sx_blkcipher_save_state(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + *output_length += total_output; + } + } + + /* Store unprocessed bytes until next update or finalization of crypto + * operation. + */ + if (block_bytes < input_length) { + __ASSERT_NO_MSG(operation->unprocessed_input_bytes == 0); + memcpy(operation->unprocessed_input, input + block_bytes, + input_length - block_bytes); + operation->unprocessed_input_bytes = input_length - block_bytes; + } + + (void)psa_status; + return PSA_SUCCESS; +} + +psa_status_t cracen_cipher_finish(cracen_cipher_operation_t *operation, uint8_t *output, + size_t output_size, size_t *output_length) +{ + __ASSERT_NO_MSG(output_length != NULL); + + int sx_status; + psa_status_t psa_status; + + *output_length = 0; + + if (operation->unprocessed_input_bytes == 0 && operation->alg != PSA_ALG_CBC_PKCS7) { + return PSA_SUCCESS; + } + + __ASSERT_NO_MSG(output != NULL); + + if (IS_ENABLED(PSA_NEED_CRACEN_CTR_AES)) { + if (operation->alg == PSA_ALG_CTR) { + return cracen_sw_aes_ctr_finish(operation, output_length); + } + } + + if (operation->unprocessed_input_bytes == 0 && operation->alg != PSA_ALG_CBC_PKCS7) { + return PSA_SUCCESS; + } + + sx_status = SX_ERR_UNINITIALIZED_OBJ; + + /* sxsymcrypt doesn't support context saving for ECB, as each encrypted block is + * independent from the previous one we just encrypt the so far available full + * blocks. + */ + if (IS_ENABLED(PSA_NEED_CRACEN_ECB_NO_PADDING_AES)) { + if (operation->alg == PSA_ALG_ECB_NO_PADDING) { + if (operation->dir == CRACEN_ENCRYPT) { + return cracen_aes_ecb_encrypt(&operation->keyref, + operation->unprocessed_input, + operation->unprocessed_input_bytes, + output, output_size, output_length); + } else { + return cracen_aes_ecb_decrypt(&operation->keyref, + operation->unprocessed_input, + operation->unprocessed_input_bytes, + output, output_size, output_length); + } + } + } + if (operation->initialized) { + sx_status = sx_blkcipher_resume_state(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + } else { + psa_status = initialize_cipher(operation); + + if (psa_status != PSA_SUCCESS) { + return psa_status; + } + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CBC_PKCS7_AES)) { + if (operation->alg == PSA_ALG_CBC_PKCS7) { + if (operation->dir == CRACEN_ENCRYPT) { + uint8_t padding = (uint32_t)operation->blk_size - + operation->unprocessed_input_bytes; + + /* The value to pad which equals the number of + * padded bytes as described in PKCS7 (rfc2315). + */ + memset(&operation->unprocessed_input + [operation->unprocessed_input_bytes], + padding, padding); + operation->unprocessed_input_bytes = SX_BLKCIPHER_AES_BLK_SZ; + } else { + __ASSERT_NO_MSG(operation->blk_size == SX_BLKCIPHER_AES_BLK_SZ); + + if (operation->unprocessed_input_bytes != SX_BLKCIPHER_AES_BLK_SZ) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + uint8_t out_with_padding[SX_BLKCIPHER_AES_BLK_SZ]; + + sx_status = sx_blkcipher_crypt( + &operation->cipher, operation->unprocessed_input, + operation->unprocessed_input_bytes, out_with_padding); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_run(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + uint8_t padding = out_with_padding[SX_BLKCIPHER_AES_BLK_SZ - 1]; + /* Verify that padding is in the valid + * range. + */ + if (padding > SX_BLKCIPHER_AES_BLK_SZ || padding == 0) { + return PSA_ERROR_INVALID_PADDING; + } + + /* Verify all padding bytes. */ + for (unsigned int i = SX_BLKCIPHER_AES_BLK_SZ; + i > (SX_BLKCIPHER_AES_BLK_SZ - padding); i--) { + if (out_with_padding[i - 1] != padding) { + return PSA_ERROR_INVALID_PADDING; + } + } + + /* Verify output buffer. */ + *output_length = SX_BLKCIPHER_AES_BLK_SZ - padding; + if (*output_length > output_size) { + *output_length = 0; + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + /* Copy plaintext without padding. */ + memcpy(output, out_with_padding, *output_length); + + return PSA_SUCCESS; + } + } + } + + *output_length = operation->unprocessed_input_bytes; + if (*output_length > output_size) { + *output_length = 0; + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if (operation->alg == PSA_ALG_CBC_NO_PADDING && + (operation->unprocessed_input_bytes % SX_BLKCIPHER_AES_BLK_SZ) != 0) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + sx_status = sx_blkcipher_crypt(&operation->cipher, operation->unprocessed_input, + operation->unprocessed_input_bytes, output); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_run(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(&operation->cipher); + if (sx_status) { + return silex_statuscodes_to_psa(sx_status); + } + + return PSA_SUCCESS; +} + +psa_status_t cracen_cipher_abort(cracen_cipher_operation_t *operation) +{ + int sx_status; + + sx_status = sx_blkcipher_free(&operation->cipher); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + safe_memzero(operation, sizeof(cracen_cipher_operation_t)); + return PSA_SUCCESS; +} diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_common.c b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_common.c new file mode 100644 index 000000000000..07d23a66675f --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_common.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include +#include "../../../cracenpsa/src/common.h" +#include "cracen_sw_common.h" + +LOG_MODULE_DECLARE(cracen, CONFIG_CRACEN_LOG_LEVEL); + +psa_status_t cracen_aes_ecb_crypt(struct sxblkcipher *blkciph, + const uint8_t *input, size_t input_length, uint8_t *output, + size_t output_size, size_t *output_length) +{ + int sx_status; + + sx_status = sx_blkcipher_crypt(blkciph, input, input_length, output); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_run(blkciph); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + sx_status = sx_blkcipher_wait(blkciph); + if (sx_status == SX_OK) { + *output_length = input_length; + } + return sx_status; +} + +psa_status_t cracen_aes_ecb_encrypt(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length) +{ + int sx_status; + struct sxblkcipher blkciph; + + if (output_size < input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if ((input_length % SX_BLKCIPHER_AES_BLK_SZ) != 0) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + sx_status = sx_blkcipher_create_aesecb_enc(&blkciph, key); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + return cracen_aes_ecb_crypt(&blkciph, input, input_length, output, output_size, + output_length); +} + +psa_status_t cracen_aes_ecb_decrypt(const struct sxkeyref *key, const uint8_t *input, + size_t input_length, uint8_t *output, size_t output_size, + size_t *output_length) +{ + int sx_status; + struct sxblkcipher blkciph; + + if (output_size < input_length) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if ((input_length % SX_BLKCIPHER_AES_BLK_SZ) != 0) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + sx_status = sx_blkcipher_create_aesecb_dec(&blkciph, key); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + return cracen_aes_ecb_crypt(&blkciph, input, input_length, output, output_size, + output_length); +} + +psa_status_t cracen_aes_primitive(const struct sxkeyref *key, const uint8_t *input, uint8_t *output) +{ + int sx_status; + struct sxblkcipher blkciph; + size_t output_size; + + sx_status = sx_blkcipher_create_aesecb_enc(&blkciph, key); + if (sx_status != SX_OK) { + return silex_statuscodes_to_psa(sx_status); + } + + return cracen_aes_ecb_crypt(&blkciph, input, SX_BLKCIPHER_AES_BLK_SZ, output, + SX_BLKCIPHER_AES_BLK_SZ, &output_size); +} diff --git a/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac.c b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac.c new file mode 100644 index 000000000000..447e5e31fc3a --- /dev/null +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac.c @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2023 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include "common.h" +#include +#include "cracen_psa_primitives.h" +#include "cracen_sw_mac_cmac.h" +#include "../../cracenpsa/src/cracen_mac_hmac.h" +#include + +static psa_status_t setup(cracen_mac_operation_t *operation, const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg) +{ + /* Assuming that psa_core checks that key has PSA_KEY_USAGE_SIGN_MESSAGE + * set + * Assuming that psa_core checks that alg is PSA_ALG_IS_MAC(alg) == true + */ + __ASSERT_NO_MSG(PSA_ALG_IS_MAC(alg)); + + /* Operation must be empty */ + if (operation->alg != 0) { + return PSA_ERROR_BAD_STATE; + } + + operation->alg = alg; + operation->mac_size = + PSA_MAC_LENGTH(psa_get_key_type(attributes), psa_get_key_bits(attributes), alg); + + if (IS_ENABLED(PSA_NEED_CRACEN_HMAC)) { + if (PSA_ALG_IS_HMAC(alg)) { + return cracen_hmac_setup(operation, attributes, key_buffer, key_buffer_size, + alg); + } + } + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { + if (PSA_ALG_FULL_LENGTH_MAC(alg) == PSA_ALG_CMAC) { + return cracen_sw_cmac_setup(operation, attributes, key_buffer, + key_buffer_size); + } + } + + return PSA_ERROR_NOT_SUPPORTED; +} + +psa_status_t cracen_mac_sign_setup(cracen_mac_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg) +{ + return setup(operation, attributes, key_buffer, key_buffer_size, alg); +} + +psa_status_t cracen_mac_verify_setup(cracen_mac_operation_t *operation, + const psa_key_attributes_t *attributes, + const uint8_t *key_buffer, size_t key_buffer_size, + psa_algorithm_t alg) +{ + return setup(operation, attributes, key_buffer, key_buffer_size, alg); +} + +psa_status_t cracen_mac_update(cracen_mac_operation_t *operation, const uint8_t *input, + size_t input_length) +{ + if (operation->alg == 0) { + return PSA_ERROR_BAD_STATE; + } + + /* Valid PSA call, just nothing to do. */ + if (input_length == 0) { + return PSA_SUCCESS; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_HMAC)) { + if (PSA_ALG_IS_HMAC(operation->alg)) { + return cracen_hmac_update(operation, input, input_length); + } + } + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { + if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { + return cracen_sw_cmac_update(operation, input, input_length); + } + } + + return PSA_ERROR_NOT_SUPPORTED; +} + +psa_status_t cracen_mac_sign_finish(cracen_mac_operation_t *operation, uint8_t *mac, + size_t mac_size, size_t *mac_length) +{ + psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; + + if (operation->alg == 0) { + return PSA_ERROR_BAD_STATE; + } + + if (mac == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + if (mac_size < operation->mac_size) { + return PSA_ERROR_BUFFER_TOO_SMALL; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_HMAC)) { + if (PSA_ALG_IS_HMAC(operation->alg)) { + status = cracen_hmac_finish(operation); + } + } + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { + if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { + status = cracen_sw_cmac_finish(operation); + } + } + if (status != PSA_SUCCESS) { + *mac_length = 0; + return status; + } + + /* Copy out the from out internal buffer to output buffer. Truncation + * can happen here. + */ + memcpy(mac, operation->input_buffer, operation->mac_size); + *mac_length = operation->mac_size; + + return cracen_mac_abort(operation); +} + +psa_status_t cracen_mac_verify_finish(cracen_mac_operation_t *operation, const uint8_t *mac, + size_t mac_size) +{ + psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; + + if (operation->alg == 0) { + return PSA_ERROR_BAD_STATE; + } + + if (mac == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + /* If the provided buffer is of a different size than the calculated + * one, it will not match. + */ + if (mac_size != operation->mac_size) { + return PSA_ERROR_INVALID_SIGNATURE; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_HMAC)) { + if (PSA_ALG_IS_HMAC(operation->alg)) { + status = cracen_hmac_finish(operation); + } + } + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { + if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { + status = cracen_sw_cmac_finish(operation); + } + } + + if (status != PSA_SUCCESS) { + return status; + } + + /* Do a constant time mem compare. */ + status = constant_memcmp(operation->input_buffer, mac, operation->mac_size); + if (status) { + return PSA_ERROR_INVALID_SIGNATURE; + } + + safe_memzero((void *)operation, sizeof(cracen_mac_operation_t)); + + return PSA_SUCCESS; +} + +psa_status_t cracen_mac_compute(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, + size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, + size_t input_length, uint8_t *mac, size_t mac_size, + size_t *mac_length) +{ + psa_status_t status; + cracen_mac_operation_t operation = {0}; + + status = setup(&operation, attributes, key_buffer, key_buffer_size, alg); + if (status != PSA_SUCCESS) { + goto error_exit; + } + + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { + if (PSA_ALG_FULL_LENGTH_MAC(alg) == PSA_ALG_CMAC) { + + if (mac_size < operation.mac_size) { + status = PSA_ERROR_BUFFER_TOO_SMALL; + goto error_exit; + } + + status = cracen_cmac_compute(&operation, input, input_length, mac); + if (status != PSA_SUCCESS) { + goto error_exit; + } + + *mac_length = operation.mac_size; + return PSA_SUCCESS; + } + } + + status = cracen_mac_update(&operation, input, input_length); + if (status != PSA_SUCCESS) { + goto error_exit; + } + + status = cracen_mac_sign_finish(&operation, mac, mac_size, mac_length); + if (status != PSA_SUCCESS) { + goto error_exit; + } + + return PSA_SUCCESS; + +error_exit: + cracen_mac_abort(&operation); + return status; +} + +psa_status_t cracen_mac_abort(cracen_mac_operation_t *operation) +{ + safe_memzero((void *)operation, sizeof(cracen_mac_operation_t)); + + return PSA_SUCCESS; +} diff --git a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.c b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac_cmac.c similarity index 85% rename from subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.c rename to subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac_cmac.c index e617814b1899..dd4a101c5e2e 100644 --- a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/cracen_sw_mac_cmac.c +++ b/subsys/nrf_security/src/drivers/cracen/cracen_sw/src/cracen_sw_mac_cmac.c @@ -10,41 +10,14 @@ #include #include #include +#include "../../../cracenpsa/src/common.h" +#include "cracen_sw_common.h" #include "cracen_sw_mac_cmac.h" #define CMAC_PADDING_BYTE (0x80) #define AES_CMAC_MSB (0x80) #define CMAC_CONSTANT_RB (0x87) -static psa_status_t cracen_aes_ecb_encrypt(const struct sxkeyref *key, const uint8_t *input, - uint8_t *output) -{ - struct sxblkcipher blkciph; - int sx_status; - - sx_status = sx_blkcipher_create_aesecb_enc(&blkciph, key); - if (sx_status != SX_OK) { - return silex_statuscodes_to_psa(sx_status); - } - - sx_status = sx_blkcipher_crypt(&blkciph, input, SX_BLKCIPHER_AES_BLK_SZ, output); - if (sx_status != SX_OK) { - return silex_statuscodes_to_psa(sx_status); - } - - sx_status = sx_blkcipher_run(&blkciph); - if (sx_status != SX_OK) { - return silex_statuscodes_to_psa(sx_status); - } - - sx_status = sx_blkcipher_wait(&blkciph); - if (sx_status != SX_OK) { - return silex_statuscodes_to_psa(sx_status); - } - - return PSA_SUCCESS; -} - psa_status_t cracen_sw_cmac_setup(cracen_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size) @@ -94,7 +67,7 @@ psa_status_t cracen_cmac_derive_subkeys(cracen_mac_operation_t *operation, uint8 { uint8_t empty_block[SX_BLKCIPHER_AES_BLK_SZ] = {0}; uint8_t L[SX_BLKCIPHER_AES_BLK_SZ]; /* L is defined in RFC 4493 */ - psa_status_t status = cracen_aes_ecb_encrypt(&operation->cmac.keyref, empty_block, L); + psa_status_t status = cracen_aes_primitive(&operation->cmac.keyref, empty_block, L); if (status != PSA_SUCCESS) { return status; @@ -138,7 +111,7 @@ psa_status_t cracen_sw_cmac_update(cracen_mac_operation_t *operation, const uint cracen_xorbytes(operation->cmac.sw_ctx.mac_state, operation->cmac.sw_ctx.partial_block, SX_BLKCIPHER_AES_BLK_SZ); - psa_status = cracen_aes_ecb_encrypt(&operation->cmac.keyref, + psa_status = cracen_aes_primitive(&operation->cmac.keyref, operation->cmac.sw_ctx.mac_state, operation->cmac.sw_ctx.mac_state); if (psa_status != PSA_SUCCESS) { @@ -180,7 +153,7 @@ psa_status_t cracen_sw_cmac_finish(cracen_mac_operation_t *operation) cracen_xorbytes(operation->cmac.sw_ctx.mac_state, last_block, SX_BLKCIPHER_AES_BLK_SZ); psa_status = - cracen_aes_ecb_encrypt(&operation->cmac.keyref, operation->cmac.sw_ctx.mac_state, + cracen_aes_primitive(&operation->cmac.keyref, operation->cmac.sw_ctx.mac_state, operation->cmac.sw_ctx.mac_state); if (psa_status != PSA_SUCCESS) { return psa_status; diff --git a/subsys/nrf_security/src/drivers/cracen/cracenpsa/cracenpsa.cmake b/subsys/nrf_security/src/drivers/cracen/cracenpsa/cracenpsa.cmake index eb3d73da966b..65e2a0de400c 100644 --- a/subsys/nrf_security/src/drivers/cracen/cracenpsa/cracenpsa.cmake +++ b/subsys/nrf_security/src/drivers/cracen/cracenpsa/cracenpsa.cmake @@ -18,12 +18,17 @@ list(APPEND cracen_driver_sources ${CMAKE_CURRENT_LIST_DIR}/src/ecc.c ${CMAKE_CURRENT_LIST_DIR}/src/rndinrange.c - # Note: We always need to have cipher.c and ctr_drbg.c since it + # Note: We always need to have a version of cipher.c as it # is used directly by many Cracen drivers. - ${CMAKE_CURRENT_LIST_DIR}/src/cipher.c ${CMAKE_CURRENT_LIST_DIR}/src/prng_pool.c ) +if(NOT CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cipher.c + ) +endif() + if(NOT CONFIG_PSA_CRYPTO_DRIVER_ALG_PRNG_TEST) list(APPEND cracen_driver_sources ${CMAKE_CURRENT_LIST_DIR}/src/ctr_drbg.c @@ -82,29 +87,23 @@ if(CONFIG_PSA_NEED_CRACEN_HASH_DRIVER) ) endif() -if(CONFIG_PSA_NEED_CRACEN_MAC_DRIVER) +if(CONFIG_PSA_NEED_CRACEN_MAC_DRIVER AND NOT CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS) list(APPEND cracen_driver_sources ${CMAKE_CURRENT_LIST_DIR}/src/mac.c ) - if(CONFIG_PSA_NEED_CRACEN_HMAC) + if(CONFIG_PSA_NEED_CRACEN_CMAC) list(APPEND cracen_driver_sources - ${CMAKE_CURRENT_LIST_DIR}/src/cracen_mac_hmac.c - ${CMAKE_CURRENT_LIST_DIR}/src/hmac.c + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_mac_cmac.c ) endif() +endif() - if(CONFIG_PSA_NEED_CRACEN_CMAC) - if(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS) - list(APPEND cracen_driver_sources - ${CMAKE_CURRENT_LIST_DIR}/src/cracen_sw_mac_cmac.c - ) - else() - list(APPEND cracen_driver_sources - ${CMAKE_CURRENT_LIST_DIR}/src/cracen_mac_cmac.c - ) - endif() - endif() +if(CONFIG_PSA_NEED_CRACEN_HMAC) + list(APPEND cracen_driver_sources + ${CMAKE_CURRENT_LIST_DIR}/src/cracen_mac_hmac.c + ${CMAKE_CURRENT_LIST_DIR}/src/hmac.c + ) endif() if(CONFIG_PSA_NEED_CRACEN_KEY_MANAGEMENT_DRIVER OR CONFIG_PSA_NEED_CRACEN_KMU_DRIVER OR CONFIG_MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) diff --git a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/mac.c b/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/mac.c index d60a63ee3d64..8ae4c58163b9 100644 --- a/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/mac.c +++ b/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/mac.c @@ -12,7 +12,6 @@ #include #include "cracen_psa_primitives.h" #include "cracen_mac_cmac.h" -#include "cracen_sw_mac_cmac.h" #include "cracen_mac_hmac.h" static psa_status_t setup(cracen_mac_operation_t *operation, const psa_key_attributes_t *attributes, @@ -39,15 +38,7 @@ static psa_status_t setup(cracen_mac_operation_t *operation, const psa_key_attri alg); } } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { - if (PSA_ALG_FULL_LENGTH_MAC(alg) == PSA_ALG_CMAC) { - return cracen_sw_cmac_setup(operation, attributes, key_buffer, - key_buffer_size); - } - } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - !IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { if (PSA_ALG_FULL_LENGTH_MAC(alg) == PSA_ALG_CMAC) { return cracen_cmac_setup(operation, attributes, key_buffer, key_buffer_size); @@ -90,15 +81,8 @@ psa_status_t cracen_mac_update(cracen_mac_operation_t *operation, const uint8_t return cracen_hmac_update(operation, input, input_length); } } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { - if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { - return cracen_sw_cmac_update(operation, input, input_length); - } - } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - !IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { return cracen_cmac_update(operation, input, input_length); } @@ -129,13 +113,7 @@ psa_status_t cracen_mac_sign_finish(cracen_mac_operation_t *operation, uint8_t * status = cracen_hmac_finish(operation); } } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { - if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { - status = cracen_sw_cmac_finish(operation); - } - } else if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - !IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { status = cracen_cmac_finish(operation); } @@ -179,13 +157,7 @@ psa_status_t cracen_mac_verify_finish(cracen_mac_operation_t *operation, const u status = cracen_hmac_finish(operation); } } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { - if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { - status = cracen_sw_cmac_finish(operation); - } - } else if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - !IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS)) { + if (IS_ENABLED(PSA_NEED_CRACEN_CMAC)) { if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { status = cracen_cmac_finish(operation); } @@ -219,24 +191,6 @@ psa_status_t cracen_mac_compute(const psa_key_attributes_t *attributes, const ui goto error_exit; } - if (IS_ENABLED(PSA_NEED_CRACEN_CMAC) && - IS_ENABLED(CONFIG_CRACEN_NEED_MULTIPART_WORKAROUNDS) && - PSA_ALG_FULL_LENGTH_MAC(alg) == PSA_ALG_CMAC) { - - if (mac_size < operation.mac_size) { - status = PSA_ERROR_BUFFER_TOO_SMALL; - goto error_exit; - } - - status = cracen_cmac_compute(&operation, input, input_length, mac); - if (status != PSA_SUCCESS) { - goto error_exit; - } - - *mac_length = operation.mac_size; - return PSA_SUCCESS; - } - status = cracen_mac_update(&operation, input, input_length); if (status != PSA_SUCCESS) { goto error_exit; diff --git a/tests/benchmarks/current_consumption/nrf54l_errata30_idle/testcase.yaml b/tests/benchmarks/current_consumption/nrf54l_errata30_idle/testcase.yaml index b65ba2d9b8dc..32b3d4e1a93d 100644 --- a/tests/benchmarks/current_consumption/nrf54l_errata30_idle/testcase.yaml +++ b/tests/benchmarks/current_consumption/nrf54l_errata30_idle/testcase.yaml @@ -9,8 +9,12 @@ tests: - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp harness: pytest harness_config: fixture: ppk_power_measure diff --git a/tests/benchmarks/power_consumption/adc_async/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp.conf similarity index 100% rename from tests/benchmarks/power_consumption/adc_async/boards/nrf54h20dk_nrf54h20_cpuapp.conf rename to tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp.conf diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_gpio_wakeup.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_gpio_wakeup.overlay new file mode 100644 index 000000000000..b6a9add09221 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_gpio_wakeup.overlay @@ -0,0 +1,35 @@ +/ { + aliases { + /delete-property/ sw1; + }; + + /* + * Redefine sw0/button0 to use RXD0 - P2.04 + * Thus, when sending character from host, there will be gpio interrupt, + * the same as originally triggered by sw0 button. + */ + buttons { + compatible = "gpio-keys"; + + button0: button_0 { + gpios = <&gpio2 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "Push button 0"; + zephyr,code = ; + }; + }; + + zephyr,user { + test-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; + }; +}; + +/delete-node/ &button1; + +&gpiote130 { + status = "okay"; + owned-channels = <0>; +}; + +&gpio2 { + status = "okay"; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_lpcomp_wakeup.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_lpcomp_wakeup.overlay new file mode 100644 index 000000000000..8e42c77dee98 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54h20dk_nrf54h20_cpuapp_lpcomp_wakeup.overlay @@ -0,0 +1,11 @@ +&gpio1 { + status = "okay"; +}; + +&comp { + compatible = "nordic,nrf-lpcomp"; + psel = "AIN2"; /* P1.02 */ + refsel = "VDD_4_8"; + status = "okay"; + zephyr,pm-device-runtime-auto; +}; diff --git a/tests/benchmarks/current_consumption/system_off/radio/CMakeLists.txt b/tests/benchmarks/current_consumption/system_off/radio/CMakeLists.txt new file mode 100644 index 000000000000..4f9d896826c0 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/radio/CMakeLists.txt @@ -0,0 +1,11 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(radio) + +target_sources(app PRIVATE main.c) diff --git a/tests/benchmarks/current_consumption/system_off/radio/main.c b/tests/benchmarks/current_consumption/system_off/radio/main.c new file mode 100644 index 000000000000..0a8280c1f8ac --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/radio/main.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include + +int main(void) +{ + int rc; + const struct device *const cons = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); + + printf("\n%s system off demo\n", CONFIG_BOARD); + printf("Entering system off\n"); + rc = pm_device_action_run(cons, PM_DEVICE_ACTION_SUSPEND); + if (rc < 0) { + printf("Could not suspend console (%d)\n", rc); + return 0; + } + + sys_poweroff(); + + return 0; +} diff --git a/tests/benchmarks/current_consumption/system_off/radio/prj.conf b/tests/benchmarks/current_consumption/system_off/radio/prj.conf new file mode 100644 index 000000000000..c98e2082d26f --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/radio/prj.conf @@ -0,0 +1,2 @@ +CONFIG_PM_DEVICE=y +CONFIG_POWEROFF=y diff --git a/tests/benchmarks/current_consumption/system_off/sysbuild.cmake b/tests/benchmarks/current_consumption/system_off/sysbuild.cmake new file mode 100644 index 000000000000..a08e054ae8ed --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/sysbuild.cmake @@ -0,0 +1,15 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +if(SB_CONFIG_SOC_NRF54H20) + # Add remote project + ExternalZephyrProject_Add( + APPLICATION radio + SOURCE_DIR ${APP_DIR}/radio + BOARD ${SB_CONFIG_BOARD}/${SB_CONFIG_SOC}/cpurad + BOARD_REVISION ${BOARD_REVISION} + ) +endif() diff --git a/tests/benchmarks/current_consumption/system_off/testcase.yaml b/tests/benchmarks/current_consumption/system_off/testcase.yaml index b53f991eab6a..dc3942f3c9d5 100644 --- a/tests/benchmarks/current_consumption/system_off/testcase.yaml +++ b/tests/benchmarks/current_consumption/system_off/testcase.yaml @@ -11,6 +11,7 @@ tests: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp @@ -22,6 +23,7 @@ tests: - platform:nrf54lm20dk/nrf54lm20a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lm20dk_nrf54lm20a_cpuapp_gpio_wakeup.overlay" - platform:nrf54lv10dk/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_gpio_wakeup.overlay" - platform:nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_gpio_wakeup.overlay" + - platform:nrf54h20dk/nrf54h20/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54h20dk_nrf54h20_cpuapp_gpio_wakeup.overlay" harness: pytest harness_config: fixture: ppk_power_measure @@ -35,6 +37,7 @@ tests: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp @@ -46,6 +49,7 @@ tests: - platform:nrf54lm20dk/nrf54lm20a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lm20dk_nrf54lm20a_cpuapp_gpio_wakeup.overlay" - platform:nrf54lv10dk/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_gpio_wakeup.overlay" - platform:nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_gpio_wakeup.overlay" + - platform:nrf54h20dk/nrf54h20/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54h20dk_nrf54h20_cpuapp_gpio_wakeup.overlay" extra_configs: - CONFIG_APP_USE_RETAINED_MEM=y harness: pytest @@ -83,6 +87,7 @@ tests: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 @@ -106,6 +111,7 @@ tests: - nrf54l15dk/nrf54l05/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 @@ -130,6 +136,7 @@ tests: - nrf54l15dk/nrf54l05/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp @@ -141,6 +148,7 @@ tests: - platform:nrf54lm20dk/nrf54lm20a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lm20dk_nrf54lm20a_cpuapp_lpcomp_wakeup.overlay" - platform:nrf54lv10dk/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_lpcomp_wakeup.overlay" - platform:nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54lv10dk_nrf54lv10a_cpuapp_lpcomp_wakeup.overlay" + - platform:nrf54h20dk/nrf54h20/cpuapp:"EXTRA_DTC_OVERLAY_FILE=boards/nrf54h20dk_nrf54h20_cpuapp_lpcomp_wakeup.overlay" extra_configs: - CONFIG_LPCOMP_WAKEUP_ENABLE=y - CONFIG_COMPARATOR=y diff --git a/tests/benchmarks/multicore/idle_usb/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/benchmarks/multicore/idle_usb/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index 483e18171f77..428668456b9a 100644 --- a/tests/benchmarks/multicore/idle_usb/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ b/tests/benchmarks/multicore/idle_usb/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -18,3 +18,8 @@ compatible = "zephyr,cdc-acm-uart"; }; }; + +&uart136 { + zephyr,pm-device-runtime-auto; + disable-rx; +}; diff --git a/tests/benchmarks/multicore/idle_usb/prj.conf b/tests/benchmarks/multicore/idle_usb/prj.conf index 6e29f391d38f..f67beb9f05b6 100644 --- a/tests/benchmarks/multicore/idle_usb/prj.conf +++ b/tests/benchmarks/multicore/idle_usb/prj.conf @@ -14,7 +14,6 @@ CONFIG_POWEROFF=y CONFIG_BOOT_BANNER=n -# Enable for debugging purposes only CONFIG_PRINTK=y CONFIG_LOG=y CONFIG_USBD_LOG_LEVEL_WRN=y @@ -22,3 +21,5 @@ CONFIG_UDC_DRIVER_LOG_LEVEL_WRN=y CONFIG_USBD_CDC_ACM_LOG_LEVEL_ERR=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/multicore/idle_usb/src/main.c b/tests/benchmarks/multicore/idle_usb/src/main.c index fd3767033fcb..8002bbf1c3b5 100644 --- a/tests/benchmarks/multicore/idle_usb/src/main.c +++ b/tests/benchmarks/multicore/idle_usb/src/main.c @@ -17,9 +17,6 @@ #include #include #include - -#include - #include LOG_MODULE_REGISTER(idle_usb, LOG_LEVEL_INF); @@ -229,15 +226,7 @@ int main(void) uart_rx_disable(uart_dev); LOG_INF("Put UART into suspend request response: %d", pm_device_runtime_put(uart_dev)); usbd_disable(sample_usbd); - k_msleep(100); - - /* Use NRFS USB disable to switch off USB VREG and disable USB HSPLL. - * This is sort of a hack, but without external managed USB hub - * it is not possible to disable USB power - */ - ret = 1; - LOG_INF("NRFS USB disable request response: %d", nrfs_usb_disable_request((void *)ret)); - k_msleep(100); + usbd_shutdown(sample_usbd); LOG_INF("Good night"); gpio_pin_set_dt(&led, 0); diff --git a/tests/benchmarks/power_consumption/adc/Kconfig.sysbuild b/tests/benchmarks/power_consumption/adc/Kconfig.sysbuild index 876e8168203e..743827412843 100644 --- a/tests/benchmarks/power_consumption/adc/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/adc/Kconfig.sysbuild @@ -1,5 +1,5 @@ # -# Copyright (c) 2024 Nordic Semiconductor ASA +# Copyright (c) 2025 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/adc_async/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/benchmarks/power_consumption/adc/boards/nrf52840dk_nrf52840.overlay similarity index 100% rename from tests/benchmarks/power_consumption/adc_async/boards/nrf54h20dk_nrf54h20_cpuapp.overlay rename to tests/benchmarks/power_consumption/adc/boards/nrf52840dk_nrf52840.overlay diff --git a/tests/benchmarks/power_consumption/adc_async/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/benchmarks/power_consumption/adc/boards/nrf5340dk_nrf5340_cpuapp.overlay similarity index 82% rename from tests/benchmarks/power_consumption/adc_async/boards/nrf54l15dk_nrf54l15_cpuapp.overlay rename to tests/benchmarks/power_consumption/adc/boards/nrf5340dk_nrf5340_cpuapp.overlay index a798998bf597..6ff5e790222a 100644 --- a/tests/benchmarks/power_consumption/adc_async/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/tests/benchmarks/power_consumption/adc/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -1,10 +1,13 @@ / { aliases { - led = &button3; + led = &led0; + /delete-property/ led1; adc0 = &adc; }; }; +/delete-node/ &led1; + &adc { #address-cells = <1>; #size-cells = <0>; diff --git a/tests/benchmarks/power_consumption/adc/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/adc/boards/nrf54h20dk_nrf54h20_cpuapp.conf new file mode 100644 index 000000000000..a6fa5758d9ae --- /dev/null +++ b/tests/benchmarks/power_consumption/adc/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -0,0 +1 @@ +CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/power_consumption/adc/src/driver_test.c b/tests/benchmarks/power_consumption/adc/src/driver_test.c index f03d73b17964..94554b5a69e9 100644 --- a/tests/benchmarks/power_consumption/adc/src/driver_test.c +++ b/tests/benchmarks/power_consumption/adc/src/driver_test.c @@ -39,7 +39,12 @@ void thread_definition(void) return; } while (1) { +#if defined(CONFIG_ADC_ASYNC) + ret = adc_read_async(adc, &sequence, NULL); +#else ret = adc_read(adc, &sequence); +#endif + if (ret < 0) { printk("Issue wih reading voltage, terminating thread."); return; diff --git a/tests/benchmarks/power_consumption/adc/sysbuild.cmake b/tests/benchmarks/power_consumption/adc/sysbuild.cmake index 504b2ac23b93..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/adc/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/adc/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(adc remote_sleep_forever) - sysbuild_add_dependencies(FLASH adc remote_sleep_forever) + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/adc/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/adc/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/adc/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/adc/testcase.yaml b/tests/benchmarks/power_consumption/adc/testcase.yaml index a4ca97c29519..87203ec9b0be 100644 --- a/tests/benchmarks/power_consumption/adc/testcase.yaml +++ b/tests/benchmarks/power_consumption/adc/testcase.yaml @@ -1,33 +1,33 @@ common: + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp tags: - ppk_power_measure - ci_tests_benchmarks_current_consumption tests: - benchmarks.power_consumption.adc_nrf54l: - integration_platforms: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp + benchmarks.power_consumption.adc: harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_54L" - benchmarks.power_consumption.adc_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc" + benchmarks.power_consumption.adc_async: + extra_configs: + - CONFIG_ADC_ASYNC=y harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc" diff --git a/tests/benchmarks/power_consumption/adc_async/CMakeLists.txt b/tests/benchmarks/power_consumption/adc_async/CMakeLists.txt deleted file mode 100644 index 436a519cb5db..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.13.1) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -zephyr_include_directories(include) - -project(adc_async) - -target_sources(app PRIVATE ./../common/main.c) -target_sources(app PRIVATE src/driver_test.c) diff --git a/tests/benchmarks/power_consumption/adc_async/Kconfig.sysbuild b/tests/benchmarks/power_consumption/adc_async/Kconfig.sysbuild deleted file mode 100644 index 876e8168203e..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/Kconfig.sysbuild +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -source "share/sysbuild/Kconfig" - -config REMOTE_BOARD - string "The board used for remote target" diff --git a/tests/benchmarks/power_consumption/adc_async/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/tests/benchmarks/power_consumption/adc_async/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay deleted file mode 100644 index 281ffa1519ba..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ /dev/null @@ -1,24 +0,0 @@ -/ { - aliases { - led = &led0; - /delete-property/ led1; - adc0 = &adc; - }; -}; - -/delete-node/ &led1; - -&adc { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - channel@0 { - reg = <0>; - zephyr,gain = "ADC_GAIN_1"; - zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; - zephyr,input-positive = ; /* P1.31 */ - zephyr,resolution = <10>; - }; -}; diff --git a/tests/benchmarks/power_consumption/adc_async/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/tests/benchmarks/power_consumption/adc_async/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay deleted file mode 100644 index 7eea769c58dd..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay +++ /dev/null @@ -1,24 +0,0 @@ -/ { - aliases { - led = &led0; - /delete-property/ led1; - adc0 = &adc; - }; -}; - -/delete-node/ &led1; - -&adc { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - channel@0 { - reg = <0>; - zephyr,gain = "ADC_GAIN_1"; - zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; - zephyr,input-positive = ; /* P1.12 */ - zephyr,resolution = <14>; - }; -}; diff --git a/tests/benchmarks/power_consumption/adc_async/prj.conf b/tests/benchmarks/power_consumption/adc_async/prj.conf deleted file mode 100644 index 87031172d9aa..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/prj.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Drivers and peripherals -CONFIG_ADC=y -CONFIG_ADC_ASYNC=y - -# Enable runtime power management for peripheral -CONFIG_PM_DEVICE=y -CONFIG_PM_DEVICE_RUNTIME=y - -CONFIG_PM=y -CONFIG_PM_S2RAM=y -CONFIG_POWEROFF=y -CONFIG_PM_S2RAM_CUSTOM_MARKING=y -CONFIG_CONSOLE=n -CONFIG_UART_CONSOLE=n -CONFIG_SERIAL=n -CONFIG_BOOT_BANNER=n diff --git a/tests/benchmarks/power_consumption/adc_async/src/driver_test.c b/tests/benchmarks/power_consumption/adc_async/src/driver_test.c deleted file mode 100644 index 5d724c2ff51d..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/src/driver_test.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2024 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#define ADC_NODE DT_ALIAS(adc0) -static const struct device *adc = DEVICE_DT_GET(ADC_NODE); - -/* Get the number of channels defined on the DTS. */ -static const struct adc_channel_cfg channel_cfgs[] = { -DT_FOREACH_CHILD_SEP(ADC_NODE, ADC_CHANNEL_CFG_DT, (,))}; - -void thread_definition(void) -{ - uint16_t channel_reading[5]; - int ret; - - /* Options for the sequence sampling. */ - const struct adc_sequence_options options = { - .extra_samplings = 1, - .interval_us = 0, - }; - - struct adc_sequence sequence = { - .buffer = channel_reading, - /* buffer size in bytes, not number of samples */ - .buffer_size = sizeof(channel_reading), - .resolution = 12, - .options = &options, - .channels = 1, - }; - - ret = adc_channel_setup(adc, &channel_cfgs[0]); - if (ret < 0) { - printk("Issue with setting up channel, terminating thread."); - return; - } - while (1) { - ret = adc_read_async(adc, &sequence, NULL); - if (ret < 0) { - printk("Issue wih reading voltage, terminating thread."); - return; - } - }; -}; diff --git a/tests/benchmarks/power_consumption/adc_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/adc_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/adc_async/testcase.yaml b/tests/benchmarks/power_consumption/adc_async/testcase.yaml deleted file mode 100644 index b66cb9e00a58..000000000000 --- a/tests/benchmarks/power_consumption/adc_async/testcase.yaml +++ /dev/null @@ -1,33 +0,0 @@ -common: - tags: - - ppk_power_measure - - ci_tests_benchmarks_current_consumption -tests: - benchmarks.power_consumption.adc_async_nrf54l: - integration_platforms: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_async_54L" - benchmarks.power_consumption.adc_async_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_async_54H" diff --git a/tests/benchmarks/power_consumption/flash/Kconfig.sysbuild b/tests/benchmarks/power_consumption/flash/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/flash/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/flash/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.conf b/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 000000000000..fc3663b63d5a --- /dev/null +++ b/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,3 @@ +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_SOC_FLASH_NRF=n diff --git a/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..5365373f1bb6 --- /dev/null +++ b/tests/benchmarks/power_consumption/flash/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,9 @@ +/ { + aliases { + led = &led0; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/flash/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/benchmarks/power_consumption/flash/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..5365373f1bb6 --- /dev/null +++ b/tests/benchmarks/power_consumption/flash/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,9 @@ +/ { + aliases { + led = &led0; + }; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/flash/src/driver_test.c b/tests/benchmarks/power_consumption/flash/src/driver_test.c index 5679425e4d4c..7ddb9d0731b3 100644 --- a/tests/benchmarks/power_consumption/flash/src/driver_test.c +++ b/tests/benchmarks/power_consumption/flash/src/driver_test.c @@ -10,6 +10,8 @@ #if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor) #define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor) +#elif DT_HAS_COMPAT_STATUS_OKAY(nordic_qspi_nor) +#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nordic_qspi_nor) #elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor) #define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor) #else diff --git a/tests/benchmarks/power_consumption/flash/sysbuild.cmake b/tests/benchmarks/power_consumption/flash/sysbuild.cmake index 645411781e92..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/flash/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/flash/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(flash remote_sleep_forever) - sysbuild_add_dependencies(FLASH flash remote_sleep_forever) + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/flash/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/flash/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/flash/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/flash/testcase.yaml b/tests/benchmarks/power_consumption/flash/testcase.yaml index e949b9413ded..f44735fa4136 100644 --- a/tests/benchmarks/power_consumption/flash/testcase.yaml +++ b/tests/benchmarks/power_consumption/flash/testcase.yaml @@ -3,27 +3,21 @@ common: - ppk_power_measure - ci_tests_benchmarks_current_consumption tests: - benchmarks.power_consumption.flash_nrf54l: + benchmarks.power_consumption.flash: harness: pytest integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_flash_54L" - benchmarks.power_consumption.flash_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - nrf54h20dk/nrf54h20/cpuapp - extra_args: SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_flash_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_flash" diff --git a/tests/benchmarks/power_consumption/gpio/Kconfig.sysbuild b/tests/benchmarks/power_consumption/gpio/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/gpio/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/gpio/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/gpio/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/power_consumption/gpio/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..20faf5582c71 --- /dev/null +++ b/tests/benchmarks/power_consumption/gpio/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,29 @@ +/ { + aliases { + led = &led0; + out0 = &output0; + in0 = &input0; + }; + outputs { + compatible = "gpio-leds"; + + output0: output_0 { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + label = "GPIO output 0"; + }; + }; + + inputs { + compatible = "gpio-keys"; + + input0: input_0 { + gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH)>; + label = "GPIO input 0"; + }; + }; +}; + +&gpiote { + status = "okay"; + owned-channels = <0>; +}; diff --git a/tests/benchmarks/power_consumption/gpio/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/benchmarks/power_consumption/gpio/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..94e51d379c4f --- /dev/null +++ b/tests/benchmarks/power_consumption/gpio/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,29 @@ +/ { + aliases { + led = &led0; + out0 = &output0; + in0 = &input0; + }; + outputs { + compatible = "gpio-leds"; + + output0: output_0 { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + label = "GPIO output 0"; + }; + }; + + inputs { + compatible = "gpio-keys"; + + input0: input_0 { + gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH)>; + label = "GPIO input 0"; + }; + }; +}; + +&gpiote1 { + status = "okay"; + owned-channels = <0>; +}; diff --git a/tests/benchmarks/power_consumption/gpio/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/gpio/boards/nrf54h20dk_nrf54h20_cpuapp.conf index 69e8854dad9d..a8745a6831a0 100644 --- a/tests/benchmarks/power_consumption/gpio/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/tests/benchmarks/power_consumption/gpio/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -6,3 +6,4 @@ CONFIG_PM=y CONFIG_PM_S2RAM=y CONFIG_POWEROFF=y CONFIG_PM_S2RAM_CUSTOM_MARKING=y +CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/power_consumption/gpio/sysbuild.cmake b/tests/benchmarks/power_consumption/gpio/sysbuild.cmake index 9264c15f5434..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/gpio/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/gpio/sysbuild.cmake @@ -4,17 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") - # Add remote project +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( - APPLICATION remote_sleep_forever - SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever - BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - # Add a dependency so that the remote image will be built and flashed first - add_dependencies(gpio remote_sleep_forever) - # Add dependency so that the remote image is flashed first. - sysbuild_add_dependencies(FLASH gpio remote_sleep_forever) + APPLICATION remote_sleep_forever + SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever + BOARD ${SB_CONFIG_REMOTE_BOARD} + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/gpio/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/gpio/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/gpio/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/gpio/testcase.yaml b/tests/benchmarks/power_consumption/gpio/testcase.yaml index 45a3c68b2f42..22d44590ab19 100644 --- a/tests/benchmarks/power_consumption/gpio/testcase.yaml +++ b/tests/benchmarks/power_consumption/gpio/testcase.yaml @@ -3,31 +3,23 @@ common: - ppk_power_measure - ci_tests_benchmarks_current_consumption tests: - benchmarks.power_consumption.gpio_nrf54l: + benchmarks.power_consumption.gpio: integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp - harness: pytest - harness_config: - fixture: gpio_loopback - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54L" - benchmarks.power_consumption.gpio_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf harness: pytest harness_config: fixture: gpio_loopback pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio" diff --git a/tests/benchmarks/power_consumption/lpcomp/Kconfig.sysbuild b/tests/benchmarks/power_consumption/lpcomp/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/lpcomp/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/lpcomp/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/lpcomp/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/benchmarks/power_consumption/lpcomp/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..55df74e312aa --- /dev/null +++ b/tests/benchmarks/power_consumption/lpcomp/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + aliases { + led = &led0; + test-comp = ∁ + }; + + zephyr,user { + test-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&comp { + compatible = "nordic,nrf-lpcomp"; + psel = "AIN0"; /* P0.04 */ + refsel = "VDD_4_8"; + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/lpcomp/sysbuild.cmake b/tests/benchmarks/power_consumption/lpcomp/sysbuild.cmake index dbb640ffc5c8..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/lpcomp/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/lpcomp/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(lpcomp remote_sleep_forever) - sysbuild_add_dependencies(FLASH lpcomp remote_sleep_forever) + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/lpcomp/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/lpcomp/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/lpcomp/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/lpcomp/testcase.yaml b/tests/benchmarks/power_consumption/lpcomp/testcase.yaml index 6067f4eba1ba..89112e7b967c 100644 --- a/tests/benchmarks/power_consumption/lpcomp/testcase.yaml +++ b/tests/benchmarks/power_consumption/lpcomp/testcase.yaml @@ -3,12 +3,14 @@ common: - ppk_power_measure - ci_tests_benchmarks_current_consumption tests: - benchmarks.power_consumption.lpcomp_nrf54l: + benchmarks.power_consumption.lpcomp: integration_platforms: + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp platform_allow: + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp @@ -16,18 +18,4 @@ tests: harness_config: fixture: gpio_loopback pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_lpcomp_54L" - benchmarks.power_consumption.lpcomp_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest - harness_config: - fixture: gpio_loopback - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_lpcomp_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_lpcomp" diff --git a/tests/benchmarks/power_consumption/qdec/Kconfig.sysbuild b/tests/benchmarks/power_consumption/qdec/Kconfig.sysbuild index 2a56f57a1cdb..ba8e1b0c7316 100644 --- a/tests/benchmarks/power_consumption/qdec/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/qdec/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/qdec/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/power_consumption/qdec/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..d6a03e8cef60 --- /dev/null +++ b/tests/benchmarks/power_consumption/qdec/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,59 @@ +/* + * Copyright 2025 Nordic Semiconductor ASA + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* + * Two loopbacks are required: + * P1.01 - P1.02 + * P1.03 - P1.04 + */ + +/ { + aliases { + led = &led0; + qdec0 = &qdec0; + qenca = &phase_a; + qencb = &phase_b; + }; + + encoder-emulate { + compatible = "gpio-leds"; + phase_a: phase_a { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + phase_b: phase_b { + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + qdec_pinctrl: qdec_pinctrl { + group1 { + psels = , + ; + }; + }; + qdec_sleep_pinctrl: qdec_sleep_pinctrl { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&qdec0 { + status = "okay"; + pinctrl-0 = <&qdec_pinctrl>; + pinctrl-1 = <&qdec_sleep_pinctrl>; + pinctrl-names = "default", "sleep"; + steps = <120>; + led-pre = <500>; + zephyr,pm-device-runtime-auto; +}; diff --git a/tests/benchmarks/power_consumption/qdec/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/benchmarks/power_consumption/qdec/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..339f0bbc9e0c --- /dev/null +++ b/tests/benchmarks/power_consumption/qdec/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,59 @@ +/* + * Copyright 2025 Nordic Semiconductor ASA + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* + * Two loopbacks are required: + * P0.04 - P0.05 + * P0.06 - P0.07 + */ + +/ { + aliases { + led = &led0; + qdec0 = &qdec0; + qenca = &phase_a; + qencb = &phase_b; + }; + + encoder-emulate { + compatible = "gpio-leds"; + phase_a: phase_a { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + phase_b: phase_b { + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + qdec_pinctrl: qdec_pinctrl { + group1 { + psels = , + ; + }; + }; + qdec_sleep_pinctrl: qdec_sleep_pinctrl { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&qdec0 { + status = "okay"; + pinctrl-0 = <&qdec_pinctrl>; + pinctrl-1 = <&qdec_sleep_pinctrl>; + pinctrl-names = "default", "sleep"; + steps = <120>; + led-pre = <500>; + zephyr,pm-device-runtime-auto; +}; diff --git a/tests/benchmarks/power_consumption/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.conf index f70709b7c215..35723fe87a95 100644 --- a/tests/benchmarks/power_consumption/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/tests/benchmarks/power_consumption/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -2,3 +2,5 @@ CONFIG_PM=y CONFIG_PM_S2RAM=y CONFIG_POWEROFF=y CONFIG_PM_S2RAM_CUSTOM_MARKING=y + +CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/power_consumption/qdec/sysbuild.cmake b/tests/benchmarks/power_consumption/qdec/sysbuild.cmake index 3602aac6fbf7..cdabf6333567 100644 --- a/tests/benchmarks/power_consumption/qdec/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/qdec/sysbuild.cmake @@ -4,17 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") - # Add remote project +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( - APPLICATION remote_sleep_forever - SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever - BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - # Add a dependency so that the remote image will be built and flashed first - add_dependencies(qdec remote_sleep_forever) - # Add dependency so that the remote image is flashed first. - sysbuild_add_dependencies(FLASH qdec remote_sleep_forever) + APPLICATION remote_sleep_forever + SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever + BOARD ${SB_CONFIG_REMOTE_BOARD} + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/qdec/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/qdec/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/qdec/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/qdec/testcase.yaml b/tests/benchmarks/power_consumption/qdec/testcase.yaml index b8529e6a78ba..50c2a5ead95c 100644 --- a/tests/benchmarks/power_consumption/qdec/testcase.yaml +++ b/tests/benchmarks/power_consumption/qdec/testcase.yaml @@ -7,26 +7,20 @@ common: harness: pytest tests: - benchmarks.power_consumption.qdec_nrf54l: + benchmarks.power_consumption.qdec: platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp - harness_config: - fixture: gpio_loopback - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54L" - benchmarks.power_consumption.qdec_nrf54h: - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - integration_platforms: - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf harness_config: fixture: gpio_loopback pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio" diff --git a/tests/benchmarks/power_consumption/temperature_sensor/CMakeLists.txt b/tests/benchmarks/power_consumption/temperature_sensor/CMakeLists.txt index 7a21c56d6a6c..a0dcc02ba92c 100644 --- a/tests/benchmarks/power_consumption/temperature_sensor/CMakeLists.txt +++ b/tests/benchmarks/power_consumption/temperature_sensor/CMakeLists.txt @@ -10,4 +10,5 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(temperature_sensor) +target_sources(app PRIVATE ./../common/main.c) target_sources(app PRIVATE src/main.c) diff --git a/tests/benchmarks/power_consumption/uart_interrupt/Kconfig.sysbuild b/tests/benchmarks/power_consumption/temperature_sensor/Kconfig.sysbuild similarity index 70% rename from tests/benchmarks/power_consumption/uart_interrupt/Kconfig.sysbuild rename to tests/benchmarks/power_consumption/temperature_sensor/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/uart_interrupt/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/temperature_sensor/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..5c9a58a7b6b6 --- /dev/null +++ b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,9 @@ +/ { + aliases { + led = &led0; + }; +}; + +temp_sensor: &temp { + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.conf new file mode 100644 index 000000000000..ed3294088ce2 --- /dev/null +++ b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -0,0 +1,6 @@ +CONFIG_PM_S2RAM=y +CONFIG_PM_S2RAM_CUSTOM_MARKING=y + +CONFIG_NRFS=y + +CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.overlay similarity index 66% rename from tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.overlay rename to tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index 9e4a50a3248a..cb64f6cdbdcc 100644 --- a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ b/tests/benchmarks/power_consumption/temperature_sensor/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -7,6 +7,6 @@ /delete-node/ &led1; -&uart136 { - zephyr,pm-device-runtime-auto; +temp_sensor: &temp_nrfs { + status = "okay"; }; diff --git a/tests/benchmarks/power_consumption/temperature_sensor/prj.conf b/tests/benchmarks/power_consumption/temperature_sensor/prj.conf index b8c8be84d83c..642c5995318b 100644 --- a/tests/benchmarks/power_consumption/temperature_sensor/prj.conf +++ b/tests/benchmarks/power_consumption/temperature_sensor/prj.conf @@ -1,14 +1,11 @@ +CONFIG_SENSOR=y + +CONFIG_PM=y +CONFIG_POWEROFF=y + CONFIG_ASSERT=y CONFIG_CONSOLE=n CONFIG_UART_CONSOLE=n CONFIG_SERIAL=n CONFIG_BOOT_BANNER=n - -CONFIG_NRFS=y -CONFIG_SENSOR=y - -CONFIG_PM=y -CONFIG_PM_S2RAM=y -CONFIG_POWEROFF=y -CONFIG_PM_S2RAM_CUSTOM_MARKING=y diff --git a/tests/benchmarks/power_consumption/temperature_sensor/src/main.c b/tests/benchmarks/power_consumption/temperature_sensor/src/main.c index 4ce19aeacd96..ed96bb628ae1 100644 --- a/tests/benchmarks/power_consumption/temperature_sensor/src/main.c +++ b/tests/benchmarks/power_consumption/temperature_sensor/src/main.c @@ -5,64 +5,44 @@ */ #include #include +#include static const struct device *temp_dev = DEVICE_DT_GET(DT_NODELABEL(temp_sensor)); -void set_trigger(void); +static bool suspend_req; -static void trigger_handler(const struct device *temp_dev, const struct sensor_trigger *trig) +bool self_suspend_req(void) { - ARG_UNUSED(temp_dev); - ARG_UNUSED(trig); - - k_busy_wait(1000000); - set_trigger(); + suspend_req = true; + return true; } -void set_trigger(void) +void thread_definition(void) { int rc; - struct sensor_value val = {0}; - struct sensor_trigger trig = {.type = SENSOR_TRIG_THRESHOLD, .chan = SENSOR_CHAN_DIE_TEMP}; - - /* Set sampling frequency to 1 Hz, to expect a trigger after 1 s. */ - val.val1 = 1; - rc = sensor_attr_set(temp_dev, SENSOR_CHAN_DIE_TEMP, SENSOR_ATTR_SAMPLING_FREQUENCY, &val); - __ASSERT_NO_MSG(rc == 0); - - rc = sensor_sample_fetch_chan(temp_dev, SENSOR_CHAN_DIE_TEMP); - __ASSERT_NO_MSG(rc == 0); - - rc = sensor_channel_get(temp_dev, SENSOR_CHAN_DIE_TEMP, &val); - __ASSERT_NO_MSG(rc == 0); - - printk("Temperature: %d.%d\n", val.val1, val.val2 / 10000); + int32_t temp_val; + struct sensor_value val; - /* Verify sensor reading - should be within room temperature limits.*/ - __ASSERT_NO_MSG(val.val1 > 10); - __ASSERT_NO_MSG(val.val1 < 35); + while (1) { + if (suspend_req) { + suspend_req = false; + k_thread_suspend(k_current_get()); + } - /* - * Set the upper threshold 5* below the current temperature to ensure that the callback will - * be triggered - */ - val.val1 -= 5; - rc = sensor_attr_set(temp_dev, SENSOR_CHAN_DIE_TEMP, SENSOR_ATTR_UPPER_THRESH, &val); - __ASSERT_NO_MSG(rc == 0); - printk("Upper threshold: %d.%d\n", val.val1, val.val2 / 10000); + rc = sensor_sample_fetch_chan(temp_dev, SENSOR_CHAN_DIE_TEMP); + __ASSERT(rc == 0, "Cannot fetch chan sample: %d.", rc); - rc = sensor_trigger_set(temp_dev, &trig, trigger_handler); - __ASSERT_NO_MSG(rc == 0); -} + rc = sensor_channel_get(temp_dev, SENSOR_CHAN_DIE_TEMP, &val); + __ASSERT(rc == 0, "Cannot read from channel %d: %d.", + SENSOR_CHAN_DIE_TEMP, rc); -int main(void) -{ - int rc; + temp_val = (val.val1 * 100) + (val.val2 / 10000); + printk("Temperature: %d.%02u\n", + temp_val/100, abs(temp_val) % 100); - rc = device_is_ready(temp_dev); - __ASSERT_NO_MSG(rc); + __ASSERT(val.val1 > 10, "Temperature to low (laboratory conditions)"); + __ASSERT(val.val1 < 35, "Temperature too high (laboratory conditions)"); - set_trigger(); - - return 0; -} + k_sleep(K_MSEC(20)); + }; +}; diff --git a/tests/benchmarks/power_consumption/adc_async/sysbuild.cmake b/tests/benchmarks/power_consumption/temperature_sensor/sysbuild.cmake similarity index 56% rename from tests/benchmarks/power_consumption/adc_async/sysbuild.cmake rename to tests/benchmarks/power_consumption/temperature_sensor/sysbuild.cmake index a80fd54fcca6..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/adc_async/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/temperature_sensor/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(adc_async remote_sleep_forever) - sysbuild_add_dependencies(FLASH adc_async remote_sleep_forever) + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/temperature_sensor/testcase.yaml b/tests/benchmarks/power_consumption/temperature_sensor/testcase.yaml index 8d9d68e20861..2a67b1b6dcf7 100644 --- a/tests/benchmarks/power_consumption/temperature_sensor/testcase.yaml +++ b/tests/benchmarks/power_consumption/temperature_sensor/testcase.yaml @@ -8,11 +8,16 @@ common: tests: benchmarks.power_consumption.temperature: - build_only: true + integration_platforms: + - nrf52840dk/nrf52840 + - nrf54l15dk/nrf54l15/cpuapp + - nrf54h20dk/nrf54h20/cpuapp platform_allow: + - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp + - nrf54h20dk/nrf54h20/cpuapp harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54H" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio" diff --git a/tests/benchmarks/power_consumption/timer_waiting/Kconfig.sysbuild b/tests/benchmarks/power_consumption/timer_waiting/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/timer_waiting/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/timer_waiting/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/timer_waiting/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/power_consumption/timer_waiting/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..262d4f18f45c --- /dev/null +++ b/tests/benchmarks/power_consumption/timer_waiting/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,9 @@ +/ { + aliases { + counter = &timer0; + }; +}; + +&timer0 { + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/timer_waiting/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/benchmarks/power_consumption/timer_waiting/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..262d4f18f45c --- /dev/null +++ b/tests/benchmarks/power_consumption/timer_waiting/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,9 @@ +/ { + aliases { + counter = &timer0; + }; +}; + +&timer0 { + status = "okay"; +}; diff --git a/tests/benchmarks/power_consumption/timer_waiting/sysbuild.cmake b/tests/benchmarks/power_consumption/timer_waiting/sysbuild.cmake index 4e22826bbebd..18084f9e4143 100644 --- a/tests/benchmarks/power_consumption/timer_waiting/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/timer_waiting/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(timer_waiting remote_sleep_forever) - sysbuild_add_dependencies(FLASH timer_waiting remote_sleep_forever) -endif() + BOARD_REVISION ${BOARD_REVISION}) +endif() \ No newline at end of file diff --git a/tests/benchmarks/power_consumption/timer_waiting/testcase.yaml b/tests/benchmarks/power_consumption/timer_waiting/testcase.yaml index 41af84fd386a..e855d6089da6 100644 --- a/tests/benchmarks/power_consumption/timer_waiting/testcase.yaml +++ b/tests/benchmarks/power_consumption/timer_waiting/testcase.yaml @@ -3,7 +3,19 @@ common: - ppk_power_measure - ci_tests_benchmarks_current_consumption tests: - benchmarks.power_consumption.timer_waiting_128M_nrf54l: + benchmarks.power_consumption.timer_waiting_16M_legacy: + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + harness: pytest + harness_config: + fixture: ppk_power_measure + pytest_root: + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" + benchmarks.power_consumption.timer_waiting_16M_nrf54l: integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp @@ -13,12 +25,25 @@ tests: - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp extra_args: - - EXTRA_DTC_OVERLAY_FILE="boards/nrf54l_128M.overlay" + - DTC_OVERLAY_FILE="boards/nrf54l_16M.overlay" + harness: pytest + harness_config: + fixture: ppk_power_measure + pytest_root: + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" + benchmarks.power_consumption.timer_waiting_16M_nrf54h: + sysbuild: true + integration_platforms: + - nrf54h20dk/nrf54h20/cpuapp + platform_allow: + - nrf54h20dk/nrf54h20/cpuapp + extra_args: + - DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_16M.overlay" harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting_54L_128M" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" benchmarks.power_consumption.timer_waiting_32M_nrf54l: integration_platforms: - nrf54l15dk/nrf54l15/cpuapp @@ -34,8 +59,8 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting_54L_32M" - benchmarks.power_consumption.timer_waiting_16M_nrf54l: + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" + benchmarks.power_consumption.timer_waiting_128M_nrf54l: integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - nrf54lm20dk/nrf54lm20a/cpuapp @@ -45,26 +70,12 @@ tests: - nrf54lm20dk/nrf54lm20a/cpuapp - nrf54lv10dk/nrf54lv10a/cpuapp extra_args: - - DTC_OVERLAY_FILE="boards/nrf54l_16M.overlay" - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting_54L_16M" - benchmarks.power_consumption.timer_waiting_16M_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_16M.overlay" - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf + - EXTRA_DTC_OVERLAY_FILE="boards/nrf54l_128M.overlay" harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting_54H_16M" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" benchmarks.power_consumption.timer_waiting_320M_nrf54h: sysbuild: true integration_platforms: @@ -73,9 +84,8 @@ tests: - nrf54h20dk/nrf54h20/cpuapp extra_args: - DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_320M.overlay" - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf harness: pytest harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting_54H_320M" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_for_timer_waiting" diff --git a/tests/benchmarks/power_consumption/uart_async/CMakeLists.txt b/tests/benchmarks/power_consumption/uart/CMakeLists.txt similarity index 53% rename from tests/benchmarks/power_consumption/uart_async/CMakeLists.txt rename to tests/benchmarks/power_consumption/uart/CMakeLists.txt index 05ae8e0f87ef..478f1d836270 100644 --- a/tests/benchmarks/power_consumption/uart_async/CMakeLists.txt +++ b/tests/benchmarks/power_consumption/uart/CMakeLists.txt @@ -10,5 +10,13 @@ zephyr_include_directories(include) project(uart_async) +if(CONFIG_UART_INTERRUPT_DRIVEN) + FILE(GLOB app_sources src/int_driver_test.c) +elseif(CONFIG_UART_ASYNC_API) + FILE(GLOB app_sources src/async_driver_test.c) +else() + FILE(GLOB app_sources src/poll_driver_test.c) +endif() + target_sources(app PRIVATE ./../common/main.c) -target_sources(app PRIVATE src/driver_test.c) +target_sources(app PRIVATE ${app_sources}) diff --git a/tests/benchmarks/power_consumption/uart_polling/Kconfig.sysbuild b/tests/benchmarks/power_consumption/uart/Kconfig.sysbuild similarity index 70% rename from tests/benchmarks/power_consumption/uart_polling/Kconfig.sysbuild rename to tests/benchmarks/power_consumption/uart/Kconfig.sysbuild index 876e8168203e..d5238c072470 100644 --- a/tests/benchmarks/power_consumption/uart_polling/Kconfig.sysbuild +++ b/tests/benchmarks/power_consumption/uart/Kconfig.sysbuild @@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig" config REMOTE_BOARD - string "The board used for remote target" + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf52840dk_nrf52840.overlay similarity index 87% rename from tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf52840dk_nrf52840.overlay index 9b9a867f4c85..dde324622152 100644 --- a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay +++ b/tests/benchmarks/power_consumption/uart/boards/nrf52840dk_nrf52840.overlay @@ -4,6 +4,6 @@ }; }; -&uart30 { +&uart0 { zephyr,pm-device-runtime-auto; }; diff --git a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf5340dk_nrf5340_cpuapp.overlay similarity index 87% rename from tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf5340dk_nrf5340_cpuapp.overlay index 0a7954e7df62..dde324622152 100644 --- a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ b/tests/benchmarks/power_consumption/uart/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,6 +4,6 @@ }; }; -&uart20 { +&uart0 { zephyr,pm-device-runtime-auto; }; diff --git a/tests/benchmarks/power_consumption/uart_async/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf similarity index 73% rename from tests/benchmarks/power_consumption/uart_async/boards/nrf54h20dk_nrf54h20_cpuapp.conf rename to tests/benchmarks/power_consumption/uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf index cc10b7737d12..a6dec362af06 100644 --- a/tests/benchmarks/power_consumption/uart_async/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/tests/benchmarks/power_consumption/uart/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -5,3 +5,5 @@ # CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y +CONFIG_PM_S2RAM=y +CONFIG_PM_S2RAM_CUSTOM_MARKING=y diff --git a/tests/benchmarks/power_consumption/uart_async/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf54h20dk_nrf54h20_cpuapp.overlay similarity index 100% rename from tests/benchmarks/power_consumption/uart_async/boards/nrf54h20dk_nrf54h20_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf54h20dk_nrf54h20_cpuapp.overlay diff --git a/tests/benchmarks/power_consumption/uart_async/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf54l15dk_nrf54l15_cpuapp.overlay similarity index 100% rename from tests/benchmarks/power_consumption/uart_async/boards/nrf54l15dk_nrf54l15_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf54l15dk_nrf54l15_cpuapp.overlay diff --git a/tests/benchmarks/power_consumption/uart_async/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay similarity index 100% rename from tests/benchmarks/power_consumption/uart_async/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay diff --git a/tests/benchmarks/power_consumption/uart_async/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay similarity index 100% rename from tests/benchmarks/power_consumption/uart_async/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay rename to tests/benchmarks/power_consumption/uart/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay diff --git a/tests/benchmarks/power_consumption/uart_async/prj.conf b/tests/benchmarks/power_consumption/uart/prj.conf similarity index 79% rename from tests/benchmarks/power_consumption/uart_async/prj.conf rename to tests/benchmarks/power_consumption/uart/prj.conf index 2b56a5788430..8b6725f32dae 100644 --- a/tests/benchmarks/power_consumption/uart_async/prj.conf +++ b/tests/benchmarks/power_consumption/uart/prj.conf @@ -6,7 +6,5 @@ CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_PM=y -CONFIG_PM_S2RAM=y CONFIG_POWEROFF=y -CONFIG_PM_S2RAM_CUSTOM_MARKING=y CONFIG_BOOT_BANNER=n diff --git a/tests/benchmarks/power_consumption/uart_async/src/driver_test.c b/tests/benchmarks/power_consumption/uart/src/async_driver_test.c similarity index 100% rename from tests/benchmarks/power_consumption/uart_async/src/driver_test.c rename to tests/benchmarks/power_consumption/uart/src/async_driver_test.c diff --git a/tests/benchmarks/power_consumption/uart_interrupt/src/driver_test.c b/tests/benchmarks/power_consumption/uart/src/int_driver_test.c similarity index 100% rename from tests/benchmarks/power_consumption/uart_interrupt/src/driver_test.c rename to tests/benchmarks/power_consumption/uart/src/int_driver_test.c diff --git a/tests/benchmarks/power_consumption/uart_polling/src/driver_test.c b/tests/benchmarks/power_consumption/uart/src/poll_driver_test.c similarity index 100% rename from tests/benchmarks/power_consumption/uart_polling/src/driver_test.c rename to tests/benchmarks/power_consumption/uart/src/poll_driver_test.c diff --git a/tests/benchmarks/power_consumption/uart_async/sysbuild.cmake b/tests/benchmarks/power_consumption/uart/sysbuild.cmake similarity index 56% rename from tests/benchmarks/power_consumption/uart_async/sysbuild.cmake rename to tests/benchmarks/power_consumption/uart/sysbuild.cmake index 1abf4487a4fe..c14f56490902 100644 --- a/tests/benchmarks/power_consumption/uart_async/sysbuild.cmake +++ b/tests/benchmarks/power_consumption/uart/sysbuild.cmake @@ -4,14 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") +if(SB_CONFIG_REMOTE_BOARD) ExternalZephyrProject_Add( APPLICATION remote_sleep_forever SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(uart_async remote_sleep_forever) - sysbuild_add_dependencies(FLASH uart_async remote_sleep_forever) + BOARD_REVISION ${BOARD_REVISION}) endif() diff --git a/tests/benchmarks/power_consumption/uart/testcase.yaml b/tests/benchmarks/power_consumption/uart/testcase.yaml new file mode 100644 index 000000000000..97eaaacb9ab4 --- /dev/null +++ b/tests/benchmarks/power_consumption/uart/testcase.yaml @@ -0,0 +1,35 @@ +common: + sysbuild: true + tags: + - ppk_power_measure + - ci_tests_benchmarks_current_consumption + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + - nrf54lv10dk/nrf54lv10a/cpuapp + - nrf54h20dk/nrf54h20/cpuapp + harness: pytest + harness_config: + fixture: ppk_power_measure + pytest_root: + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart" +tests: + benchmarks.power_consumption.uart.async: + extra_configs: + - CONFIG_UART_ASYNC_API=y + benchmarks.power_consumption.uart.interrupt: + extra_configs: + - CONFIG_UART_INTERRUPT_DRIVEN=y + benchmarks.power_consumption.uart.polling: + extra_configs: + - CONFIG_UART_ASYNC_API=n + - CONFIG_UART_INTERRUPT_DRIVEN=n diff --git a/tests/benchmarks/power_consumption/uart_async/Kconfig.sysbuild b/tests/benchmarks/power_consumption/uart_async/Kconfig.sysbuild deleted file mode 100644 index 876e8168203e..000000000000 --- a/tests/benchmarks/power_consumption/uart_async/Kconfig.sysbuild +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -source "share/sysbuild/Kconfig" - -config REMOTE_BOARD - string "The board used for remote target" diff --git a/tests/benchmarks/power_consumption/uart_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/uart_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/uart_async/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/uart_async/testcase.yaml b/tests/benchmarks/power_consumption/uart_async/testcase.yaml deleted file mode 100644 index abb010e12e18..000000000000 --- a/tests/benchmarks/power_consumption/uart_async/testcase.yaml +++ /dev/null @@ -1,32 +0,0 @@ -common: - tags: - - - ppk_power_measure - - ci_tests_benchmarks_current_consumption -tests: - benchmarks.power_consumption.uart_async_nrf54l: - integration_platforms: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_async_54L" - benchmarks.power_consumption.uart_async_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_async_54H" diff --git a/tests/benchmarks/power_consumption/uart_interrupt/CMakeLists.txt b/tests/benchmarks/power_consumption/uart_interrupt/CMakeLists.txt deleted file mode 100644 index f2def5f1c74c..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.20.0) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -zephyr_include_directories(include) - -project(uart_interrupt) - -target_sources(app PRIVATE ./../common/main.c) -target_sources(app PRIVATE src/driver_test.c) diff --git a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54h20dk_nrf54h20_cpuapp.overlay deleted file mode 100644 index 9e4a50a3248a..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ /dev/null @@ -1,12 +0,0 @@ -/ { - aliases { - led = &led0; - /delete-property/ led1; - }; -}; - -/delete-node/ &led1; - -&uart136 { - zephyr,pm-device-runtime-auto; -}; diff --git a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay deleted file mode 100644 index 0e5633f83d64..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ /dev/null @@ -1,9 +0,0 @@ -/ { - aliases { - led = &button3; - }; -}; - -&uart20 { - zephyr,pm-device-runtime-auto; -}; diff --git a/tests/benchmarks/power_consumption/uart_interrupt/prj.conf b/tests/benchmarks/power_consumption/uart_interrupt/prj.conf deleted file mode 100644 index b2b4b6589be1..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/prj.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Drivers and peripherals -CONFIG_UART_INTERRUPT_DRIVEN=y - -# Enable runtime power management for peripheral -CONFIG_PM_DEVICE=y -CONFIG_PM_DEVICE_RUNTIME=y - -CONFIG_PM=y -CONFIG_PM_S2RAM=y -CONFIG_POWEROFF=y -CONFIG_PM_S2RAM_CUSTOM_MARKING=y -CONFIG_BOOT_BANNER=n diff --git a/tests/benchmarks/power_consumption/uart_interrupt/sysbuild.cmake b/tests/benchmarks/power_consumption/uart_interrupt/sysbuild.cmake deleted file mode 100644 index c06955e56a5b..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/sysbuild.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") - ExternalZephyrProject_Add( - APPLICATION remote_sleep_forever - SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever - BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(uart_interrupt remote_sleep_forever) - sysbuild_add_dependencies(FLASH uart_interrupt remote_sleep_forever) -endif() diff --git a/tests/benchmarks/power_consumption/uart_interrupt/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/uart_interrupt/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/uart_interrupt/testcase.yaml b/tests/benchmarks/power_consumption/uart_interrupt/testcase.yaml deleted file mode 100644 index 47fcd3b17a2d..000000000000 --- a/tests/benchmarks/power_consumption/uart_interrupt/testcase.yaml +++ /dev/null @@ -1,34 +0,0 @@ -common: - tags: - - - ppk_power_measure - - ci_tests_benchmarks_current_consumption -tests: - benchmarks.power_consumption.uart_interrupt_nrf54l: - integration_platforms: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_interrupt_54L" - benchmarks.power_consumption.uart_interrupt_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: - - CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y - - SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_interrupt_54H" diff --git a/tests/benchmarks/power_consumption/uart_polling/CMakeLists.txt b/tests/benchmarks/power_consumption/uart_polling/CMakeLists.txt deleted file mode 100644 index 63e879507ffa..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.13.1) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -zephyr_include_directories(include) - -project(uart_polling) - -target_sources(app PRIVATE ./../common/main.c) -target_sources(app PRIVATE src/driver_test.c) diff --git a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.conf deleted file mode 100644 index cc10b7737d12..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y diff --git a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/benchmarks/power_consumption/uart_polling/boards/nrf54l15dk_nrf54l15_cpuapp.overlay deleted file mode 100644 index 0e5633f83d64..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ /dev/null @@ -1,9 +0,0 @@ -/ { - aliases { - led = &button3; - }; -}; - -&uart20 { - zephyr,pm-device-runtime-auto; -}; diff --git a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay deleted file mode 100644 index 0a7954e7df62..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay +++ /dev/null @@ -1,9 +0,0 @@ -/ { - aliases { - led = &led0; - }; -}; - -&uart20 { - zephyr,pm-device-runtime-auto; -}; diff --git a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay b/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay deleted file mode 100644 index 9b9a867f4c85..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/boards/nrf54lv10dk_nrf54lv10a_cpuapp.overlay +++ /dev/null @@ -1,9 +0,0 @@ -/ { - aliases { - led = &led0; - }; -}; - -&uart30 { - zephyr,pm-device-runtime-auto; -}; diff --git a/tests/benchmarks/power_consumption/uart_polling/prj.conf b/tests/benchmarks/power_consumption/uart_polling/prj.conf deleted file mode 100644 index f56e22190acf..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/prj.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Enable runtime power management for peripheral -CONFIG_PM_DEVICE=y -CONFIG_PM_DEVICE_RUNTIME=y - -CONFIG_PM=y -CONFIG_PM_S2RAM=y -CONFIG_POWEROFF=y -CONFIG_PM_S2RAM_CUSTOM_MARKING=y -CONFIG_BOOT_BANNER=n diff --git a/tests/benchmarks/power_consumption/uart_polling/sysbuild.cmake b/tests/benchmarks/power_consumption/uart_polling/sysbuild.cmake deleted file mode 100644 index 76a155b23f9a..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/sysbuild.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -if(NOT "${SB_CONFIG_REMOTE_BOARD}" STREQUAL "") - ExternalZephyrProject_Add( - APPLICATION remote_sleep_forever - SOURCE_DIR ${APP_DIR}/../common/remote_sleep_forever - BOARD ${SB_CONFIG_REMOTE_BOARD} - BOARD_REVISION ${BOARD_REVISION} - ) - - add_dependencies(uart_polling remote_sleep_forever) - sysbuild_add_dependencies(FLASH uart_polling remote_sleep_forever) -endif() diff --git a/tests/benchmarks/power_consumption/uart_polling/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf b/tests/benchmarks/power_consumption/uart_polling/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf deleted file mode 100644 index dd863e78d993..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/sysbuild/nrf54h20dk_nrf54h20_cpurad.conf +++ /dev/null @@ -1 +0,0 @@ -SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpurad" diff --git a/tests/benchmarks/power_consumption/uart_polling/testcase.yaml b/tests/benchmarks/power_consumption/uart_polling/testcase.yaml deleted file mode 100644 index 9292752f78d1..000000000000 --- a/tests/benchmarks/power_consumption/uart_polling/testcase.yaml +++ /dev/null @@ -1,32 +0,0 @@ -common: - tags: - - - ppk_power_measure - - ci_tests_benchmarks_current_consumption -tests: - benchmarks.power_consumption.uart_poll_nrf54l: - integration_platforms: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - - nrf54lm20dk/nrf54lm20a/cpuapp - - nrf54lv10dk/nrf54lv10a/cpuapp - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_polling_54L" - benchmarks.power_consumption.uart_poll_nrf54h: - sysbuild: true - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - extra_args: SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpurad.conf - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_polling_54H" diff --git a/tests/drivers/gpio/gpio_swd/CMakeLists.txt b/tests/drivers/gpio/gpio_swd/CMakeLists.txt new file mode 100644 index 000000000000..4b590f18d914 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(gpio_swd) + +FILE(GLOB app_sources src/main.c) +target_sources(app PRIVATE ${app_sources}) diff --git a/tests/drivers/gpio/gpio_swd/Readme.txt b/tests/drivers/gpio/gpio_swd/Readme.txt new file mode 100644 index 000000000000..b4c76f319026 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/Readme.txt @@ -0,0 +1,13 @@ +This test was initially dedicated to nrf54ls05b which has SWD and GPIO shared on the same package pin: +- SWDIO at P1.29, +- SWDCLK at P1.30. + +SWD functionality shall be disabled some time after the reset and package pin shall behave as an ordinary GPIO. +Currently, this is blocked by lack of support in MDK - to be added in MDK 8.73.0. +Missing implementation, details available in NRFX-8363. + +Test checks that: + - selected GPIO can be configured as input; + - selected GPIO can be configured as output; + - when pin is configured as output HIGH, reading state of the pin returns HIGH; + - when pin is configured as output LOW, reading state of the pin returns LOW; diff --git a/tests/drivers/gpio/gpio_swd/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/drivers/gpio/gpio_swd/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..15ebc1005b15 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + /* Test requirements: + * No other driver on out-gpios[n] + */ + zephyr,user { + out-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>, <&gpio1 10 GPIO_ACTIVE_HIGH>, + <&gpio2 8 GPIO_ACTIVE_HIGH>, <&gpio2 10 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; diff --git a/tests/drivers/gpio/gpio_swd/boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay b/tests/drivers/gpio/gpio_swd/boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay new file mode 100644 index 000000000000..9cf9d56dd8a8 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/boards/nrf54ls05dk_nrf54ls05b_cpuapp.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + /* Test requirements: + * No other driver on out-gpios[n] + */ + zephyr,user { + out-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>, <&gpio1 31 GPIO_ACTIVE_HIGH>, + <&gpio1 29 GPIO_ACTIVE_HIGH>, <&gpio1 30 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio1 { + status = "okay"; +}; diff --git a/tests/drivers/gpio/gpio_swd/prj.conf b/tests/drivers/gpio/gpio_swd/prj.conf new file mode 100644 index 000000000000..6b69ef47e8c6 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/prj.conf @@ -0,0 +1,3 @@ +CONFIG_GPIO=y +CONFIG_ZTEST=y +CONFIG_LOG=y diff --git a/tests/drivers/gpio/gpio_swd/src/main.c b/tests/drivers/gpio/gpio_swd/src/main.c new file mode 100644 index 000000000000..d3f19ace89fc --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/src/main.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +LOG_MODULE_REGISTER(gpio_swd, LOG_LEVEL_INF); + +#include +#include +#include + + +#if !DT_NODE_HAS_PROP(DT_PATH(zephyr_user), out_gpios) +#error "Unsupported board: out_gpios are not defined" +#endif + +const struct gpio_dt_spec out_pins[] = { + DT_FOREACH_PROP_ELEM_SEP(DT_PATH(zephyr_user), out_gpios, GPIO_DT_SPEC_GET_BY_IDX, (,)) +}; +BUILD_ASSERT(ARRAY_SIZE(out_pins) > 0, "missing out pins"); +const uint8_t npins = ARRAY_SIZE(out_pins); + + +/** + * @brief Test if GPIOs can be configured as inputs. + */ +ZTEST(gpio_swd, test_configure_input) +{ + uint8_t i; + int rc; + + for (i = 0; i < npins; i++) { + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_INPUT); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config GPIO_INPUT failed", + i, out_pins[i].port->name, out_pins[i].pin); + } +} + +/** + * @brief Test if GPIOs can be configured as outputs. + */ +ZTEST(gpio_swd, test_configure_output) +{ + uint8_t i; + int rc; + + for (i = 0; i < npins; i++) { + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_OUTPUT); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config GPIO_OUTPUT failed", + i, out_pins[i].port->name, out_pins[i].pin); + } +} + +/** + * @brief Test if GPIOs configured as output can have its value set. + */ +ZTEST(gpio_swd, test_set_output) +{ + uint8_t i; + int rc; + + for (i = 0; i < npins; i++) { + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_OUTPUT_HIGH); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config high failed", + i, out_pins[i].port->name, out_pins[i].pin); + rc = gpio_pin_get_dt(&out_pins[i]); + zassert_equal(rc, 1, "[%d]: Port %s, pin %d is not high", + i, out_pins[i].port->name, out_pins[i].pin); + + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_OUTPUT_LOW); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config low failed", + i, out_pins[i].port->name, out_pins[i].pin); + rc = gpio_pin_get_dt(&out_pins[i]); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d is not low", + i, out_pins[i].port->name, out_pins[i].pin); + } +} + +/** + * @brief Test if GPIOs configured as output can have its value set. + */ +ZTEST(gpio_swd, test_set_output_after_5_seconds) +{ + uint8_t i; + int rc; + + k_msleep(5000); + for (i = 0; i < npins; i++) { + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_OUTPUT_HIGH); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config high failed", + i, out_pins[i].port->name, out_pins[i].pin); + rc = gpio_pin_get_dt(&out_pins[i]); + zassert_equal(rc, 1, "[%d]: Port %s, pin %d is not high", + i, out_pins[i].port->name, out_pins[i].pin); + + rc = gpio_pin_configure_dt(&out_pins[i], GPIO_OUTPUT_LOW); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d, config low failed", + i, out_pins[i].port->name, out_pins[i].pin); + rc = gpio_pin_get_dt(&out_pins[i]); + zassert_equal(rc, 0, "[%d]: Port %s, pin %d is not low", + i, out_pins[i].port->name, out_pins[i].pin); + } +} + +static void *suite_setup(void) +{ + uint8_t i; + + TC_PRINT("Test executed on %s\n", CONFIG_BOARD_TARGET); + TC_PRINT("GPIO count: %d\n", npins); + for (i = 0; i < npins; i++) { + TC_PRINT("%d: Port %s, pin %d\n", i, out_pins[i].port->name, out_pins[i].pin); + } + TC_PRINT("===================================================================\n"); + + for (i = 0; i < npins; i++) { + zassert_true(gpio_is_ready_dt(&out_pins[i]), "OUT[%d] is not ready", i); + } + + return NULL; +} + +ZTEST_SUITE(gpio_swd, NULL, suite_setup, NULL, NULL, NULL); diff --git a/tests/drivers/gpio/gpio_swd/testcase.yaml b/tests/drivers/gpio/gpio_swd/testcase.yaml new file mode 100644 index 000000000000..71fe068b96d9 --- /dev/null +++ b/tests/drivers/gpio/gpio_swd/testcase.yaml @@ -0,0 +1,18 @@ +common: + tags: + - drivers + - gpio + - ci_tests_drivers_gpio + depends_on: gpio + harness: ztest + harness_config: + fixture: gpio_loopback + +tests: + drivers.gpio.gpio_swd: + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + - nrf54ls05dk/nrf54ls05b/cpuapp + - nrf54ls05dk@0.0.0/nrf54ls05b/cpuapp + integration_platforms: + - nrf54ls05dk/nrf54ls05b/cpuapp diff --git a/tests/lib/lte_lc_api/prj.conf b/tests/lib/lte_lc_api/prj.conf index 41df1965ca61..2142a730937a 100644 --- a/tests/lib/lte_lc_api/prj.conf +++ b/tests/lib/lte_lc_api/prj.conf @@ -34,3 +34,4 @@ CONFIG_LTE_LC_PSM_MODULE=y CONFIG_LTE_LC_RAI_MODULE=y CONFIG_LTE_LC_MODEM_SLEEP_MODULE=y CONFIG_LTE_LC_TAU_PRE_WARNING_MODULE=y +CONFIG_LTE_LC_ENV_EVAL_MODULE=y diff --git a/tests/lib/lte_lc_api/src/lte_lc_api_test.c b/tests/lib/lte_lc_api/src/lte_lc_api_test.c index 7f257f6f51f3..2a0529f8b478 100644 --- a/tests/lib/lte_lc_api/src/lte_lc_api_test.c +++ b/tests/lib/lte_lc_api/src/lte_lc_api_test.c @@ -231,6 +231,68 @@ static void lte_lc_event_handler(const struct lte_lc_evt *const evt) TEST_ASSERT_EQUAL(test_event_data[index].rai_cfg.cp_rai, evt->rai_cfg.cp_rai); break; + case LTE_LC_EVT_ENV_EVAL_RESULT: + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.status, + evt->env_eval_result.status); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.result_count, + evt->env_eval_result.result_count); + for (int i = 0; i < evt->env_eval_result.result_count; i++) { + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].rrc_state, + evt->env_eval_result.results[i].rrc_state); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].energy_estimate, + evt->env_eval_result.results[i].energy_estimate); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].tau_trig, + evt->env_eval_result.results[i].tau_trig); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].ce_level, + evt->env_eval_result.results[i].ce_level); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].earfcn, + evt->env_eval_result.results[i].earfcn); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].dl_pathloss, + evt->env_eval_result.results[i].dl_pathloss); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].rsrp, + evt->env_eval_result.results[i].rsrp); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].rsrq, + evt->env_eval_result.results[i].rsrq); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].tx_rep, + evt->env_eval_result.results[i].tx_rep); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].rx_rep, + evt->env_eval_result.results[i].rx_rep); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].phy_cid, + evt->env_eval_result.results[i].phy_cid); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].band, + evt->env_eval_result.results[i].band); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].snr, + evt->env_eval_result.results[i].snr); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].tx_power, + evt->env_eval_result.results[i].tx_power); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].mcc, + evt->env_eval_result.results[i].mcc); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].mnc, + evt->env_eval_result.results[i].mnc); + TEST_ASSERT_EQUAL( + test_event_data[index].env_eval_result.results[i].cell_id, + evt->env_eval_result.results[i].cell_id); + } + break; + default: TEST_FAIL_MESSAGE("Unhandled test event"); break; @@ -416,6 +478,69 @@ void test_lte_lc_on_modem_init_rai_fail(void) on_modem_init(0, NULL); } +void test_lte_lc_on_modem_init_dns_fail(void) +{ + /* Read modem firmware type. */ + __cmock_nrf_modem_at_cmd_ExpectAndReturn(NULL, 0, "AT+CGMR", 0); + __cmock_nrf_modem_at_cmd_IgnoreArg_buf(); + __cmock_nrf_modem_at_cmd_IgnoreArg_len(); + __cmock_nrf_modem_at_cmd_ReturnArrayThruPtr_buf( + (char *)cgmr_resp_unknown, + sizeof(cgmr_resp_unknown)); + /* lte_lc_system_mode_set() */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%XSYSTEMMODE=1,1,1,3", EXIT_SUCCESS); + /* lte_lc_psm_req(false) */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT+CPSMS=", EXIT_SUCCESS); + /* lte_lc_proprietary_psm_req() */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%FEACONF=0,0,0", EXIT_SUCCESS); + /* CONFIG_LTE_PLMN_SELECTION_OPTIMIZATION=y */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%FEACONF=0,3,1", EXIT_SUCCESS); + /* lte_lc_edrx_req(false) */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT+CEDRXS=3", EXIT_SUCCESS); + /* CONFIG_LTE_RAI_REQ=n */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%RAI=0", EXIT_SUCCESS); + /* CONFIG_LTE_LC_DNS_FALLBACK_MODULE */ + /* DNS address is not valid IPv4 nor IPv6 address */ + __cmock_nrf_inet_pton_ExpectAndReturn(NRF_AF_INET, IGNORE, IGNORE, 0 /* error */); + __cmock_nrf_inet_pton_IgnoreArg_src(); + __cmock_nrf_inet_pton_IgnoreArg_dst(); + __cmock_nrf_inet_pton_ExpectAndReturn(NRF_AF_INET6, IGNORE, IGNORE, 0 /* error */); + __cmock_nrf_inet_pton_IgnoreArg_src(); + __cmock_nrf_inet_pton_IgnoreArg_dst(); + + on_modem_init(0, NULL); + + /* Read modem firmware type. */ + __cmock_nrf_modem_at_cmd_ExpectAndReturn(NULL, 0, "AT+CGMR", 0); + __cmock_nrf_modem_at_cmd_IgnoreArg_buf(); + __cmock_nrf_modem_at_cmd_IgnoreArg_len(); + __cmock_nrf_modem_at_cmd_ReturnArrayThruPtr_buf( + (char *)cgmr_resp_unknown, + sizeof(cgmr_resp_unknown)); + /* lte_lc_system_mode_set() */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%XSYSTEMMODE=1,1,1,3", EXIT_SUCCESS); + /* lte_lc_psm_req(false) */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT+CPSMS=", EXIT_SUCCESS); + /* lte_lc_proprietary_psm_req() */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%FEACONF=0,0,0", EXIT_SUCCESS); + /* CONFIG_LTE_PLMN_SELECTION_OPTIMIZATION=y */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%FEACONF=0,3,1", EXIT_SUCCESS); + /* lte_lc_edrx_req(false) */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT+CEDRXS=3", EXIT_SUCCESS); + /* CONFIG_LTE_RAI_REQ=n */ + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%RAI=0", EXIT_SUCCESS); + /* CONFIG_LTE_LC_DNS_FALLBACK_MODULE */ + __cmock_nrf_inet_pton_ExpectAndReturn(NRF_AF_INET, IGNORE, IGNORE, 1 /* success */); + __cmock_nrf_inet_pton_IgnoreArg_src(); + __cmock_nrf_inet_pton_IgnoreArg_dst(); + /* Setting DNS address fails */ + __cmock_nrf_setdnsaddr_ExpectAndReturn(NRF_AF_INET, IGNORE, sizeof(struct nrf_in_addr), + -1); + __cmock_nrf_setdnsaddr_IgnoreArg_in_addr(); + + on_modem_init(0, NULL); +} + void test_lte_lc_register_handler_null(void) { lte_lc_register_handler(NULL); @@ -5123,6 +5248,414 @@ void test_lte_lc_rai_update_fail(void) at_monitor_dispatch(at_notif); } +void test_lte_lc_env_eval_invalid_params(void) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 100, + .mnc = 99 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_DYNAMIC, + .plmn_count = 0, + .plmn_list = NULL + }; + + /* NULL params */ + ret = lte_lc_env_eval(NULL); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + /* PLMN list NULL */ + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + params.plmn_list = plmn_list; + + /* Zero PLMN count */ + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + /* PLMN count exceeds CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT */ + params.plmn_count = CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT + 1; + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); +} + +void test_lte_lc_env_eval_invalid_funmode(void) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 123, + .mnc = 99 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_DYNAMIC, + .plmn_count = 1, + .plmn_list = plmn_list + }; + + /* Reading functional mode fails */ + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", -NRF_ENOMEM); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EFAULT, ret); + + /* Functional mode is not RX only */ + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_NORMAL); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EOPNOTSUPP, ret); +} + +void test_lte_lc_env_eval_invalid_mccmnc(void) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = {0}; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_DYNAMIC, + .plmn_count = 1, + .plmn_list = plmn_list + }; + + plmn_list[0].mcc = -1; + plmn_list[0].mnc = 0; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + plmn_list[0].mcc = 1000; + plmn_list[0].mnc = 0; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + plmn_list[0].mcc = 0; + plmn_list[0].mnc = -1; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); + + plmn_list[0].mcc = 0; + plmn_list[0].mnc = 1000; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EINVAL, ret); +} + +void test_lte_lc_env_eval_fail(void) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 123, + .mnc = 99 + }, + { + .mcc = 123, + .mnc = 100 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_DYNAMIC, + .plmn_count = 2, + .plmn_list = plmn_list + }; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=0,\"12399\",\"123100\"", -NRF_EFAULT); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(-EFAULT, ret); +} + +void test_lte_lc_env_eval_no_plmns_found(void) +{ + int ret; + int index = 0; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 123, + .mnc = 99 + }, + { + .mcc = 123, + .mnc = 100 + }, + { + .mcc = 123, + .mnc = 101 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_FULL, + .plmn_count = 3, + .plmn_list = plmn_list + }; + + lte_lc_callback_count_expected = 1; + + test_event_data[index].type = LTE_LC_EVT_ENV_EVAL_RESULT; + test_event_data[index].env_eval_result.status = 0; + test_event_data[index].env_eval_result.result_count = 0; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, "%ENVEVAL: 0\r\n"); + at_monitor_dispatch(at_notif); + + k_sleep(K_MSEC(1)); +} + +void test_lte_lc_env_eval_success(void) +{ + int ret; + int index = 0; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 123, + .mnc = 99 + }, + { + .mcc = 123, + .mnc = 100 + }, + { + .mcc = 123, + .mnc = 101 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_FULL, + .plmn_count = 3, + .plmn_list = plmn_list + }; + struct lte_lc_conn_eval_params results[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = {0}; + + lte_lc_callback_count_expected = 1; + + test_event_data[index].type = LTE_LC_EVT_ENV_EVAL_RESULT; + test_event_data[index].env_eval_result.status = 0; + test_event_data[index].env_eval_result.result_count = 3; + test_event_data[index].env_eval_result.results = results; + + results[0].rrc_state = LTE_LC_RRC_MODE_IDLE; + results[0].energy_estimate = LTE_LC_ENERGY_CONSUMPTION_NORMAL; + results[0].tau_trig = LTE_LC_CELL_NOT_IN_TAI_LIST; + results[0].ce_level = LTE_LC_CE_LEVEL_0; + results[0].earfcn = 1300; + results[0].dl_pathloss = 99; + results[0].rsrp = 59; + results[0].rsrq = 32; + results[0].tx_rep = 1; + results[0].rx_rep = 8; + results[0].phy_cid = 123; + results[0].band = 3; + results[0].snr = 42; + results[0].tx_power = -5; + results[0].mcc = 123; + results[0].mnc = 99; + results[0].cell_id = 0xABBAABBA; + + results[1].rrc_state = LTE_LC_RRC_MODE_IDLE; + results[1].energy_estimate = LTE_LC_ENERGY_CONSUMPTION_REDUCED; + results[1].tau_trig = LTE_LC_CELL_NOT_IN_TAI_LIST; + results[1].ce_level = LTE_LC_CE_LEVEL_0; + results[1].earfcn = 1300; + results[1].dl_pathloss = 99; + results[1].rsrp = 59; + results[1].rsrq = 32; + results[1].tx_rep = 1; + results[1].rx_rep = 8; + results[1].phy_cid = 123; + results[1].band = 3; + results[1].snr = 42; + results[1].tx_power = -5; + results[1].mcc = 123; + results[1].mnc = 100; + results[1].cell_id = 0xEBBEEBBE; + + results[2].rrc_state = LTE_LC_RRC_MODE_IDLE; + results[2].energy_estimate = LTE_LC_ENERGY_CONSUMPTION_EFFICIENT; + results[2].tau_trig = LTE_LC_CELL_NOT_IN_TAI_LIST; + results[2].ce_level = LTE_LC_CE_LEVEL_0; + results[2].earfcn = 1300; + results[2].dl_pathloss = 99; + results[2].rsrp = 59; + results[2].rsrq = 32; + results[2].tx_rep = 1; + results[2].rx_rep = 8; + results[2].phy_cid = 123; + results[2].band = 3; + results[2].snr = 42; + results[2].tx_power = -5; + results[2].mcc = 123; + results[2].mnc = 101; + results[2].cell_id = 0xDABADABA; + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, + "%ENVEVAL: 0,0,7,59,32,42,\"ABBAABBA\",\"12399\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + strcpy(at_notif, + "%ENVEVAL: 0,0,8,59,32,42,\"EBBEEBBE\",\"123100\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + strcpy(at_notif, + "%ENVEVAL: 0,0,9,59,32,42,\"DABADABA\",\"123101\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + /* Send one extra notification to make sure it is ignored. */ + strcpy(at_notif, + "%ENVEVAL: 0,0,5,59,32,42,\"BADABADA\",\"123102\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + strcpy(at_notif, "%ENVEVAL: 0\r\n"); + at_monitor_dispatch(at_notif); + + k_sleep(K_MSEC(1)); +} + +void test_lte_lc_env_eval_malformed(void) +{ + int ret; + struct lte_lc_env_eval_plmn plmn_list[CONFIG_LTE_LC_ENV_EVAL_MAX_PLMN_COUNT] = { + { + .mcc = 123, + .mnc = 99 + }, + { + .mcc = 123, + .mnc = 100 + }, + { + .mcc = 123, + .mnc = 101 + } + }; + struct lte_lc_env_eval_params params = { + .eval_type = LTE_LC_ENV_EVAL_TYPE_FULL, + .plmn_count = 3, + .plmn_list = plmn_list + }; + + /* No valid values in the notification */ + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, "%ENVEVAL: foobar\r\n"); + at_monitor_dispatch(at_notif); + + /* Too short PLMN string */ + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, + "%ENVEVAL: 0,0,7,59,32,42,\"ABBAABBA\",\"1234\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + /* Invalid MNC value in PLMN string */ + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, + "%ENVEVAL: 0,0,7,59,32,42,\"ABBAABBA\",\"123aa\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + /* Invalid MCC value in PLMN string */ + + __mock_nrf_modem_at_scanf_ExpectAndReturn("AT+CFUN?", "+CFUN: %hu", 1); + __mock_nrf_modem_at_scanf_ReturnVarg_uint16(LTE_LC_FUNC_MODE_RX_ONLY); + + __mock_nrf_modem_at_printf_ExpectAndReturn( + "AT%ENVEVAL=2,\"12399\",\"123100\",\"123101\"", EXIT_SUCCESS); + + ret = lte_lc_env_eval(¶ms); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); + + strcpy(at_notif, + "%ENVEVAL: 0,0,7,59,32,42,\"ABBAABBA\",\"aaa12\",123,1300,3,1,0,-5,1,8,99\r\n"); + at_monitor_dispatch(at_notif); + + k_sleep(K_MSEC(1)); +} + +void test_lte_lc_env_eval_cancel_fail(void) +{ + int ret; + + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%ENVEVALSTOP", -NRF_EFAULT); + + ret = lte_lc_env_eval_cancel(); + TEST_ASSERT_EQUAL(-EFAULT, ret); +} + +void test_lte_lc_env_eval_cancel(void) +{ + int ret; + + __mock_nrf_modem_at_printf_ExpectAndReturn("AT%ENVEVALSTOP", EXIT_SUCCESS); + + ret = lte_lc_env_eval_cancel(); + TEST_ASSERT_EQUAL(EXIT_SUCCESS, ret); +} + /* It is required to be added to each test. That is because unity's * main may return nonzero, while zephyr's main currently must * return 0 in all cases (other values are reserved). diff --git a/tests/subsys/swo/pytest/nrf54l_swo.script b/tests/subsys/swo/pytest/nrf54l_swo.script new file mode 100644 index 000000000000..b3a389b5992c --- /dev/null +++ b/tests/subsys/swo/pytest/nrf54l_swo.script @@ -0,0 +1,35 @@ +// SWO configuration for nRF54L + +// Secure address for TAD.TRACEPPORTSPEED +__constant U32 _TAD_TRACEPORTSPEED = 0x50053518; + +// The nRF54L chips have an additional divider for the SWO frequency, which +// is configured in TAD.TRACEPORTSPEED. The J-Link needs to be aware of this. +U32 SWO_GetSWOBaseClock(U32 CPUClock) { + U32 divider; + + divider = JLINK_MEM_ReadU32(_TAD_TRACEPORTSPEED); + + if (divider == 0) { + return CPUClock; + } + + if (divider == 1) { + // Divide by 2 + return CPUClock >> 1; + } + + if (divider == 2) { + // Divide by 4 + return CPUClock >> 2; + } + + if (divider == 3) { + // Divide by 32 + return CPUClock >> 5; + } + + // We should never get here, the checks cover all valid divider values + + return CPUClock; +} diff --git a/tests/subsys/swo/pytest/test_swo.py b/tests/subsys/swo/pytest/test_swo.py index aa1258e1699d..e3dc5f9434e5 100644 --- a/tests/subsys/swo/pytest/test_swo.py +++ b/tests/subsys/swo/pytest/test_swo.py @@ -15,6 +15,7 @@ logger = logging.getLogger(__name__) + # Kill parent process and all child processes (if started) def _kill(proc): try: @@ -22,7 +23,7 @@ def _kill(proc): child.kill() proc.kill() except Exception as e: - logger.exception(f'Could not kill JLinkSWOViewerCLExe - {e}') + logger.exception(f"Could not kill JLinkSWOViewerCLExe - {e}") def test_swo_logging(dut: DeviceAdapter): @@ -37,53 +38,64 @@ def test_swo_logging(dut: DeviceAdapter): COLLECT_TIMEOUT = 10.0 EXPECTED = rf"log_swo: \d+: Hello from {PLATFORM}" + NRF54L_JLINK_SCRIPT = Path(__file__).parent.resolve() / "nrf54l_swo.script" + logger.debug(f"{dut.device_config=}") SWO_CONFIG = { - 'nrf52dk/nrf52832': { - 'device': 'nRF52832_xxAA', - 'cpufreq': 64000000, - 'swofreq': 1000000, + "nrf52dk/nrf52832": { + "device": "nRF52832_xxAA", + "cpufreq": 64000000, + "swofreq": 1000000, + "args": "", }, - 'nrf52840dk/nrf52840': { - 'device': 'nRF52840_xxAA', - 'cpufreq': 64000000, - 'swofreq': 1000000, + "nrf52840dk/nrf52840": { + "device": "nRF52840_xxAA", + "cpufreq": 64000000, + "swofreq": 1000000, + "args": "", }, - 'nrf5340dk/nrf5340/cpuapp': { - 'device': 'nRF5340_xxAA_APP', - 'cpufreq': 64000000, - 'swofreq': 1000000, + "nrf5340dk/nrf5340/cpuapp": { + "device": "nRF5340_xxAA_APP", + "cpufreq": 64000000, + "swofreq": 1000000, + "args": "", }, - 'nrf54l15dk/nrf54l05/cpuapp': { - 'device': 'nRF54L05_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54l15dk/nrf54l05/cpuapp": { + "device": "nRF54L05_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, - 'nrf54l15dk/nrf54l10/cpuapp': { - 'device': 'nRF54L10_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54l15dk/nrf54l10/cpuapp": { + "device": "nRF54L10_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, - 'nrf54l15dk/nrf54l15/cpuapp': { - 'device': 'nRF54L15_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54l15dk/nrf54l15/cpuapp": { + "device": "nRF54L15_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, - 'nrf54lm20dk/nrf54lm20a/cpuapp': { - 'device': 'NRF54LM20A_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54lm20dk/nrf54lm20a/cpuapp": { + "device": "NRF54LM20A_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, - 'nrf54lv10dk/nrf54lv10a/cpuapp': { - 'device': 'NRF54LV10A_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54lv10dk/nrf54lv10a/cpuapp": { + "device": "NRF54LV10A_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, - 'nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp': { - 'device': 'NRF54LV10A_M33', - 'cpufreq': 128000000, - 'swofreq': 1000000, + "nrf54lv10dk@0.2.0/nrf54lv10a/cpuapp": { + "device": "NRF54LV10A_M33", + "cpufreq": 128000000, + "swofreq": 1000000, + "args": f"-jlinkscriptfile {NRF54L_JLINK_SCRIPT}", }, } @@ -103,13 +115,14 @@ def test_swo_logging(dut: DeviceAdapter): cmd += f" -cpufreq {SWO_CONFIG[PLATFORM]['cpufreq']}" cmd += f" -swofreq {SWO_CONFIG[PLATFORM]['swofreq']}" cmd += f" -itmmask 0xFFFF -outputfile {log_filename}" + cmd += f" {SWO_CONFIG[PLATFORM]['args']}" try: logger.info(f"Executing:\n{cmd}") proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - encoding='UTF-8', + encoding="UTF-8", shell=True, ) except OSError as exc: @@ -127,9 +140,7 @@ def test_swo_logging(dut: DeviceAdapter): log_file_content = log_file.read() # if nothing in log_file, stop test - assert( - len(log_file_content) > 0 - ), f"File {log_filename} is empty" + assert len(log_file_content) > 0, f"File {log_filename} is empty" # Check if log file contains expected string expected_str = re.search(EXPECTED, log_file_content) diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_control/CMakeLists.txt b/tests/zephyr/drivers/clock_control/nrf_clock_control/CMakeLists.txt new file mode 100644 index 000000000000..fe1ec8947e76 --- /dev/null +++ b/tests/zephyr/drivers/clock_control/nrf_clock_control/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(nrf_clock_control) + +FILE(GLOB app_sources ${ZEPHYR_BASE}/tests/drivers/clock_control/nrf_clock_control/src/*.c) +target_sources(app PRIVATE ${app_sources}) diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_control/README.txt b/tests/zephyr/drivers/clock_control/nrf_clock_control/README.txt new file mode 100644 index 000000000000..74bb330df5bb --- /dev/null +++ b/tests/zephyr/drivers/clock_control/nrf_clock_control/README.txt @@ -0,0 +1,3 @@ +This sample extends the same-named Zephyr sample to verify it with Nordic development kits. + +Source code and basic configuration files can be found in the corresponding folder structure in zephyr/tests/drivers/clock_control/nrf_clock_control. diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_control/prj.conf b/tests/zephyr/drivers/clock_control/nrf_clock_control/prj.conf new file mode 100644 index 000000000000..d11c2f125a03 --- /dev/null +++ b/tests/zephyr/drivers/clock_control/nrf_clock_control/prj.conf @@ -0,0 +1,6 @@ +CONFIG_ZTEST=y + +CONFIG_CLOCK_CONTROL=y +CONFIG_LOG=y +CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG=y +CONFIG_LOCAL_DOMAIN_DVFS_LIB_LOG_LEVEL_DBG=y diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_control/testcase.yaml b/tests/zephyr/drivers/clock_control/nrf_clock_control/testcase.yaml new file mode 100644 index 000000000000..df31379e3c05 --- /dev/null +++ b/tests/zephyr/drivers/clock_control/nrf_clock_control/testcase.yaml @@ -0,0 +1,8 @@ +tests: + nrf.extended.drivers.clock.nrf_clock_control: + tags: + - drivers + - clock_control + - ci_tests_zephyr_drivers_clock_control + platform_allow: + - nrf7120pdk/nrf7120/cpuapp diff --git a/tests/zephyr/drivers/flash/common/testcase.yaml b/tests/zephyr/drivers/flash/common/testcase.yaml index c811d088ec53..232f7ded2052 100644 --- a/tests/zephyr/drivers/flash/common/testcase.yaml +++ b/tests/zephyr/drivers/flash/common/testcase.yaml @@ -3,6 +3,9 @@ common: - drivers - flash - ci_tests_drivers_hpf + harness: ztest + harness_config: + fixture: external_flash tests: nrf.extended.drivers.flash.common.hpf.quad: platform_allow: diff --git a/west.yml b/west.yml index 32a0c6daa8d5..c49545689859 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 51e6f94f5b7ff8d9364dff74d09cd37dfe69439d + revision: d32b79417c5a4c70f16cbbb579d3610daab5f88f import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -128,7 +128,7 @@ manifest: compare-by-default: true - name: mcuboot repo-path: sdk-mcuboot - revision: b6b46a782d503cc52b41672e096fb526daaac31c + revision: c39029507179e3e1707eb46ca002a0780bb5b5b4 path: bootloader/mcuboot - name: qcbor url: https://github.com/laurencelundblade/QCBOR @@ -145,7 +145,7 @@ manifest: - name: nrfxlib repo-path: sdk-nrfxlib path: nrfxlib - revision: 4975e574862e29faf44e6dfc82624e09eb9a20ee + revision: 94ffaf29bf10ebb934907d3b87f82239678fb91a - name: trusted-firmware-m repo-path: sdk-trusted-firmware-m path: modules/tee/tf-m/trusted-firmware-m @@ -176,14 +176,14 @@ manifest: - name: nrf-802154 repo-path: sdk-nrf-802154 path: nrf-802154 - revision: 23c3e4932060c79087c5304c517bcf58cfb62847 + revision: 03b083502c09d20fdf32cc36e63482da10a76ee9 groups: - nrf-802154 - name: dragoon # Only for internal Nordic development repo-path: dragoon.git remote: dragoon - revision: 124494f2406783eeeac5cbb33fdceb0c708842c1 + revision: 6a7e5eb18d5e794f871a74a034adeaa35918d190 groups: - dragoon - name: cjson @@ -246,7 +246,7 @@ manifest: remote: throwtheswitch - name: memfault-firmware-sdk path: modules/lib/memfault-firmware-sdk - revision: 1.28.0 + revision: 1.29.0 remote: memfault - name: bsim repo-path: bsim_west