Skip to content
Permalink
Browse files

boards: holyiot_yj16019: add support for the Holyiot YJ-16019 board

The Holyiot YJ-16019 board is a small, coin cell driven board based on
the Nordic Semiconductors nRF52832. It provides one LED and one push
button.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
  • Loading branch information...
henrikbrixandersen authored and nashif committed Feb 12, 2019
1 parent 2d5fb6d commit 8b1a50b64cd91129d0fbccf1d21138a93325489e
@@ -0,0 +1,5 @@
# Kconfig - Holyiot YJ-16019 board configuration
#
# Copyright (c) 2019 Henrik Brix Andersen <henrik@brixandersen.dk>
#
# SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,9 @@
# Kconfig - Holyiot YJ-16019 board configuration
#
# Copyright (c) 2019 Henrik Brix Andersen <henrik@brixandersen.dk>
#
# SPDX-License-Identifier: Apache-2.0

config BOARD_HOLYIOT_YJ16019
bool "Holyiot YJ-16019"
depends on SOC_NRF52832_QFAA
@@ -0,0 +1,35 @@
# Kconfig - Holyiot YJ-16019 board configuration
#
# Copyright (c) 2019 Henrik Brix Andersen <henrik@brixandersen.dk>
#
# SPDX-License-Identifier: Apache-2.0

if BOARD_HOLYIOT_YJ16019

config BOARD
default "holyiot_yj16019"

config GPIO_AS_PINRESET
default n

config UART_NRFX
default n

if PWM

config PWM_0
default y

endif # PWM

if IEEE802154

config IEEE802154_NRF5
default y

endif # IEEE802154

config BT_CTLR
default BT

endif # BOARD_HOLYIOT_YJ16019
@@ -0,0 +1,4 @@
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
board_runner_args(jlink "--device=nrf52" "--speed=4000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,151 @@
.. _holyiot_yj16019:

Holyiot YJ-16019
################

Overview
********

The `Holyiot`_ YJ-16019 hardware provides support for the Nordic
Semiconductor nRF52832 ARM Cortex-M4 CPU and the following devices:

* CLOCK
* FLASH
* :abbr:`GPIO (General Purpose Input Output)`
* :abbr:`MPU (Memory Protection Unit)`
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
* :abbr:`PWM (Pulse Width Modulation)`
* RADIO (Bluetooth Low Energy and 802.15.4)
* :abbr:`RTC (nRF RTC System Clock)`
* Segger RTT (RTT Console)
* :abbr:`WDT (Watchdog Timer)`

.. figure:: img/holyiot_yj16019_front.jpg
:width: 375px
:align: center
:alt: Holyiot YJ-16019

Holyiot YJ-16019 (Credit: Holyiot)

The board is equipped with one LED, one push button, and is powered by
a CR2032 coin cell. The `Nordic Semiconductor Documentation library`_
contains the processor's information and the datasheet.

Hardware
********

The nRF52832 of the Holyiot YJ-16019 is clocked by an external crystal
with a frequency of 32.768 kHz.

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

The holyiot_yj16019 board configuration supports the following
hardware features:

+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154 |
+-----------+------------+----------------------+
| RTC | on-chip | system clock |
+-----------+------------+----------------------+
| RTT | Segger | console |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+

Other hardware features are not supported by the Zephyr kernel.

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

LED and push button
-------------------

* Push button = P0.28
* LED = P0.29

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

Applications for the ``holyiot_yj16019`` board configuration can be
built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details); however, an external
Segger J-Link is required since the board does not have any on-board
debug IC.

The following pins of the Segger J-Link must be connected to the following test
pads on the PCB (see image):

* VTref = VCC
* GND = GND
* SWDIO = SDO
* SWCLK = SCK

.. figure:: img/holyiot_yj16019_pcb.png
:width: 390px
:align: center
:alt: Holyiot YJ-16019 PCB

Holyiot YJ-16019 PCB (Credit: Holyiot)

Flashing
========

Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).

Here is an example for the :ref:`blinky-sample` application.

.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: holyiot_yj16019
:goals: build flash

Debugging
=========

Refer to the :ref:`nordic_segger` page to learn about debugging Nordic
nRF52x-based boards with a Segger debugger.


Testing the LED and button on the Holyiot YJ-16019
**************************************************

There are 2 samples that allow you to test that the button and LED on
the board are working properly with Zephyr:

.. code-block:: console

samples/basic/blinky
samples/basic/button

You can build and flash the examples to make sure Zephyr is running
correctly on your board. The button and LED definitions can be found
in :zephyr_file:`boards/arm/holyiot_yj16019/holyiot_yj16019.dts`.

References
**********

.. target-notes::

.. _Holyiot: http://www.holyiot.com
.. _Nordic Semiconductor Documentation library: https://www.nordicsemi.com/DocLib

@@ -0,0 +1,95 @@
/*
* Copyright (c) 2019 Henrik Brix Andersen <henrik@brixandersen.dk>
*
* SPDX-License-Identifier: Apache-2.0
*/

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

/ {
model = "Holyiot YJ-16019";
compatible = "holyiot,yj-16019", "nordic,nrf52832-qfaa",
"nordic,nrf52832";

chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 29 GPIO_INT_ACTIVE_HIGH>;
label = "LED";
};
};

buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 28 GPIO_INT_ACTIVE_LOW>;
label = "Push button switch";
};
};

/* These aliases are provided for compatibility with samples */
aliases {
sw0 = &button0;
led0 = &led0;
};
};

&gpiote {
status ="ok";
};

&gpio0 {
status ="ok";
};

&pwm0 {
status = "ok";
ch0-pin = <29>;
};

&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
*/
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 0x000067000>;
};
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x000067000>;
};
scratch_partition: partition@da000 {
label = "image-scratch";
reg = <0x000da000 0x0001e000>;
};

/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/

/* Storage partition will be used by FCB/NFFS/NVS if enabled. */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
@@ -0,0 +1,16 @@
identifier: holyiot_yj16019
name: Holyiot YJ-16019
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- ble
- ieee802154
- pwm
- watchdog
- counter
ram: 64
flash: 512
@@ -0,0 +1,14 @@
CONFIG_ARM=y
CONFIG_SOC_FAMILY_NRF=y
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52832_QFAA=y
CONFIG_BOARD_HOLYIOT_YJ16019=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable RTT
CONFIG_HAS_SEGGER_RTT=y

# Enable GPIO
CONFIG_GPIO=y

0 comments on commit 8b1a50b

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