# nRF91xx Modem Firmware (MFW) Update via SWD Port

Conexio Stratus Pro comes with the latest version of the nRF91xx SiP hardware, preloaded with the latest modem firmware, and with a sample application that blinks the device LED and prints the output to the terminal.

## Updating the Modem Firmware

{% hint style="danger" %}
Downgrading the modem firmware is not recommended for the Stratus device.&#x20;
{% endhint %}

If needed, one can update Modem Firmware (MFW) or flash the application imageusing an external programmer and a 10-pin SWD cable using either [<mark style="color:red;">nRF5340</mark>](https://www.nordicsemi.com/Products/Development-hardware/nrf5340-dk) or [<mark style="color:red;">nRF91xx development kit</mark>](https://www.nordicsemi.com/Products/Development-hardware/nrf9160-dk), following the steps outlined below.

{% hint style="info" %}
To supply continuous power via the debugger port to the Stratus device, make sure to solder the **SB47** jumper on the nRF5340 DK or the **SB16** on the nRF91 DK. This is located near the Debug out port on the DK.
{% endhint %}

<figure><img src="/files/40yaUAagkfkMfuW9HVCb" alt=""><figcaption></figcaption></figure>

* First, download the latest nRF91xx LTE SiP modem firmware from the [<mark style="color:red;">Nordic Semiconductor website</mark>](https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/sip/nrf91x1-sip/nrf91x1-lte-modem-firmware/mfw_nrf91x1_2.0.2.zip) under the download firmware section.
* Connect the Conexio Stratus dev kit to the nRFxx development kit via the SWD cable. Then connect the nRF Dev kit to the laptop with a USB cable.

![](/files/iLHAXOyP4ToodWtI8Wpj)

* Make sure the direction of the SWD cable on the Stratus Pro kit is as indicated in Green in the above image. Reversing this can damage the board due to reverse polarity.
* Connect either the LiPo battery or USB power to power the Stratus Pro device.
* Next, to program the latest modem firmware, issue the following command. This requires that you have [nrfutil ](https://www.nordicsemi.com/Products/Development-tools/nRF-Util)tool installed on your machine. Refer to the [nrfutil documentation](https://docs.nordicsemi.com/bundle/nrfutil/page/guides/installing.html#prerequisites) for more.

```
nrfutil 91 modem-firmware-upgrade --firmware mfw_nrf91x1_2.0.1.zip --serial-number serial_number_of_your_nrf_dev_kit 
```

{% hint style="info" %}
Do not extract the modem firmware zip file and choose the correct modem firmware depending on your nRF91 devices.
{% endhint %}

## Flashing an Application Image using SWD port

To flash an application image to Stratus Pro over the SWD port, follow these steps:

* Compile the application firmware using the nRF Connect Plugin for VSCode as [outlined here](/getting-started-with-conexio-blitz/conexio-blitz-overview/programming-and-debugging/building-and-programming-an-application/compiling-applications-with-nrf-connect-extension-for-vs-code.md).
* Then open the nRF Terminal from an application within VSCode as shown below:

<figure><img src="/files/rQrZf5FaVjVWX4mYM0RL" alt=""><figcaption></figcaption></figure>

* Connect the Conexio Stratus dev kit to the nRFxx development kit via the SWD cable as outlined above. Then connect the nRF Dev kit to the laptop with a USB cable. You should now see the device recognized under **Connected Devices in the** nRF Connect Plugin.
* Next issue the  following west flash command in the terminal:

```
west flash --recover
```

```bash
-- west flash: rebuilding
[0/10] Performing build step for 'mcuboot'
ninja: no work to do.
[1/10] Performing build step for 'multi_sensor'
[0/14] Performing build step for 'tfm'
ninja: no work to do.
[8/10] cd /opt/nordic/ncs/v2.9.0/conexio-firmware-sdk/samples/conexio_stratus/multi_sensor/build/_sysbuild && /opt/nordic/ncs/toolchains/b8efef2ad5/Cellar/cmake/3.21.0/bin/cmake -E true
-- west flash: using runner nrfjprog
-- runners.nrfjprog: reset after flashing requested
Using board 1051274754
-- runners.nrfjprog: Recovering and erasing all flash memory.
Recovering device. This operation might take 30s.
Restored application UICR.HFXOSRC and UICR.HFXOCNT.
Erasing user code and UICR flash areas.
Writing image to disable ap protect.
-- runners.nrfjprog: Flashing file: /opt/nordic/ncs/v2.9.0/conexio-firmware-sdk/samples/conexio_stratus/multi_sensor/build/merged.hex
[ #################### ]   3.738s | Erase file - Done erasing                                                          
[ #################### ]   0.914s | Program file - Done programming                                                    
[ #################### ]   0.878s | Verify file - Done verifying                                                       
Applying pin reset.
-- runners.nrfjprog: Board with serial number 1051274754 flashed successfully.
```

* Once the command starts executing, one should see the above logs in the terminal window, where the nrf programmer (nrfjprog) will rebuild the app and then automatically flash it to the Stratus device.
* Once successfully flashed, the pin reset will be triggered.
* That's it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conexiotech.com/master/mfw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
