1.. _ubx_ninab3_nrf52840: 2 3u-blox EVK-NINA-B3 4################## 5 6Overview 7******** 8 9The u-blox EVK-NINA-B30 Development Kit hardware provides support for the 10u-blox NINA-B30x Bluetooth 5.0 module, based on the Nordic Semiconductor 11nRF52840 ARM Cortex-M4F CPU and the following devices: 12 13* :abbr:`ADC (Analog to Digital Converter)` 14* CLOCK 15* FLASH 16* :abbr:`GPIO (General Purpose Input Output)` 17* :abbr:`I2C (Inter-Integrated Circuit)` 18* :abbr:`MPU (Memory Protection Unit)` 19* :abbr:`NVIC (Nested Vectored Interrupt Controller)` 20* :abbr:`PWM (Pulse Width Modulation)` 21* RADIO (Bluetooth Low Energy and 802.15.4) 22* :abbr:`RTC (nRF RTC System Clock)` 23* Segger RTT (RTT Console) 24* :abbr:`SPI (Serial Peripheral Interface)` 25* :abbr:`UART (Universal asynchronous receiver-transmitter)` 26* :abbr:`USB (Universal Serial Bus)` 27* :abbr:`WDT (Watchdog Timer)` 28 29.. figure:: img/EVK-NINA-B3.jpg 30 :align: center 31 :alt: EVK-NINA-B3 32 33 EVK-NINA-B3 (Credit: u-blox AG) 34 35More information about the EVK-NINA-B3 and the NINA-B30x modules 36can be found at the `u-blox website`_. 37 38Hardware 39******** 40 41The NINA-B30x on the EVK-NINA-B30x contains an internal high-frequency 42oscillator at 32MHz as well as a low frequency (slow) oscillator 43of 32.768kHz. 44 45 46Supported Features 47================== 48 49The ubx_evkninab3/nrf52840 board configuration supports the following 50hardware features: 51 52+-----------+------------+----------------------+ 53| Interface | Controller | Driver/Component | 54+===========+============+======================+ 55| ADC | on-chip | adc | 56+-----------+------------+----------------------+ 57| CLOCK | on-chip | clock_control | 58+-----------+------------+----------------------+ 59| FLASH | on-chip | flash | 60+-----------+------------+----------------------+ 61| GPIO | on-chip | gpio | 62+-----------+------------+----------------------+ 63| I2C(M) | on-chip | i2c | 64+-----------+------------+----------------------+ 65| MPU | on-chip | arch/arm | 66+-----------+------------+----------------------+ 67| NVIC | on-chip | arch/arm | 68+-----------+------------+----------------------+ 69| PWM | on-chip | pwm | 70+-----------+------------+----------------------+ 71| RADIO | on-chip | Bluetooth, | 72| | | IEEE 802.15.4 | 73+-----------+------------+----------------------+ 74| RTC | on-chip | system clock | 75+-----------+------------+----------------------+ 76| RTT | Segger | console | 77+-----------+------------+----------------------+ 78| SPI(M/S) | on-chip | spi | 79+-----------+------------+----------------------+ 80| UART | on-chip | serial | 81+-----------+------------+----------------------+ 82| USB | on-chip | usb | 83+-----------+------------+----------------------+ 84| WDT | on-chip | watchdog | 85+-----------+------------+----------------------+ 86 87Other hardware features have not been enabled yet for this board. 88See the `u-blox website`_ for a complete list of EVK-NINA-B30x 89hardware features. 90 91Connections and IOs 92=================== 93 94LED 95--- 96 97* LED0 (red) = P0.13 98* LED1 (green) = P0.25 99* LED2 (blue) = P1.00 100 101Push buttons 102------------ 103 104* BUTTON1 = SW1 = P0.25 105* BUTTON2 = SW2 = P0.2 106* BOOT = SW0 = boot/reset 107 108External Connectors 109------------------- 110 111.. note:: 112 The pin numbers noted below are referenced to 113 the pin 1 markings on the EVK-NINA-B30x 114 for each header 115 116 117Arduino Headers 118--------------- 119 120Power (J1) 121 122+-------+--------------+-------------------------+ 123| PIN # | Signal Name | NINA-B30x Functions | 124+=======+==============+=========================+ 125| 1 | N/C | N/A | 126+-------+--------------+-------------------------+ 127| 2 | VDD_IO | N/A | 128+-------+--------------+-------------------------+ 129| 3 | RESET | P0.18 / RESET | 130+-------+--------------+-------------------------+ 131| 4 | 3V3 | N/A | 132+-------+--------------+-------------------------+ 133| 5 | 5V0 | N/A | 134+-------+--------------+-------------------------+ 135| 6 | GND | N/A | 136+-------+--------------+-------------------------+ 137| 7 | GND | N/A | 138+-------+--------------+-------------------------+ 139| 8 | VIN | N/A | 140+-------+--------------+-------------------------+ 141 142Analog in (J2) 143 144+-------+--------------+-------------------------+ 145| PIN # | Signal Name | NINA-B30x Functions | 146+=======+==============+=========================+ 147| 1 | A0 | P0.04 / AIN2 | 148+-------+--------------+-------------------------+ 149| 2 | A1 | P0.30 / AIN6 | 150+-------+--------------+-------------------------+ 151| 3 | A2 | P0.05 / AIN3 | 152+-------+--------------+-------------------------+ 153| 4 | A3 | P0.02 / AIN0 | 154+-------+--------------+-------------------------+ 155| 5 | A4 | P0.28 / AIN4 | 156+-------+--------------+-------------------------+ 157| 6 | A5 | P0.03 / AIN1 | 158+-------+--------------+-------------------------+ 159 160Digital I/O (J3) 161 162+-------+--------------+-------------------------+ 163| PIN # | Signal Name | NINA-B30x Functions | 164+=======+==============+=========================+ 165| 8 | D7 | P0.10 | 166+-------+--------------+-------------------------+ 167| 7 | D6 | P0.09 | 168+-------+--------------+-------------------------+ 169| 6 | D5 | P0.11 | 170+-------+--------------+-------------------------+ 171| 5 | D4 | P0.13 | 172+-------+--------------+-------------------------+ 173| 4 | D3 | P0.31 | 174+-------+--------------+-------------------------+ 175| 3 | D2 | P1.12 | 176+-------+--------------+-------------------------+ 177| 2 | D1 (TX) | P1.13 | 178+-------+--------------+-------------------------+ 179| 1 | D0 (RX) | P0.29 | 180+-------+--------------+-------------------------+ 181 182Digital I/O (J4) 183 184+-------+--------------+-------------------------+ 185| PIN # | Signal Name | NINA-B30x Functions | 186+=======+==============+=========================+ 187| 10 | SCL | P0.24 | 188+-------+--------------+-------------------------+ 189| 9 | SDA | P0.16 | 190+-------+--------------+-------------------------+ 191| 8 | N/C | N/A | 192+-------+--------------+-------------------------+ 193| 7 | GND | N/A | 194+-------+--------------+-------------------------+ 195| 6 | D13 (SCK) | P0.07 | 196+-------+--------------+-------------------------+ 197| 5 | D12 (MISO) | P1.00 | 198+-------+--------------+-------------------------+ 199| 4 | D11 (MOSI) | P0.15 | 200+-------+--------------+-------------------------+ 201| 3 | D10 (SS) | P0.14 | 202+-------+--------------+-------------------------+ 203| 2 | D9 | P0.12 | 204+-------+--------------+-------------------------+ 205| 1 | D8 | P1.09 | 206+-------+--------------+-------------------------+ 207 208 209Programming and Debugging 210************************* 211 212Applications for the ``ubx_evkninab3/nrf52840`` board configuration can be 213built and flashed in the usual way (see :ref:`build_an_application` 214and :ref:`application_run` for more details); however, the standard 215debugging targets are not currently available. 216 217Flashing 218======== 219 220Follow the instructions in the :ref:`nordic_segger` page to install 221and configure all the necessary software. Further information can be 222found in :ref:`nordic_segger_flashing`. Then build and flash 223applications as usual (see :ref:`build_an_application` and 224:ref:`application_run` for more details). 225 226Here is an example for the :zephyr:code-sample:`hello_world` application. 227 228First, run your favorite terminal program to listen for output. 229 230.. code-block:: console 231 232 $ minicom -D <tty_device> -b 115200 233 234Replace :code:`<tty_device>` with the port where the EVK-NINA-B30x 235can be found. For example, under Linux, :code:`/dev/ttyACM0`. 236 237Then build and flash the application in the usual way. 238 239.. zephyr-app-commands:: 240 :zephyr-app: samples/hello_world 241 :board: ubx_evkninab3/nrf52840 242 :goals: build flash 243 244Debugging 245========= 246 247Refer to the :ref:`nordic_segger` page to learn about debugging 248u-blox boards with a Segger J-LINK-OB IC. 249 250 251Testing the LEDs and buttons in the EVK-NINA-B30x 252************************************************* 253 254There are 2 samples that allow you to test that the buttons 255(switches) and LEDs on the board are working properly with Zephyr: 256 257.. code-block:: console 258 259 samples/basic/blinky 260 samples/basic/button 261 262You can build and flash the examples to make sure Zephyr is running correctly on 263your board. The button and LED definitions can be found in 264:zephyr_file:`boards/u-blox/ubx_evkninab3/ubx_evkninab3_nrf52840.dts`. 265 266Using UART1 267*********** 268 269The following approach can be used when an application needs to use 270more than one UART for connecting peripheral devices: 271 2721. Add device tree overlay file to the main directory of your application: 273 274 .. code-block:: devicetree 275 276 &pinctrl { 277 uart1_default: uart1_default { 278 group1 { 279 psels = <NRF_PSEL(UART_TX, 0, 14)>, 280 <NRF_PSEL(UART_RX, 0, 16)>; 281 }; 282 }; 283 /* required if CONFIG_PM_DEVICE=y */ 284 uart1_sleep: uart1_sleep { 285 group1 { 286 psels = <NRF_PSEL(UART_TX, 0, 14)>, 287 <NRF_PSEL(UART_RX, 0, 16)>; 288 low-power-enable; 289 }; 290 }; 291 }; 292 293 &uart1 { 294 compatible = "nordic,nrf-uarte"; 295 current-speed = <115200>; 296 status = "okay"; 297 pinctrl-0 = <&uart1_default>; 298 pinctrl-1 = <&uart1_sleep>; 299 pinctrl-names = "default", "sleep"; 300 }; 301 302 In the overlay file above, pin P0.16 is used for RX and P0.14 is used for TX 303 3042. Use the UART1 as ``DEVICE_DT_GET(DT_NODELABEL(uart1))`` 305 306Overlay file naming 307=================== 308 309The file has to be named ``<board>.overlay`` and placed in the app main directory to be 310picked up automatically by the device tree compiler. 311 312Selecting the pins 313================== 314 315Pins can be configured in the board pinctrl file. To see the available mappings, 316open the data sheet for the NINA-B3 at `u-blox website`_, Section 3 'Pin definition'. 317In the table 7 select the pins marked 'GPIO_xx'. Note that pins marked as 'Radio sensitive pin' 318can only be used in under-10KHz applications. They are not suitable for 115200 speed of UART. 319 320.. note: 321 Pins are defined according to the "nRF52" pin number, not the module pad number. 322 323References 324********** 325 326.. target-notes:: 327 328.. _u-blox website: https://www.u-blox.com/en/product/nina-b3-series-open-cpu 329