Skip to content

Commit

Permalink
doc: working_with_nrf: squash structure for nRF91
Browse files Browse the repository at this point in the history
Reworked Working with nRF91 Series pages.
Moved their contents to separate pages.
Renamed Working with to Developing with.
NCSDK-22328.

Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
  • Loading branch information
greg-fer committed Apr 30, 2024
1 parent c09046c commit 9005e48
Show file tree
Hide file tree
Showing 8 changed files with 439 additions and 290 deletions.
21 changes: 15 additions & 6 deletions doc/nrf/device_guides/nrf91.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _ug_nrf91:

Working with nRF91 Series
#########################
Developing with nRF91 Series
############################

Zephyr and the |NCS| provide support for developing cellular applications using the following nRF91 Series devices:

Expand All @@ -15,14 +15,14 @@ Zephyr and the |NCS| provide support for developing cellular applications using
- Product pages
* - :ref:`zephyr:nrf9161dk_nrf9161`
- PCA10153
- ``nrf9161dk_nrf9161_ns``
- ``nrf9161dk_nrf9161_ns`` or ``nrf9161dk_nrf9161`` (see :ref:`app_boards_spe_nspe`)
- | `Product Specification <nRF9161 Product Specification_>`_
| `User Guide <nRF9161 DK Hardware_>`_
- | `nRF9161 DK product page`_
| `nRF9161 System in Package (SiP) <nRF9161 product website_>`_
* - :ref:`zephyr:nrf9160dk_nrf9160`
- PCA10090
- ``nrf9160dk_nrf9160_ns``
- ``nrf9160dk_nrf9160_ns`` or ``nrf9160dk_nrf9160`` (see :ref:`app_boards_spe_nspe`)
- | `Product Specification <nRF9160 Product Specification_>`_
| :ref:`Getting started <ug_nrf9160_gs>`
| `User Guide <nRF9160 DK Hardware_>`_
Expand All @@ -36,7 +36,7 @@ Zephyr and the |NCS| provide support for developing cellular applications using
- | `Thingy\:91 product page`_
| `nRF9160 System in Package (SiP) <nRF9160 product website_>`_
The nRF Connect SDK also offers :ref:`samples <cellular_samples>` dedicated to these devices.
The nRF Connect SDK also offers :ref:`samples <cellular_samples>` dedicated to these devices, as well as compatible :ref:`drivers` and :ref:`libraries`.

If you want to go through a hands-on online training to familiarize yourself with cellular IoT technologies and development of cellular applications, enroll in the `Cellular IoT Fundamentals course`_ in the `Nordic Developer Academy`_.

Expand All @@ -45,7 +45,16 @@ If you want to go through a hands-on online training to familiarize yourself wit
:caption: Subpages:

working_with_nrf/nrf91/nrf91_features
working_with_nrf/nrf91/nrf91_board_controllers
working_with_nrf/nrf91/nrf91_cloud_certificate
working_with_nrf/nrf91/nrf91_updating_fw_programmer
working_with_nrf/nrf91/nrf91_snippet


----
working_with_nrf/nrf91/nrf9161
working_with_nrf/nrf91/nrf9160
working_with_nrf/nrf91/thingy91
working_with_nrf/nrf91/nrf91_snippet



Binary file not shown.
Binary file not shown.
182 changes: 0 additions & 182 deletions doc/nrf/device_guides/working_with_nrf/nrf91/nrf9160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,188 +13,6 @@ See the `nRF9160 DK Hardware`_ guide for detailed information about the nRF9160
To get started with the nRF9160 DK, follow the steps in the :ref:`ug_nrf9160_gs` section.
If you are not familiar with the |NCS|, see :ref:`installation` and :ref:`configuration_and_build` documentation to install the |NCS| and learn more about its development environment.

.. _nrf9160_ug_intro:

Board controller
****************

The nRF9160 DK contains an nRF52840 SoC that is used to route some of the nRF9160 SiP pins to different components on the DK, such as LEDs and buttons, and to specific pins of the nRF52840 SoC itself.
For a complete list of all the routing options available, see the `nRF9160 DK board control section in the nRF9160 DK User Guide`_.
Make sure to select the correct controller before you program the application to your development kit.

The nRF52840 SoC on the DK comes preprogrammed with a firmware.
If you need to restore the original firmware at some point, download the nRF9160 DK board controller firmware from the `nRF9160 DK downloads`_ page.
To program the HEX file, use nrfjprog (which is part of the `nRF Command Line Tools`_).

If you want to route some pins differently from what is done in the preprogrammed firmware, program the :ref:`zephyr:hello_world` sample instead of the preprogrammed firmware.
Build the sample (located under ``ncs/zephyr/samples/hello_world``) for the nrf9160dk_nrf52840 board.
To change the routing options, enable or disable the corresponding devicetree nodes for that board as needed.
See :ref:`zephyr:nrf9160dk_board_controller_firmware` for detailed information.

