Skip to content
Permalink
Browse files

boards: arm: add nrf52840_gw16126

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
  • Loading branch information...
Gateworks committed Oct 30, 2018
1 parent 72e7bfa commit ba5f00ad5918b44e901f356a98e63e963516a429
@@ -0,0 +1,14 @@
# Kconfig - nRF52840 GW16126 board configuration
#
# Copyright (c) 2018 Gateworks Corporation
#
# SPDX-License-Identifier: Apache-2.0

if BOARD_NRF52840_GW16126

config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y

endif # BOARD_NRF52840_GW16126
@@ -0,0 +1,9 @@
# Kconfig - nRF52840 GW16126 board configuration
#
# Copyright (c) 2018 Gateworks Corporation
#
# SPDX-License-Identifier: Apache-2.0

config BOARD_NRF52840_GW16126
bool "NRF52840 GW16126"
depends on SOC_NRF52840_QIAA
@@ -0,0 +1,29 @@
# Kconfig - nRF52 GW16126 board configuration
#
# Copyright (c) 2018 Gateworks Corporation
#
# SPDX-License-Identifier: Apache-2.0

if BOARD_NRF52840_GW16126

config BOARD
default "nrf52840_gw16126"

if USB

config USB_NRF52840
def_bool y

config USB_DEVICE_STACK
def_bool y

endif # USB

if IEEE802154

config IEEE802154_NRF5
def_bool y

endif # IEEE802154

endif # BOARD_NRF52840_GW16126
@@ -0,0 +1,4 @@
board_runner_args(nrfjprog "--nrf-family=NRF52")
board_runner_args(jlink "--device=nrf52" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2016-2018 Nordic Semiconductor ASA.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __INC_BOARD_H
#define __INC_BOARD_H

#include <soc.h>

#endif /* __INC_BOARD_H */
Binary file not shown.
@@ -0,0 +1,126 @@
.. _nrf52840_gw16126:

nRF52840-GW16126
#################

Overview
********

Zephyr applications use the nrf52840_gw16126 board configuration
to run on the Gateworks GW16126 miniPCIe card. It provides
support for the Nordic Semiconductor nRF52840 ARM Cortex-M4F CPU and
the following devices:

* :abbr:`ADC (Analog to Digital Converter)`
* CLOCK
* FLASH
* :abbr:`MPU (Memory Protection Unit)`
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
* RADIO (Bluetooth Low Energy and 802.15.4)
* :abbr:`RTC (nRF RTC System Clock)`
* Segger RTT (RTT Console)
* :abbr:`UART (Universal asynchronous receiver-transmitter)`
* :abbr:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`

.. figure:: img/nrf52840_gw16126.jpg
:width: 442px
:align: center
:alt: GW16126

GW16126 (Credit: Gateworks Corporation)

More information about the board can be found at the
`Gateworks website`_.

Hardware
********

The Gateworks GW16126 features a u-blox NINA-302 with an nRF52840 with
two external oscillators. The frequency of the slow clock is 32.768 kHz.
The frequency of the main clock is 32 MHz.

Supported Features
==================

The nrf52840_gw16126 board configuration supports the following
hardware features:

+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
+-----------+------------+----------------------+
| ADC | on-chip | adc |
+-----------+------------+----------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154 |
+-----------+------------+----------------------+
| RTC | on-chip | system clock |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| USB | on-chip | usb |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+

Other hardware features are not supported by the Zephyr kernel.
See `Gateworks website`_ for a complete list of GW16126 hardware features.

Connections and IOs
===================

Programming and Debugging
*************************

Applications for the ``nrf52840_gw16126`` board configuration can be
built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details); however, the standard
debugging targets are not currently available.

Flashing
========

Flashing can be performed using OpenOCD software using the sysfsgpio
interface with the ftdi-cbus gpio driver.

Here is an example for the :ref:`hello_world` application.

First, 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 GW16126 third tty
can be found. For example, under Linux, :code:`/dev/ttyUSB2`.

Then build and flash the application in the usual way.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nrf52840_gw16126
:goals: build flash

Debugging
=========

OpenOCD can be used to debug.


References
**********

.. target-notes::

.. _Gateworks website: http://www.gateworks.com
.. _Nordic Semiconductor Infocenter: http://infocenter.nordicsemi.com/

@@ -0,0 +1,90 @@
/*
* Copyright (c) 2018 Gateworks Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>

/ {
model = "Gateworks GW16126";
compatible = "gw,gw16126", "nordic,nrf52840-qiaa",
"nordic,nrf52840";

chosen {
zephyr,console = &uart0;
#ifdef CONFIG_MCUMGR_SMP_UART
zephyr,uart-mcumgr = &uart0;
#endif
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
};

&adc {
status ="ok";
};

&gpiote {
status ="ok";
};

&gpio0 {
status ="ok";
};

&gpio1 {
status ="ok";
};

&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <115200>;
status = "ok";
tx-pin = <45>;
rx-pin = <29>;
rts-pin = <31>;
cts-pin = <44>;
};

&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x000000000 0x0000C000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000C000 0x000069000>;
};
slot1_partition: partition@75000 {
label = "image-1";
reg = <0x00075000 0x000069000>;
};
scratch_partition: partition@de000 {
label = "image-scratch";
reg = <0x000de000 0x0001e000>;
};

#if defined(CONFIG_FS_FLASH_STORAGE_PARTITION)
storage_partition: partition@fc000 {
label = "storage";
reg = <0x000fc000 0x00004000>;
};
#endif
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "ok";
};
@@ -0,0 +1,12 @@
identifier: nrf52840_gw16126
name: nRF52840-GW16126
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
supported:
- adc
- usb_device
- ble
- ieee802154
@@ -0,0 +1,24 @@
CONFIG_ARM=y
CONFIG_SOC_FAMILY_NRF=y
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_NRF52840_GW16126=y

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_NRFX=y
CONFIG_UART_0_NRF_UART=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# additional board options
CONFIG_GPIO_AS_PINRESET=y

# bluetooth
CONFIG_BT=y
CONFIG_BT_CTLR=y
@@ -0,0 +1,5 @@
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "ok";
};

0 comments on commit ba5f00a

Please sign in to comment.
You can’t perform that action at this time.