1.. _ubx_bmd380eval_nrf52840: 2 3u-blox EVK-BMD-34/48: BMD-380-EVAL 4################################## 5 6Overview 7******** 8 9The BMD-380-EVAL hardware provides support for the 10u-blox BMD-380 Bluetooth 5.0 module, based on The 11Nordic Semiconductor nRF52840 ARM Cortex-M4F CPU and 12the 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* RADIO (Bluetooth Low Energy and 802.15.4) 23* :abbr:`RTC (nRF RTC System Clock)` 24* Segger RTT (RTT Console) 25* :abbr:`SPI (Serial Peripheral Interface)` 26* :abbr:`UART (Universal asynchronous receiver-transmitter)` 27* :abbr:`USB (Universal Serial Bus)` 28* :abbr:`WDT (Watchdog Timer)` 29 30.. figure:: img/BMD-34-38-EVAL.jpg 31 :align: center 32 :alt: BMD-340-EVAL 33 34 BMD-340-EVAL (Credit: u-blox AG) 35 36.. note:: 37 The BMD-380-EVAL shares the same pin headers and assignments as the 38 BMD-340-EVAL with four exceptions. The BMD-340-EVAL is shown here. 39 See the pin tables below for the exceptions. 40 41More information about the BMD-340-EVAL and the BMD-340 module 42can be found at the `u-blox website`_. All of the Nordic Semiconductor 43examples for the nRF52840 DK (nrf52840dk_nrf52840) may be used without 44modification. 45 46Hardware 47******** 48 49The BMD-380 on the BMD-380-EVAL contains an internal high-frequency 50oscillator at 32MHz. There is also a low frequency (slow) oscillator 51of 32.768kHz. The BMD-380 itself does not include the slow crystal; 52however, the BMD-380-eval does. 53 54.. note:: 55 56 When targeting a custom design without a slow crystal, be sure 57 to modify code to utilize the internal RC oscillator for the 58 slow clock. 59 60Supported Features 61================== 62 63The BMD-380-EVAL board configuration supports the following 64hardware features: 65 66+-----------+------------+----------------------+ 67| Interface | Controller | Driver/Component | 68+===========+============+======================+ 69| ADC | on-chip | adc | 70+-----------+------------+----------------------+ 71| CLOCK | on-chip | clock_control | 72+-----------+------------+----------------------+ 73| FLASH | on-chip | flash | 74+-----------+------------+----------------------+ 75| GPIO | on-chip | gpio | 76+-----------+------------+----------------------+ 77| I2C(M) | on-chip | i2c | 78+-----------+------------+----------------------+ 79| MPU | on-chip | arch/arm | 80+-----------+------------+----------------------+ 81| NVIC | on-chip | arch/arm | 82+-----------+------------+----------------------+ 83| PWM | on-chip | pwm | 84+-----------+------------+----------------------+ 85| RADIO | on-chip | Bluetooth, | 86| | | IEEE 802.15.4 | 87+-----------+------------+----------------------+ 88| RTC | on-chip | system clock | 89+-----------+------------+----------------------+ 90| RTT | Segger | console | 91+-----------+------------+----------------------+ 92| SPI(M/S) | on-chip | spi | 93+-----------+------------+----------------------+ 94| UART | on-chip | serial | 95+-----------+------------+----------------------+ 96| USB | on-chip | usb | 97+-----------+------------+----------------------+ 98| WDT | on-chip | watchdog | 99+-----------+------------+----------------------+ 100 101Other hardware features have not been enabled yet for this board. 102See the `u-blox website`_ for a complete list of BMD-380-EVAL 103hardware features. 104 105Connections and IOs 106=================== 107 108LED 109--- 110 111* LED1 (red) = P0.13 112* LED2 (red) = P0.14 113* LED3 (green) = P0.15 114* LED4 (green) = P0.16 115* D5 (red) = OB LED 1 116* D6 (green) = OB LED 2 117 118Push buttons 119------------ 120 121* BUTTON1 = SW1 = P0.11 122* BUTTON2 = SW2 = P0.12 123* BUTTON3 = SW3 = P0.24 124* BUTTON4 = SW4 = P0.25 125* BOOT = SW5 = boot/reset 126 127External Connectors 128------------------- 129 130.. figure:: img/bmd-340-eval_pin_out.jpg 131 :align: center 132 :alt: BMD-340-EVAL pin-out 133 134.. note:: 135 The BMD-380-EVAL shares the same pin headers and assignments as the 136 BMD-340-EVAL with four exceptions. The BMD-340-EVAL is shown here. 137 See the pin tables below for the exceptions. 138 139.. note:: 140 The pin numbers noted below are referenced to 141 the pin 1 markings on the BMD-380-EVAL 142 for each header 143 144J-Link Prog Connector (J2) 145 146+-------+--------------+ 147| PIN # | Signal Name | 148+=======+==============+ 149| 1 | VDD | 150+-------+--------------+ 151| 2 | IMCU_TMSS | 152+-------+--------------+ 153| 3 | GND | 154+-------+--------------+ 155| 4 | IMCU_TCKS | 156+-------+--------------+ 157| 5 | V5V | 158+-------+--------------+ 159| 6 | IMCU_TDOS | 160+-------+--------------+ 161| 7 | Cut off | 162+-------+--------------+ 163| 8 | IMCU_TDIS | 164+-------+--------------+ 165| 9 | Cut off | 166+-------+--------------+ 167| 10 | IMCU_RESET | 168+-------+--------------+ 169 170Debug OUT (J3) 171 172+-------+----------------+ 173| PIN # | Signal Name | 174+=======+================+ 175| 1 | EXT_VTG | 176+-------+----------------+ 177| 2 | EXT_SWDIO | 178+-------+----------------+ 179| 3 | GND | 180+-------+----------------+ 181| 4 | EXT_SWDCLK | 182+-------+----------------+ 183| 5 | GND | 184+-------+----------------+ 185| 6 | EXT_SWO | 186+-------+----------------+ 187| 7 | N/C | 188+-------+----------------+ 189| 8 | N/C | 190+-------+----------------+ 191| 9 | EXT_GND_DETECT | 192+-------+----------------+ 193| 10 | EXT_RESET | 194+-------+----------------+ 195 196Debug IN (J26) 197 198+-------+----------------+ 199| PIN # | Signal Name | 200+=======+================+ 201| 1 | BMD-340_VCC | 202+-------+----------------+ 203| 2 | BMD-340_SWDIO | 204+-------+----------------+ 205| 3 | GND | 206+-------+----------------+ 207| 4 | BMD-340_SWDCLK | 208+-------+----------------+ 209| 5 | GND | 210+-------+----------------+ 211| 6 | BMD-340_SWO | 212+-------+----------------+ 213| 7 | N/C | 214+-------+----------------+ 215| 8 | N/C | 216+-------+----------------+ 217| 9 | GND | 218+-------+----------------+ 219| 10 | BMD-340_RESET | 220+-------+----------------+ 221 222Auxiliary (J9) 223 224+-------+----------------+ 225| PIN # | Signal Name | 226+=======+================+ 227| 1 | P0.10 / NFC2 | 228+-------+----------------+ 229| 2 | P0.09 / NFC1 | 230+-------+----------------+ 231| 3 | P0.08 | 232+-------+----------------+ 233| 4 | P0.07 | 234+-------+----------------+ 235| 5 | P0.06 | 236+-------+----------------+ 237| 6 | P0.05 / AIN3 | 238+-------+----------------+ 239| 7 | P0.01 / XL2 | 240+-------+----------------+ 241| 8 | P0.00 / XL1 | 242+-------+----------------+ 243 244Auxiliary (J10) 245 246+-------+-------------------+ 247| PIN # | Signal Name | 248+=======+===================+ 249| 1 | P0.11 / TRACED[2] | 250+-------+-------------------+ 251| 2 | P0.12 / TRACED[1] | 252+-------+-------------------+ 253| 3 | P0.13 | 254+-------+-------------------+ 255| 4 | P0.14 | 256+-------+-------------------+ 257| 5 | P0.15 | 258+-------+-------------------+ 259| 6 | P0.16 | 260+-------+-------------------+ 261| 7 | P0.17 / QSPI_CS | 262+-------+-------------------+ 263| 8 | P0.18 / RESET | 264+-------+-------------------+ 265| 9 | P0.19 / QSPI_CLK | 266+-------+-------------------+ 267| 10 | P0.20 / QSPI_D0 | 268+-------+-------------------+ 269| 11 | P0.21 / QSPI_D1 | 270+-------+-------------------+ 271| 12 | P0.22 / QSPI_D2 | 272+-------+-------------------+ 273| 13 | P0.23 / QSPI_D3 | 274+-------+-------------------+ 275| 14 | P0.24 | 276+-------+-------------------+ 277| 15 | P0.25 | 278+-------+-------------------+ 279| 16 | P1.00 / TRACED[0] | 280+-------+-------------------+ 281| 17 | P1.09 / TRACED[3] | 282+-------+-------------------+ 283| 18 | No connection | 284+-------+-------------------+ 285 286Power (J5) 287 288+-------+--------------+-------------------------+ 289| PIN # | Signal Name | BMD-380 Functions | 290+=======+==============+=========================+ 291| 1 | VSHLD | N/A | 292+-------+--------------+-------------------------+ 293| 2 | VSHLD | N/A | 294+-------+--------------+-------------------------+ 295| 3 | RESET | P0.18 / RESET | 296+-------+--------------+-------------------------+ 297| 4 | VSHLD | N/A | 298+-------+--------------+-------------------------+ 299| 5 | V5V | N/A | 300+-------+--------------+-------------------------+ 301| 6 | GND | N/A | 302+-------+--------------+-------------------------+ 303| 7 | GND | N/A | 304+-------+--------------+-------------------------+ 305| 8 | N/C | N/A | 306+-------+--------------+-------------------------+ 307 308Analog in (J8) 309 310+-------+--------------+-------------------------+ 311| PIN # | Signal Name | BMD-380 Functions | 312+=======+==============+=========================+ 313| 1 | A0 | P0.03 / AIN1 | 314+-------+--------------+-------------------------+ 315| 2 | A1 | P0.04 / AIN2 | 316+-------+--------------+-------------------------+ 317| 3 | A2 | P0.28 / AIN4 | 318+-------+--------------+-------------------------+ 319| 4 | A3 | P0.29 / AIN5 | 320+-------+--------------+-------------------------+ 321| 5 | A4 | P0.30 / AIN6 | 322+-------+--------------+-------------------------+ 323| 6 | A5 | P0.31 / AIN7 | 324+-------+--------------+-------------------------+ 325 326Digital I/O (J7) 327 328+-------+--------------+-------------------------+ 329| PIN # | Signal Name | BMD-380 Functions | 330+=======+==============+=========================+ 331| 1 | D7 | P1.08 | 332+-------+--------------+-------------------------+ 333| 2 | - | No connection | 334+-------+--------------+-------------------------+ 335| 3 | D5 | P1.06 | 336+-------+--------------+-------------------------+ 337| 4 | D4 | No connection | 338+-------+--------------+-------------------------+ 339| 5 | - | No connection | 340+-------+--------------+-------------------------+ 341| 6 | - | No connection | 342+-------+--------------+-------------------------+ 343| 7 | D1 (TX) | P1.02 | 344+-------+--------------+-------------------------+ 345| 8 | - | No connection | 346+-------+--------------+-------------------------+ 347 348Digital I/O (J6) 349 350+-------+--------------+-------------------------+ 351| PIN # | Signal Name | BMD-380 Functions | 352+=======+==============+=========================+ 353| 1 | SCL | P0.27 | 354+-------+--------------+-------------------------+ 355| 2 | SDA | P0.26 | 356+-------+--------------+-------------------------+ 357| 3 | AREF | P0.02 / AIN0 | 358+-------+--------------+-------------------------+ 359| 4 | GND | N/A | 360+-------+--------------+-------------------------+ 361| 5 | D13 (SCK) | P1.15 | 362+-------+--------------+-------------------------+ 363| 6 | D12 (MISO) | P1.14 | 364+-------+--------------+-------------------------+ 365| 7 | D11 (MOSI) | P1.13 | 366+-------+--------------+-------------------------+ 367| 8 | D10 (SS) | P1.12 | 368+-------+--------------+-------------------------+ 369| 9 | D9 | P1.11 | 370+-------+--------------+-------------------------+ 371| 10 | D8 | P1.10 | 372+-------+--------------+-------------------------+ 373 374J11 375 376+-------+--------------+-------------------------+ 377| PIN # | Signal Name | BMD-380 Functions | 378+=======+==============+=========================+ 379| 1 | D12 (MISO) | P0.14 | 380+-------+--------------+-------------------------+ 381| 2 | V5V | N/A | 382+-------+--------------+-------------------------+ 383| 3 | D13 (SCK) | P0.15 | 384+-------+--------------+-------------------------+ 385| 4 | D11 (MOSI) | P0.13 | 386+-------+--------------+-------------------------+ 387| 5 | RESET | N/A | 388+-------+--------------+-------------------------+ 389| 6 | N/A | N/A | 390+-------+--------------+-------------------------+ 391 392Programming and Debugging 393************************* 394 395Applications for the BMD-380-EVAL board configurations can 396be built and flashed in the usual way 397(see :ref:`build_an_application` and :ref:`application_run` 398for more details); however, the standard debugging targets 399are not currently available. 400 401Flashing 402======== 403 404Follow the instructions in the :ref:`nordic_segger` page to install 405and configure all the necessary software. Further information can be 406found in :ref:`nordic_segger_flashing`. Then build and flash 407applications as usual (see :ref:`build_an_application` and 408:ref:`application_run` for more details). 409 410Here is an example for the :ref:`hello_world` application. 411 412First, run your favorite terminal program to listen for output. 413 414.. code-block:: console 415 416 $ minicom -D <tty_device> -b 115200 417 418Replace :code:`<tty_device>` with the port where the BMD-380-EVAL 419can be found. For example, under Linux, :code:`/dev/ttyACM0`. 420 421Then build and flash the application in the usual way. 422 423.. zephyr-app-commands:: 424 :zephyr-app: samples/hello_world 425 :board: ubx_bmd380eval/nrf52840 426 :goals: build flash 427 428Debugging 429========= 430 431Refer to the :ref:`nordic_segger` page to learn about debugging 432u-blox boards with a Segger J-LINK-OB IC. 433 434 435Testing the LEDs and buttons in the BMD-380-EVAL 436************************************************ 437 438There are 2 samples that allow you to test that the buttons 439(switches) and LEDs on the board are working properly with Zephyr: 440 441.. code-block:: console 442 443 samples/basic/blinky 444 samples/basic/button 445 446You can build and flash the examples to make sure Zephyr is running 447correctly on your board. The button and LED definitions can be found in 448:zephyr_file:`boards/u-blox/ubx_bmd340eval/ubx_bmd340eval_nrf52840.dts`. 449 450Using UART1 451*********** 452 453The following approach can be used when an application needs to use 454more than one UART for connecting peripheral devices: 455 4561. Add device tree overlay file to the main directory of your 457 application: 458 459 .. code-block:: devicetree 460 461 &pinctrl { 462 uart1_default: uart1_default { 463 group1 { 464 psels = <NRF_PSEL(UART_TX, 0, 14)>, 465 <NRF_PSEL(UART_RX, 0, 16)>; 466 }; 467 }; 468 /* required if CONFIG_PM_DEVICE=y */ 469 uart1_sleep: uart1_sleep { 470 group1 { 471 psels = <NRF_PSEL(UART_TX, 0, 14)>, 472 <NRF_PSEL(UART_RX, 0, 16)>; 473 low-power-enable; 474 }; 475 }; 476 }; 477 478 &uart1 { 479 compatible = "nordic,nrf-uarte"; 480 current-speed = <115200>; 481 status = "okay"; 482 pinctrl-0 = <&uart1_default>; 483 pinctrl-1 = <&uart1_sleep>; 484 pinctrl-names = "default", "sleep"; 485 }; 486 487 In the overlay file above, pin P0.16 is used for RX and P0.14 is 488 used for TX 489 4902. Use the UART1 as ``DEVICE_DT_GET(DT_NODELABEL(uart1))`` 491 492Overlay file naming 493=================== 494 495The file has to be named ``<board>.overlay`` and placed in the app 496main directory to be picked up automatically by the device tree 497compiler. 498 499Selecting the pins 500================== 501 502Pins can be configured in the board pinctrl file. To see the available mappings, 503open the data sheet for the BMD-380 at the `u-blox website`_, Section 2 504'Pin definition'. In the table 3 select the pins marked 'GPIO'. 505Note that pins marked as 'Standard drive, low frequency I/O only 506(<10 kH' can only be used in under-10KHz applications. 507They are not suitable for 115200 speed of UART. 508 509.. note: 510 Pins are defined according to the "nRF52" pin number, not the module 511 pad number. 512 513References 514********** 515 516.. target-notes:: 517 518.. _u-blox website: https://www.u-blox.com/docs/UBX-19039467 519