.. _nrf9160_ug_updating_cloud_certificate:

Updating the nRF Cloud certificate
**********************************

.. |DK| replace:: nRF9160 DK

.. dk_update_cloud_cer_start
When you wish to use nRF Cloud's REST Application Programming Interface (API), the DK requires a valid security certificate.
This means that you need to update the certificate stored on the DK.
To do so, you need to download a new certificate and then provision it to your DK.

.. dk_update_cloud_cer_end
.. _downloading_cloud_certificate_nRF9160:

Downloading the nRF Cloud certificate for the |DK|
==================================================

.. dk_cloud_cer_download_start
To download the nRF Cloud certificate for your |DK|, complete the following steps.
Make sure you are logged in to the `nRF Cloud`_ portal.

1. Click :guilabel:`Devices` under :guilabel:`Device Management` in the navigation pane on the left.

.. figure:: /gsg_guides/images/nrfcloud_devices.png
:alt: nRF Cloud - Devices

nRF Cloud - Devices

#. Click :guilabel:`Add Devices`.

.. figure:: /gsg_guides/images/nrfcloud_add_devices.png
:alt: nRF Cloud - Add Devices

nRF Cloud - Add Devices

The **Select Device Type** pop-up opens.

#. Click :guilabel:`LTE Device` in the **Select Device Type** pop-up.

.. figure:: /gsg_guides/images/nrfcloud_selectdevicetype.png
:alt: nRF Cloud - Select Device Type

nRF Cloud - Select Device Type

#. Click **Create JITP Certificates** at the bottom of the page.

The **Create JITP Certificates** dialog box opens.

.. figure:: images/nrfcloud_jitpcertificates.png
:alt: nRF Cloud - Create JITP Certificates dialog box

nRF Cloud - Create JITP Certificates dialog box

#. Enter the following information:

* **Device ID:** the device ID is composed of *nrf-* and the 15-digit :term:`International Mobile (Station) Equipment Identity (IMEI)` number that is printed on the label of your |DK|.
For example, *nrf-123456789012345*.
* **Ownership code:** the ownership code is the PIN or the hardware ID of your DK, and it is found on the label of your |DK|.

If the label contains a PIN in addition to the IMEI number, enter this pin.
If it does not contain a PIN, enter the Hardware ID (HWID) HEX code, with or without colons.
For example, *AA:BB:CC:DD:EE:FF* or *AABBCCDDEEFF*.

.. note::

The ownership code serves as a password and proves that you own the specific |DK|.
Therefore, do not share it with anyone.

#. Click :guilabel:`Download Certificate` and save the :file:`.cert.json` file to a folder of your choice.

.. note::

The certificate contains all the information that is needed to connect your |DK| to nRF Cloud.
Therefore, do not share it with anyone.

#. Close the **Create JITP Certificates** dialog box.

.. dk_cloud_cer_download_end
.. _provisioning_cloud_certificate:

Provisioning the nRF Cloud certificate
======================================

After downloading the certificate, you must provision it to your nRF9160 DK.

.. note::

The application firmware on the nRF9160 DK must support long AT commands up to 3 kB to provision the certificate.
If you have updated the application firmware using the instructions in either the :ref:`nrf9160_gs_updating_fw` documentation or the :ref:`nrf9160_ug_updating_fw_programmer` or :ref:`build_pgm_nrf9160` sections, this requirement is fulfilled.

Complete the following steps to provision the certificate:

1. Start nRF Connect for Desktop and install the `Cellular Monitor`_ app.
#. Open the Cellular Monitor app.
#. Connect the DK to the computer with a micro-USB cable, and turn it on.
#. Click :guilabel:`Select device` and select the DK from the drop-down list.

.. figure:: images/cellularmonitor_selectdevice1_nrf9160.png
:alt: Cellular Monitor - Select device

Cellular Monitor - Select device

The drop-down text changes to the type of the selected device, with the SEGGER ID below the name.

#. Click the :guilabel:`Open Serial Terminal` option of the `Cellular Monitor`_ app to open the Serial Terminal.

.. figure:: images/cellularmonitor_open_serial_terminal.png
:alt: Cellular Monitor - Open Serial Terminal

Cellular Monitor - Open Serial Terminal

#. Enter ``AT+CFUN=4`` in the text field for AT commands and click :guilabel:`Send`.
This AT command puts the modem to offline state.
#. Enter ``AT+CFUN?`` in the text field for AT commands and click :guilabel:`Send`.
This AT command returns the state of the modem.

