1.. _nrf9151dk_nrf9151:
2
3nRF9151 DK
4##########
5
6Overview
7********
8
9The nRF9151 DK (PCA10171) is a single-board development kit for evaluation and
10development on the nRF9151 SiP for DECT NR+ and LTE-M/NB-IoT with GNSS. The ``nrf9151dk/nrf9151``
11board configuration provides support for the Nordic Semiconductor nRF9151 ARM
12Cortex-M33F CPU with ARMv8-M Security Extension and the following devices:
13
14* :abbr:`ADC (Analog to Digital Converter)`
15* CLOCK
16* FLASH
17* :abbr:`GPIO (General Purpose Input Output)`
18* :abbr:`I2C (Inter-Integrated Circuit)`
19* :abbr:`MPU (Memory Protection Unit)`
20* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
21* :abbr:`PWM (Pulse Width Modulation)`
22* :abbr:`RTC (nRF RTC System Clock)`
23* Segger RTT (RTT Console)
24* :abbr:`SPI (Serial Peripheral Interface)`
25* :abbr:`UARTE (Universal asynchronous receiver-transmitter with EasyDMA)`
26* :abbr:`WDT (Watchdog Timer)`
27* :abbr:`IDAU (Implementation Defined Attribution Unit)`
28
29More information about the board can be found at the `nRF9151 website`_.
30
31
32Hardware
33********
34
35nRF9151 DK has two external oscillators. The frequency of
36the slow clock is 32.768 kHz. The frequency of the main clock
37is 32 MHz.
38
39Supported Features
40==================
41
42The ``nrf9151dk/nrf9151`` board configuration supports the following
43hardware features:
44
45+-----------+------------+----------------------+
46| Interface | Controller | Driver/Component     |
47+===========+============+======================+
48| ADC       | on-chip    | adc                  |
49+-----------+------------+----------------------+
50| CLOCK     | on-chip    | clock_control        |
51+-----------+------------+----------------------+
52| FLASH     | on-chip    | flash                |
53+-----------+------------+----------------------+
54| FLASH     | external   | spi                  |
55+-----------+------------+----------------------+
56| GPIO      | on-chip    | gpio                 |
57+-----------+------------+----------------------+
58| GPIO      | external   | i2c                  |
59+-----------+------------+----------------------+
60| I2C(M)    | on-chip    | i2c                  |
61+-----------+------------+----------------------+
62| MPU       | on-chip    | arch/arm             |
63+-----------+------------+----------------------+
64| NVIC      | on-chip    | arch/arm             |
65+-----------+------------+----------------------+
66| PWM       | on-chip    | pwm                  |
67+-----------+------------+----------------------+
68| RTC       | on-chip    | system clock         |
69+-----------+------------+----------------------+
70| RTT       | nRF53      | console              |
71+-----------+------------+----------------------+
72| SPI(M/S)  | on-chip    | spi                  |
73+-----------+------------+----------------------+
74| SPU       | on-chip    | system protection    |
75+-----------+------------+----------------------+
76| UARTE     | on-chip    | serial               |
77+-----------+------------+----------------------+
78| WDT       | on-chip    | watchdog             |
79+-----------+------------+----------------------+
80
81
82.. _nrf9151dk_additional_hardware:
83
84Other hardware features have not been enabled yet for this board.
85See the `nRF9151 website`_ for more information.
86
87Connections and IOs
88===================
89
90LED
91---
92
93* LED1 (green) = P0.0
94* LED2 (green) = P0.1
95* LED3 (green) = P0.4
96* LED4 (green) = P0.5
97
98Push buttons and Switches
99-------------------------
100
101* BUTTON1 = P0.8
102* BUTTON2 = P0.9
103* SWITCH1 = P0.18
104* SWITCH2 = P0.19
105* BOOT = SW5 = boot/reset
106
107Security components
108===================
109
110- Implementation Defined Attribution Unit (`IDAU`_).  The IDAU is implemented
111  with the System Protection Unit and is used to define secure and non-secure
112  memory maps.  By default, all of the memory space  (Flash, SRAM, and
113  peripheral address space) is defined to be secure accessible only.
114- Secure boot.
115
116
117Programming and Debugging
118*************************
119
120``nrf9151dk/nrf9151`` supports the Armv8m Security Extension, and by default boots
121in the Secure state.
122
123Building Secure/Non-Secure Zephyr applications with Arm |reg| TrustZone |reg|
124=============================================================================
125
126The process requires the following steps:
127
1281. Build the Secure Zephyr application using ``-DBOARD=nrf9151dk/nrf9151`` and
129   ``CONFIG_TRUSTED_EXECUTION_SECURE=y`` in the application project configuration file.
1302. Build the Non-Secure Zephyr application using ``-DBOARD=nrf9151dk/nrf9151/ns``.
1313. Merge the two binaries together.
132
133When building a Secure/Non-Secure application, the Secure application will
134have to set the IDAU (SPU) configuration to allow Non-Secure access to all
135CPU resources utilized by the Non-Secure application firmware. SPU
136configuration shall take place before jumping to the Non-Secure application.
137
138Building a Secure only application
139==================================
140
141Build the Zephyr app in the usual way (see :ref:`build_an_application`
142and :ref:`application_run`), using ``-DBOARD=nrf9151dk/nrf9151``.
143
144Flashing
145========
146
147Follow the instructions in the :ref:`nordic_segger` page to install
148and configure all the necessary software. Further information can be
149found in :ref:`nordic_segger_flashing`. Then build and flash
150applications as usual (see :ref:`build_an_application` and
151:ref:`application_run` for more details).
152
153Here is an example for the :zephyr:code-sample:`hello_world` application.
154
155First, run your favorite terminal program to listen for output.
156
157.. code-block:: console
158
159   $ minicom -D <tty_device> -b 115200
160
161Replace :code:`<tty_device>` with the port where the nRF9151 DK
162can be found. For example, under Linux, :code:`/dev/ttyACM0`.
163
164Then build and flash the application in the usual way.
165
166.. zephyr-app-commands::
167   :zephyr-app: samples/hello_world
168   :board: nrf9151dk/nrf9151
169   :goals: build flash
170
171Debugging
172=========
173
174Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
175Segger IC.
176
177
178Testing the LEDs and buttons in the nRF9151 DK
179**********************************************
180
181There are 2 samples that allow you to test that the buttons (switches) and LEDs on
182the board are working properly with Zephyr:
183
184* :zephyr:code-sample:`blinky`
185* :zephyr:code-sample:`button`
186
187You can build and flash the examples to make sure Zephyr is running correctly on
188your board. The button and LED definitions can be found in
189:zephyr_file:`boards/nordic/nrf9151dk/nrf9151dk_nrf9151_common.dtsi`.
190
191References
192**********
193
194.. target-notes::
195
196.. _IDAU:
197   https://developer.arm.com/docs/100690/latest/attribution-units-sau-and-idau
198.. _nRF9151 website: https://www.nordicsemi.com/Products/nRF9151
199.. _Nordic Semiconductor TechDocs: https://docs.nordicsemi.com/
200.. _Trusted Firmware M: https://www.trustedfirmware.org/projects/tf-m/
201