boards: arm: Add support for the VBLUno52 board
+ The VBLUno52 board nRF52832 ARM Cortex-M4F processor Bluetooth Low Energy 5.0 DAPLink interface UNO pinout 4 power + The following samples were tested: hello_world basic/button basic/blinky bluetooth/peripheral_hr bluetooth/beacon Signed-off-by: Nam Do <robotden@gmail.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
b70633b95f
commit
92dacb2a62
13 changed files with 296 additions and 0 deletions
13
boards/arm/nrf52_vbluno52/Kconfig
Normal file
13
boards/arm/nrf52_vbluno52/Kconfig
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Kconfig - nRF52 VBLUno52 board configuration
|
||||
#
|
||||
# Copyright (c) 2017 VNG IoT Lab
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_NRF52_VBLUNO52
|
||||
|
||||
config GPIO_AS_PINRESET
|
||||
bool "GPIO as pin reset (reset button)"
|
||||
default y
|
||||
|
||||
endif # BOARD_NRF52_VBLUNO52
|
9
boards/arm/nrf52_vbluno52/Kconfig.board
Normal file
9
boards/arm/nrf52_vbluno52/Kconfig.board
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Kconfig - nRF52 VBLUno52 board configuration
|
||||
#
|
||||
# Copyright (c) 2017 VNG IoT Lab
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_NRF52_VBLUNO52
|
||||
bool "nRF52 VBLUno52"
|
||||
depends on SOC_NRF52832_QFAA
|
62
boards/arm/nrf52_vbluno52/Kconfig.defconfig
Normal file
62
boards/arm/nrf52_vbluno52/Kconfig.defconfig
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Kconfig - nRF52 VBLUno52 board configuration
|
||||
#
|
||||
# Copyright (c) 2017 VNG IoT Lab
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_NRF52_VBLUNO52
|
||||
|
||||
config BOARD
|
||||
default nrf52_vbluno52
|
||||
|
||||
if GPIO_NRF5
|
||||
|
||||
config GPIO_NRF5_P0
|
||||
default y
|
||||
|
||||
endif # GPIO_NRF5
|
||||
|
||||
if UART_NRF5
|
||||
|
||||
config UART_NRF5_GPIO_TX_PIN
|
||||
default 6
|
||||
|
||||
config UART_NRF5_GPIO_RX_PIN
|
||||
default 8
|
||||
|
||||
config UART_NRF5_GPIO_RTS_PIN
|
||||
default 5
|
||||
|
||||
config UART_NRF5_GPIO_CTS_PIN
|
||||
default 7
|
||||
|
||||
endif # UART_NRF5
|
||||
|
||||
if I2C
|
||||
|
||||
config I2C_NRF5
|
||||
def_bool y
|
||||
|
||||
config I2C_0
|
||||
default y
|
||||
|
||||
config I2C_0_IRQ_PRI
|
||||
default 1
|
||||
|
||||
endif # I2C
|
||||
|
||||
if I2C_NRF5
|
||||
|
||||
config I2C_NRF5_GPIO_SCL_PIN
|
||||
default 27
|
||||
|
||||
config I2C_NRF5_GPIO_SCA_PIN
|
||||
default 26
|
||||
|
||||
config I2C_0_DEFAULT_CFG
|
||||
# Standard speed, master
|
||||
default 0x11
|
||||
|
||||
endif # I2C_NRF5
|
||||
|
||||
endif # BOARD_NRF52_VBLUNO52
|
2
boards/arm/nrf52_vbluno52/Makefile
Normal file
2
boards/arm/nrf52_vbluno52/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
# No C files (yet)
|
||||
obj- += dummy.o
|
6
boards/arm/nrf52_vbluno52/Makefile.board
Normal file
6
boards/arm/nrf52_vbluno52/Makefile.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
FLASH_SCRIPT = pyocd.sh
|
||||
DEBUG_SCRIPT = pyocd.sh
|
||||
|
||||
PYOCD_TARGET = nrf52
|
||||
|
||||
export FLASH_SCRIPT DEBUG_SCRIPT PYOCD_TARGET
|
25
boards/arm/nrf52_vbluno52/board.h
Normal file
25
boards/arm/nrf52_vbluno52/board.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 VNG IoT Lab Limited.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __INC_BOARD_H
|
||||
#define __INC_BOARD_H
|
||||
|
||||
#include <soc.h>
|
||||
|
||||
/* Button*/
|
||||
#define BUT_GPIO_PIN 17
|
||||
#define BUT_GPIO_NAME CONFIG_GPIO_NRF5_P0_DEV_NAME
|
||||
#define SW0_GPIO_PIN BUT_GPIO_PIN
|
||||
#define SW0_GPIO_NAME BUT_GPIO_NAME
|
||||
|
||||
/* Onboard GREEN LED 0 */
|
||||
#define LED0_GPIO_PIN 12
|
||||
#define LED0_GPIO_PORT CONFIG_GPIO_NRF5_P0_DEV_NAME
|
||||
|
||||
#define LED_GPIO_PIN LED0_GPIO_PIN
|
||||
#define LED_GPIO_PORT LED0_GPIO_PORT
|
||||
|
||||
#endif /* __INC_BOARD_H */
|
BIN
boards/arm/nrf52_vbluno52/doc/img/nrf52_vbluno52_pinout.png
Normal file
BIN
boards/arm/nrf52_vbluno52/doc/img/nrf52_vbluno52_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 KiB |
118
boards/arm/nrf52_vbluno52/doc/nrf52_vbluno52.rst
Normal file
118
boards/arm/nrf52_vbluno52/doc/nrf52_vbluno52.rst
Normal file
|
@ -0,0 +1,118 @@
|
|||
.. _nrf52_vbluno52:
|
||||
|
||||
nRF52-VBLUno52
|
||||
##############
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Zephyr can use the nrf52_vbluno52 board configuration to run on the VBLUno52 board,
|
||||
a VNG Bluetooth Low Energy UNO using an nRF52832 ARM Cortex-M4F processor.
|
||||
It provides support for the Nordic Semiconductor nRF52832 ARM Cortex-M4F CPU and
|
||||
the following devices:
|
||||
|
||||
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
|
||||
* :abbr:`RTC (nRF RTC System Clock)`
|
||||
* UART
|
||||
* GPIO
|
||||
* FLASH
|
||||
* RADIO (Bluetooth Low Energy)
|
||||
* Segger RTT (RTT Console)
|
||||
|
||||
.. figure:: img/nrf52_vbluno52_pinout.png
|
||||
:align: center
|
||||
:alt: nRF52 VBLUno52
|
||||
|
||||
nRF52_VBLUno52 board
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
The VBLUno52 board has two external oscillators. The frequency of
|
||||
the slow clock is 32.768 kHz. The frequency of the main clock
|
||||
is 64 MHz.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The nrf52_vbluno52 board configuration supports the following
|
||||
hardware features:
|
||||
|
||||
+-----------+------------+----------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+======================+
|
||||
| NVIC | on-chip | nested vectored |
|
||||
| | | interrupt controller |
|
||||
+-----------+------------+----------------------+
|
||||
| RTC | on-chip | system clock |
|
||||
+-----------+------------+----------------------+
|
||||
| UART | on-chip | serial port |
|
||||
+-----------+------------+----------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+----------------------+
|
||||
| FLASH | on-chip | flash |
|
||||
+-----------+------------+----------------------+
|
||||
| RADIO | on-chip | Bluetooth |
|
||||
+-----------+------------+----------------------+
|
||||
| RTT | on-chip | console |
|
||||
+-----------+------------+----------------------+
|
||||
| I2C | on-chip | i2c |
|
||||
+-----------+------------+----------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+-----------+------------+----------------------+
|
||||
|
||||
Other hardware features are not supported by the Zephyr kernel.
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
LED
|
||||
---
|
||||
|
||||
* LED = LED0 (green) = P0.12
|
||||
|
||||
Push buttons
|
||||
------------
|
||||
|
||||
* BUTTON = BUT = SW0 = P0.17
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
The VBLUno52 board has an on-board DAPLink (CMSIS-DAP) interface for flashing and debugging.
|
||||
You do not need any other programming device.
|
||||
You only need to install the pyOCD tool (https://pypi.python.org/pypi/pyOCD)
|
||||
|
||||
This tutorial uses the blinky application :ref:`blinky-sample`
|
||||
|
||||
See the :ref:`getting_started` for general information on setting up
|
||||
your development environment.
|
||||
|
||||
#. To build the Zephyr kernel along with the blinky sample app, enter:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd $ZEPHYR_BASE/samples/basic/blinky
|
||||
$ make BOARD=nrf52_vbluno52
|
||||
|
||||
#. To build and flash the generated binary image to the board, enter:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ make BOARD=nrf52_vbluno52 flash
|
||||
|
||||
Testing the VBLUno52 with Zephyr: buttons, LEDs, UART, BLE
|
||||
**********************************************************
|
||||
|
||||
Here are some sample applications that you can use to test different
|
||||
components on the VBLUno52 board:
|
||||
|
||||
* :ref:`hello_world`
|
||||
* :ref:`blinky-sample`
|
||||
* :ref:`button-sample`
|
||||
* :ref:`bluetooth-beacon-sample`
|
||||
* :ref:`peripheral_hr`
|
||||
|
7
boards/arm/nrf52_vbluno52/nrf52_vbluno52.yaml
Normal file
7
boards/arm/nrf52_vbluno52/nrf52_vbluno52.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
identifier: nrf52_vbluno52
|
||||
name: nRF52-VBLUno52
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gccarmemb
|
23
boards/arm/nrf52_vbluno52/nrf52_vbluno52_defconfig
Normal file
23
boards/arm/nrf52_vbluno52/nrf52_vbluno52_defconfig
Normal file
|
@ -0,0 +1,23 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_SOC_FAMILY_NRF5=y
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52832_QFAA=y
|
||||
CONFIG_BOARD_NRF52_VBLUNO52=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU_NRF52X=y
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_NRF5=y
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# additional board options
|
||||
CONFIG_GPIO_AS_PINRESET=y
|
||||
|
||||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
|
@ -28,6 +28,7 @@ dtb-$(CONFIG_BOARD_STM32F4_DISCO) = stm32f4_disco.dts_compiled
|
|||
dtb-$(CONFIG_BOARD_STM32F469I_DISCO) = stm32f469i_disco.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_96B_NITROGEN) = 96b_nitrogen.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF52_PCA10040) = nrf52_pca10040.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF52_VBLUNO52) = nrf52_vbluno52.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF52_BLENANO2) = nrf52_blenano2.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF52840_PCA10056) = nrf52840_pca10056.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_ARDUINO_101_BLE) = arduino_101_ble.dts_compiled
|
||||
|
|
26
dts/arm/nrf52_vbluno52.dts
Normal file
26
dts/arm/nrf52_vbluno52.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2017 VNG IoT Lab Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52832.dtsi>
|
||||
|
||||
/ {
|
||||
model = "VNG VBLUno52 BLE 5.0 board";
|
||||
compatible = "vng,vbluno52", "nordic,nrf52832-qfaa",
|
||||
"nordic,nrf52832";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "ok";
|
||||
compatible = "nordic,nrf-uart";
|
||||
current-speed = <115200>;
|
||||
};
|
4
dts/arm/nrf52_vbluno52.fixup
Normal file
4
dts/arm/nrf52_vbluno52.fixup
Normal file
|
@ -0,0 +1,4 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
|
||||
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
|
Loading…
Add table
Add a link
Reference in a new issue