The command must return ``+CFUN: 4``, which indicates that the modem is in offline state.
If it returns a different value, repeat the previous step.
#. Open the Cellular Monitor app.
#. Click :guilabel:`CERTIFICATE MANAGER` in the navigation bar to switch to the certificate manager view.

.. figure:: images/cellularmonitor_navigationcertificatemanager.png
:alt: Cellular Monitor - Certificate Manager

Cellular Monitor - Certificate Manager

#. Click :guilabel:`Load from JSON` and select the :file:`*.cert.json` file that you downloaded from nRF Cloud.
Alternatively, you can drag and drop the file onto the GUI.

.. figure:: images/cellularmonitor_loadjson.png
:alt: Cellular Monitor - Load from JSON

Cellular Monitor - Load from JSON

#. Ensure that the **Security tag** is set to ``16842753``, which is the security tag for nRF Cloud credentials.
#. Click :guilabel:`Update certificate`.

The log message "Certificate update completed" indicates that the certificate was provisioned successfully.
If you encounter any errors, switch to the terminal view and check the output of the AT commands that were sent to the nRF9160 DK modem.

.. note::

If you have connected your nRF9160 DK to nRF Cloud before, you must delete the device there after provisioning the certificate.
Open the entry for your device from the **Devices** view, then click the gear icon to the right of the device's name, and select :guilabel:`Delete Device`.
Then, add the nRF9160 DK again as described in :ref:`nrf9160_gs_connecting_dk_to_cloud`


Build targets
*************

Make sure to select a suitable build target when building your application.

In Zephyr, the firmware for the application core of :ref:`zephyr:nrf9160dk_nrf9160` is divided into two different build targets:

* ``nrf9160dk_nrf9160`` for build targets that have Cortex-M Security Extensions (CMSE) disabled.
* ``nrf9160dk_nrf9160_ns`` for build targets that have CMSE enabled and have the Secure Processing Environment (SPE) firmware alongside the Non-Secure Processing Environment (NSPE) firmware.

For information about CMSE and the difference between the two environments, see :ref:`app_boards_spe_nspe`.

.. _nrf9160_ug_updating_fw_programmer:

Updating the DK firmware using Programmer
Expand Down
102 changes: 0 additions & 102 deletions doc/nrf/device_guides/working_with_nrf/nrf91/nrf9161.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,108 +14,6 @@ See the `nRF9161 DK Hardware`_ guide for detailed information about the nRF9161
To get started with the nRF9161 DK, complete the steps in the Quick Start app in `nRF Connect for Desktop`_.
If you are not familiar with the |NCS|, see :ref:`installation` and :ref:`configuration_and_build` documentation to install the |NCS| and learn more about its development environment.

.. _nrf9161_ug_intro:

Board controller
****************

The nRF9161 DK contains an nRF5340 Interface MCU (IMCU), which acts both as an on-board debugger and board controller.
The board controller controls signal switches on the nRF9161 DK and can be used to route the nRF9161 SiP pins to different components on the DK, such as pin headers, external memory, a SIM card or eSIM.
For a complete list of configuration options available, see the nRF9161 DK board control section in the nRF9161 DK User Guide.

The nRF5340 IMCU comes preprogrammed with J-Link SEGGER OB and board controller firmware.
If you want to change the default configuration of the DK, you can use the Board Configurator app in `nRF Connect for Desktop`_ .
See the `nRF Connect Board Configurator`_ documentation for instructions on how to change the configuration of the DK.

.. _nrf9161_ug_updating_cloud_certificate:

Updating the nRF Cloud certificate
**********************************

.. |DK| replace:: nRF9161 DK

.. include:: nrf9160.rst
:start-after: dk_update_cloud_cer_start
:end-before: dk_update_cloud_cer_end

.. _downloading_cloud_certificate_nRF9161:
.. _downloading_cloud_certificate_nRF91x1:

Downloading the nRF Cloud certificate for the |DK|
==================================================

.. include:: nrf9160.rst
:start-after: dk_cloud_cer_download_start
:end-before: dk_cloud_cer_download_end

Provisioning the nRF Cloud certificate
======================================

After downloading the certificate, you must provision it to your nRF9161 DK.

Complete the following steps to provision the certificate:

1. Start nRF Connect for Desktop and install the `Cellular Monitor`_ app.
#. Open the Cellular Monitor app.
#. Connect the DK to the computer with a USB-C cable, and turn it on.
#. Click :guilabel:`Select device` and select the DK from the drop-down list.

.. figure:: images/cellularmonitor_selectdevice_nrf9161.png
:alt: Cellular Monitor - Select device

Cellular Monitor - Select device

The drop-down text changes to the type of the selected device, with the SEGGER ID below the name.

#. Click the :guilabel:`Open Serial Terminal` option of the `Cellular Monitor`_ app to open the Serial Terminal.

