1.. _ubx_ninab4_nrf52833: 2 3u-blox EVK NINA-B40x 4#################### 5 6Overview 7******** 8 9The u-blox NINA-B4 Evaluation Kit hardware is a Bluetooth low energy 10module based on the Nordic Semiconductor nRF52833 ARM Cortex-M4F CPU 11and has support for the following features: 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) 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-B406_Top_web.jpg 30 31 EVK NINA-B4 32 33More information about the NINA-B4 module and the EVK-NINA-B4 can be 34found at `NINA-B40 product page`_ and `EVK-NINA-B4 product page`_. 35 36Supported Features 37================== 38 39The ubx_evkninab4/nrf52833 board configuration supports the following 40hardware features: 41 42+-----------+------------+----------------------+ 43| Interface | Controller | Driver/Component | 44+===========+============+======================+ 45| ADC | on-chip | adc | 46+-----------+------------+----------------------+ 47| CLOCK | on-chip | clock_control | 48+-----------+------------+----------------------+ 49| FLASH | on-chip | flash | 50+-----------+------------+----------------------+ 51| GPIO | on-chip | gpio | 52+-----------+------------+----------------------+ 53| I2C(M) | on-chip | i2c | 54+-----------+------------+----------------------+ 55| MPU | on-chip | arch/arm | 56+-----------+------------+----------------------+ 57| NVIC | on-chip | arch/arm | 58+-----------+------------+----------------------+ 59| PWM | on-chip | pwm | 60+-----------+------------+----------------------+ 61| RADIO | on-chip | Bluetooth low energy | 62+-----------+------------+----------------------+ 63| RTC | on-chip | system clock | 64+-----------+------------+----------------------+ 65| RTT | Segger | console | 66+-----------+------------+----------------------+ 67| SPI(M/S) | on-chip | spi | 68+-----------+------------+----------------------+ 69| UART | on-chip | serial | 70+-----------+------------+----------------------+ 71| USB | on-chip | usb | 72+-----------+------------+----------------------+ 73| WDT | on-chip | watchdog | 74+-----------+------------+----------------------+ 75 76Other hardware features have not been enabled yet for this board. 77See `EVK-NINA-B4 product page`_ and `NINA-B40 Data Sheet`_ 78for a complete list of EVK NINA-B4 hardware features. 79 80Connections and IOs 81=================== 82 83LED 84--- 85 86* LED0 (red) = P0.13 87* LED1 (green) = P1.01 88* LED2 (blue) = P1.00 89 90Push buttons 91------------ 92 93* BUTTON1 = SW1 = P1.01 (Shared with green LED) 94* BUTTON2 = SW2 = P0.02 95 96General information on module pin numbering 97------------------------------------------- 98 99The numbering of the pins on the module and EVK do not follow the GPIO 100numbering on the nRF52833 SoC. Please see the `NINA-B40 Data Sheet`_ for 101information on how to map NINA-B40 pins to the pin numbering on the 102nRF52833 SoC. 103 104The reason for this is the u-blox module family concept where different 105modules share the same pinout and can be interchanged, see 106`NINA module family Nested design`_. 107 108Programming and Debugging 109************************* 110 111Applications for the ``ubx_evkninab4/nrf52833`` board configuration can be 112built and flashed in the usual way (see :ref:`build_an_application` 113and :ref:`application_run` for more details); however, the standard 114debugging targets are not currently available. 115 116Flashing 117======== 118 119Build and flash applications as usual (see 120:ref:`build_an_application` and :ref:`application_run` for more details) 121 122Here is an example for the :zephyr:code-sample:`hello_world` application. 123 124Open a terminal program to the USB Serial Port installed when connecting 125the board and listen for output. 126 127Settings: 115200, 8N1, no flow control. 128 129Then build and flash the application in the usual way. 130 131.. zephyr-app-commands:: 132 :zephyr-app: samples/hello_world 133 :board: ubx_evkninab4/nrf52833 134 :goals: build flash 135 136Debugging 137========= 138 139Refer to the :ref:`nordic_segger` page to learn about debugging boards 140containing a Nordic Semiconductor chip with a Segger IC. 141 142 143Testing the LEDs and buttons in the EVK NINA-B40x 144************************************************* 145 146There are 2 samples that allow you to test that the buttons (switches) 147and LEDs on the board are working properly with Zephyr: 148 149.. code-block:: console 150 151 samples/basic/blinky 152 samples/basic/button 153 154You can build and flash the examples to make sure Zephyr is running 155correctly on your board. The button and LED definitions can be found in 156:zephyr_file:`boards/u-blox/ubx_evkninab4/ubx_evkninab4_nrf52833.dts`. 157 158Note that the buttons on the EVK-NINA-B4 are marked SW1 and SW2, which 159are named sw0 and sw1 in the dts file. 160Also note that the SW1 button and the green LED are connected on HW level. 161 162Using UART1 163*********** 164 165The following approach can be used when an application needs to use 166more than one UART for connecting peripheral devices: 167 1681. Add device tree overlay file to the main directory of your application: 169 170 .. code-block:: devicetree 171 172 &pinctrl { 173 uart1_default: uart1_default { 174 group1 { 175 psels = <NRF_PSEL(UART_TX, 0, 14)>, 176 <NRF_PSEL(UART_RX, 0, 16)>; 177 }; 178 }; 179 /* required if CONFIG_PM_DEVICE=y */ 180 uart1_sleep: uart1_sleep { 181 group1 { 182 psels = <NRF_PSEL(UART_TX, 0, 14)>, 183 <NRF_PSEL(UART_RX, 0, 16)>; 184 low-power-enable; 185 }; 186 }; 187 }; 188 189 &uart1 { 190 compatible = "nordic,nrf-uarte"; 191 current-speed = <115200>; 192 status = "okay"; 193 pinctrl-0 = <&uart1_default>; 194 pinctrl-1 = <&uart1_sleep>; 195 pinctrl-names = "default", "sleep"; 196 }; 197 198 In the overlay file above, pin P0.16 is used for RX and P0.14 is used for TX 199 2002. Use the UART1 as ``DEVICE_DT_GET(DT_NODELABEL(uart1))`` 201 202Overlay file naming 203=================== 204 205The file has to be named ``<board>.overlay`` and placed in the app main directory to be 206picked up automatically by the device tree compiler. 207 208Selecting the pins 209================== 210 211Pins can be configured in the board pinctrl file. To see the available mappings, 212open the data sheet for the NINA-B4 at `NINA-B40 Data Sheet`_, Section 3 'Pin definition'. 213In the table 7 select the pins marked 'GPIO_xx'. Note that pins marked as 'Radio sensitive pin' 214can only be used in under-10KHz applications. They are not suitable for 115200 speed of UART. 215 216.. note: 217 Pins are defined according to the "nRF52" pin number, not the module pad number. 218 219 220References 221********** 222 223.. target-notes:: 224 225.. _NINA-B40 product page: https://www.u-blox.com/en/product/nina-b40-series-open-cpu 226.. _EVK-NINA-B4 product page: https://www.u-blox.com/en/product/evk-nina-b4 227.. _Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com 228.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html 229.. _NINA-B40 Data Sheet: https://www.u-blox.com/en/docs/UBX-19049405 230.. _NINA module family Nested design: https://www.u-blox.com/en/docs/UBX-17065600 231