Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | .. _96b_nitrogen_board:
96Boards Nitrogen
#################
Overview
********
Zephyr applications use the 96b_nitrogen board configuration to run on the
96Boards Nitrogen hardware. It provides support for the Nordic Semiconductor
nRF52832 ARM Cortex-M4F CPU.
.. figure:: img/96b-nitrogen-front.png
:width: 487px
:align: center
:alt: 96Boards Nitrogen
96Boards Nitrogen
More information about the board can be found at the `seeed BLE Nitrogen`_
website. The `Nordic Semiconductor Infocenter`_ contains the processor's
information and the datasheet.
Hardware
********
96Boards Nitrogen provides the following hardware components:
- nRF52832 microcontroller with 512kB Flash, 64kB RAM
- ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU
- Bluetooth LE
- NFC
- LPC11U35 on board SWD debugger
- SWD debugger firmware
- USB to UART
- Drag and Drop firmware upgrade
- 7 LEDs
- USR1, BT, PWR, CDC, DAP, MSD, Battery charge
- SWD debug connectors
- nRF52832 SWD connector
- nRF52832 Uart connector
- On board chip antenna
- 1.8V work voltage
- 2x20pin 2.0mm pitch Low speed connector
Supported Features
==================
The Zephyr 96b_nitrogen board configuration supports the following hardware
features:
+-----------+------------+--------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================================+
| NVIC | on-chip | nested vectored interrupt controller |
+-----------+------------+--------------------------------------+
| RTC | on-chip | system clock |
+-----------+------------+--------------------------------------+
| UART | on-chip | serial port |
+-----------+------------+--------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+--------------------------------------+
| FLASH | on-chip | flash |
+-----------+------------+--------------------------------------+
| RADIO | on-chip | Bluetooth |
+-----------+------------+--------------------------------------+
| RTT | on-chip | console |
+-----------+------------+--------------------------------------+
Other hardware features are not supported by the Zephyr kernel.
See `Nordic Semiconductor Infocenter`_ for a complete list of nRF52-based
board hardware features.
The default configuration can be found in the defconfig file:
``boards/arm/96b_nitrogen/96b_nitrogen_defconfig``
Pin Mapping
===========
LED
---
- LED1 / User LED (green) = P0.29
- LED2 / BT LED (blue) = P0.28
Push buttons
------------
- BUTTON = SW1 = P0.27
External Connectors
-------------------
Low Speed Header
+--------+-------------+----------------------+
| PIN # | Signal Name | nRF52832 Functions |
+========+=============+======================+
| 1 | GND | GND |
+--------+-------------+----------------------+
| 3 | UART CTS | P.014 / TRACEDATA[3] |
+--------+-------------+----------------------+
| 5 | UART TX | P0.13 |
+--------+-------------+----------------------+
| 7 | UART RX | P0.15 / TRACEDATA[2] |
+--------+-------------+----------------------+
| 9 | UART RTS | P0.12 |
+--------+-------------+----------------------+
| 11 | UART TX | P0.13 |
+--------+-------------+----------------------+
| 13 | UART RX | P0.15 / TRACEDATA[2] |
+--------+-------------+----------------------+
| 15 | P0.22 | P0.22 |
+--------+-------------+----------------------+
| 17 | P0.20 | P0.20 |
+--------+-------------+----------------------+
| 19 | N/A | N/A |
+--------+-------------+----------------------+
| 21 | N/A | N/A |
+--------+-------------+----------------------+
| 23 | P0.02 | P0.02 |
+--------+-------------+----------------------+
| 25 | P0.04 | P0.04 |
+--------+-------------+----------------------+
| 27 | P0.06 | P0.06 |
+--------+-------------+----------------------+
| 29 | P0.08 | P0.08 |
+--------+-------------+----------------------+
| 31 | P0.16 | P0.16 |
+--------+-------------+----------------------+
| 33 | P0.18 | P0.18 |
+--------+-------------+----------------------+
| 35 | VCC | |
+--------+-------------+----------------------+
| 37 | USB5V | |
+--------+-------------+----------------------+
| 39 | GND | GND |
+--------+-------------+----------------------+
+--------+-------------+----------------------+
| PIN # | Signal Name | nRF52832 Functions |
+========+=============+======================+
| 2 | GND | GND |
+--------+-------------+----------------------+
| 4 | PWR BTN | |
+--------+-------------+----------------------+
| 6 | RST BTN | P0.21 / RESET |
+--------+-------------+----------------------+
| 8 | P0.26 | P0.26 |
+--------+-------------+----------------------+
| 10 | P0.25 | P0.25 |
+--------+-------------+----------------------+
| 12 | P0.24 | P0.24 |
+--------+-------------+----------------------+
| 14 | P0.23 | P0.23 |
+--------+-------------+----------------------+
| 16 | N/A | N/A |
+--------+-------------+----------------------+
| 18 | N/A | PC7 |
+--------+-------------+----------------------+
| 20 | N/A | PC9 |
+--------+-------------+----------------------+
| 22 | N/A | PB8 |
+--------+-------------+----------------------+
| 24 | P0.03 | P0.03 |
+--------+-------------+----------------------+
| 26 | P0.05 | P0.05 |
+--------+-------------+----------------------+
| 28 | P0.07 | P0.07 |
+--------+-------------+----------------------+
| 30 | P0.11 | P0.11 |
+--------+-------------+----------------------+
| 32 | P0.17 | P0.17 |
+--------+-------------+----------------------+
| 34 | P0.19 | P0.19 |
+--------+-------------+----------------------+
| 36 | NC | |
+--------+-------------+----------------------+
| 38 | NC | |
+--------+-------------+----------------------+
| 40 | GND | GND |
+--------+-------------+----------------------+
System Clock
============
nRF52 has two external oscillators. The frequency of the slow clock is
32.768 kHz. The frequency of the main clock is 32 MHz.
Flashing Zephyr onto 96Boards Nitrogen
**************************************
The 96Boards Nitrogen board can be flashed via the `CMSIS DAP`_ interface,
which is provided by the micro USB interface to the LPC11U35 chip.
Using the CMSIS-DAP interface, the board can be flashed via the USB storage
interface (drag-and-drop) and also via `pyOCD`_.
Installing pyOCD
================
The latest stable version of `pyOCD`_ can be installed via pip as follows:
.. code-block:: console
$ pip install --pre -U pyocd
To install the latest development version (master branch), do the following:
.. code-block:: console
$ pip install --pre -U git+https://github.com/mbedmicro/pyOCD.git#egg=pyOCD
You can then verify that your board is detected by pyOCD by running:
.. code-block:: console
$ pyocd-flashtool -l
Common Errors
-------------
No connected boards
-------------------
If you don't use sudo when invoking pyocd-flashtool, you might get any of the
following errors:
.. code-block:: console
No available boards are connected
.. code-block:: console
No connected boards
.. code-block:: console
Error: There is no board connected.
To fix the permission issue, simply add the following udev rule for the
NXP LPC1768 interface:
.. code-block:: console
$ echo 'ATTR{idProduct}=="0204", ATTR{idVendor}=="0d28", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-cmsis-dap.rules
Finally, unplug and plug the board again.
ValueError: The device has no langid
------------------------------------
As described by `pyOCD issue 259`_, you might get the
:code:`ValueError: The device has no langid` error when not running
pyOCD as root (e.g. sudo).
To fix the above error, add the udev rule shown in the previous section
and install a more recent version of pyOCD.
Flashing an Application to 96Boards Nitrogen
============================================
Here is an example for the :ref:`hello_world` application. This
requires installing the :ref:`nxp_opensda_pyocd` tools.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: 96b_nitrogen
:goals: build flash
Run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board 96Boards Nitrogen
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
The ``-b`` option sets baud rate ignoring the value from config.
Press the Reset button and you should see the the following message in your
terminal:
.. code-block:: console
Hello World! arm
Debugging with GDB
==================
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application. This also requires pyOCD.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: 96b_nitrogen
:maybe-skip-config:
:goals: debug
.. _pyOCD:
https://github.com/mbedmicro/pyOCD
.. _CMSIS DAP:
https://developer.mbed.org/handbook/CMSIS-DAP
.. _Nordic Semiconductor Infocenter:
http://infocenter.nordicsemi.com/
.. _seeed BLE Nitrogen:
http://wiki.seeed.cc/BLE_Nitrogen/
.. _pyOCD issue 259:
https://github.com/mbedmicro/pyOCD/issues/259
|