.. figure:: images/cellularmonitor_open_serial_terminal_nrf9161.png
:alt: Cellular Monitor - Open Serial Terminal

Cellular Monitor - Open Serial Terminal

#. Enter ``AT+CFUN=4`` in the text field for AT commands and click :guilabel:`Send`.
This AT command puts the modem to offline state.
#. Enter ``AT+CFUN?`` in the text field for AT commands and click :guilabel:`Send`.
This AT command returns the state of the modem.

The command must return ``+CFUN: 4``, which indicates that the modem is in offline state.
If it returns a different value, repeat the previous step.
#. Open the Cellular Monitor app.
#. Click :guilabel:`CERTIFICATE MANAGER` in the navigation bar to switch to the certificate manager view.

.. figure:: images/cellularmonitor_navigationcertificatemanager_nrf9161.png
:alt: Cellular Monitor - Certificate Manager

Cellular Monitor - Certificate Manager

#. Click :guilabel:`Load from JSON` and select the :file:`*.cert.json` file that you downloaded from nRF Cloud.
Alternatively, you can drag and drop the file onto the GUI.
#. Ensure that the **Security tag** is set to ``16842753``, which is the security tag for nRF Cloud credentials.
#. Click :guilabel:`Update certificate`.

The log message "Certificate update completed" indicates that the certificate was provisioned successfully.
If you encounter any errors, switch to the terminal view and check the output of the AT commands that were sent to the nRF9161 DK modem.

.. note::

If you have connected your nRF9161 DK to nRF Cloud before, you must delete the device there after provisioning the certificate.
Open the entry for your device from the **Devices** view, then click the gear icon to the right of the device's name, and select :guilabel:`Delete Device`.
Then, add the nRF9161 DK again to the nRF cloud.


Build targets
*************

Make sure to select a suitable build target when building your application.

In Zephyr, the firmware for the application core of :ref:`zephyr:nrf9161dk_nrf9161` is divided into two different build targets:

* ``nrf9161dk_nrf9161`` for build targets that have Cortex-M Security Extensions (CMSE) disabled.
* ``nrf9161dk_nrf9161_ns`` for build targets that have CMSE enabled and have the Secure Processing Environment (SPE) firmware alongside the Non-Secure Processing Environment (NSPE) firmware.

For information about CMSE and the difference between the two environments, see :ref:`app_boards_spe_nspe`.

.. _nrf9161_ug_updating_fw_programmer:

Updating the DK firmware using Programmer
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. _nrf91_ug_board_controllers:

Configuring board controller
############################

.. contents::
:local:
:depth: 2

The nRF91 Series DKs contain additional chips that act as board controllers.

.. _nrf9161_ug_intro:

Board controller on the nRF9161 DK
**********************************

The nRF9161 DK contains an nRF5340 Interface MCU (IMCU), which acts both as an on-board debugger and board controller.
The board controller controls signal switches on the nRF9161 DK and can be used to route the nRF9161 SiP pins to different components on the DK, such as pin headers, external memory, a SIM card or eSIM.
For a complete list of configuration options available, see the nRF9161 DK board control section in the nRF9161 DK User Guide.

The nRF5340 IMCU comes preprogrammed with J-Link SEGGER OB and board controller firmware.
If you want to change the default configuration of the DK, you can use the Board Configurator app in `nRF Connect for Desktop`_ .
See the `nRF Connect Board Configurator`_ documentation for instructions on how to change the configuration of the DK.

.. _nrf9160_ug_intro:

Board controller on the nRF9160 DK
**********************************

The nRF9160 DK contains an nRF52840 SoC that is used to route some of the nRF9160 SiP pins to different components on the DK, such as LEDs and buttons, and to specific pins of the nRF52840 SoC itself.
For a complete list of all the routing options available, see the `nRF9160 DK board control section in the nRF9160 DK User Guide`_.
Make sure to select the correct controller before you program the application to your development kit.

The nRF52840 SoC on the DK comes preprogrammed with a firmware.
If you need to restore the original firmware at some point, download the nRF9160 DK board controller firmware from the `nRF9160 DK downloads`_ page.
To program the HEX file, use nrfjprog (which is part of the `nRF Command Line Tools`_).

If you want to route some pins differently from what is done in the preprogrammed firmware, program the :ref:`zephyr:hello_world` sample instead of the preprogrammed firmware.
Build the sample (located under ``ncs/zephyr/samples/hello_world``) for the nrf9160dk_nrf52840 board.
To change the routing options, enable or disable the corresponding devicetree nodes for that board as needed.
See :ref:`zephyr:nrf9160dk_board_controller_firmware` for detailed information.
Loading

0 comments on commit 9005e48

Please sign in to comment.