boards: arm: Add support for the VBLUno51 board
+ VBLUno51 board nRF51822 Bluetooth Low Energy DAPLink interface UNO pinout 4 power + Wiki: https://vngiotlab.github.io/vbluno/ + 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> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
4668ecbbd2
commit
7fb2d94f9f
15 changed files with 300 additions and 0 deletions
9
boards/arm/nrf51_vbluno51/Kconfig.board
Normal file
9
boards/arm/nrf51_vbluno51/Kconfig.board
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Kconfig - nRF51-VBLUNO51 board configuration
|
||||
#
|
||||
# Copyright (c) 2017 VNG IoT Lab Limited.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_NRF51_VBLUNO51
|
||||
bool "nRF51 VBLUno51 BLE"
|
||||
depends on SOC_NRF51822_QFAC
|
62
boards/arm/nrf51_vbluno51/Kconfig.defconfig
Normal file
62
boards/arm/nrf51_vbluno51/Kconfig.defconfig
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Kconfig - nRF51 VBLUno51 board configuration
|
||||
#
|
||||
# Copyright (c) 2017 VNG IoT Lab Limited.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_NRF51_VBLUNO51
|
||||
|
||||
config BOARD
|
||||
default nrf51_vbluno51
|
||||
|
||||
if GPIO_NRF5
|
||||
|
||||
config GPIO_NRF5_P0
|
||||
default y
|
||||
|
||||
endif # GPIO_NRF5
|
||||
|
||||
if UART_NRF5
|
||||
|
||||
config UART_NRF5_GPIO_TX_PIN
|
||||
default 10
|
||||
|
||||
config UART_NRF5_GPIO_RX_PIN
|
||||
default 11
|
||||
|
||||
config UART_NRF5_GPIO_RTS_PIN
|
||||
default 12
|
||||
|
||||
config UART_NRF5_GPIO_CTS_PIN
|
||||
default 13
|
||||
|
||||
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 30
|
||||
|
||||
config I2C_NRF5_GPIO_SCA_PIN
|
||||
default 29
|
||||
|
||||
config I2C_0_DEFAULT_CFG
|
||||
# Standard speed, master
|
||||
default 0x11
|
||||
|
||||
endif # I2C_NRF5
|
||||
|
||||
endif # BOARD_NRF51_VBLUNO51
|
2
boards/arm/nrf51_vbluno51/Makefile
Normal file
2
boards/arm/nrf51_vbluno51/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
|||
# No C files (yet)
|
||||
obj- += dummy.o
|
6
boards/arm/nrf51_vbluno51/Makefile.board
Normal file
6
boards/arm/nrf51_vbluno51/Makefile.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
FLASH_SCRIPT = pyocd.sh
|
||||
DEBUG_SCRIPT = pyocd.sh
|
||||
|
||||
PYOCD_TARGET = nrf51
|
||||
|
||||
export FLASH_SCRIPT DEBUG_SCRIPT PYOCD_TARGET
|
25
boards/arm/nrf51_vbluno51/board.h
Normal file
25
boards/arm/nrf51_vbluno51/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 15
|
||||
#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 7
|
||||
#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/nrf51_vbluno51/doc/img/nrf51_vbluno51.jpg
Normal file
BIN
boards/arm/nrf51_vbluno51/doc/img/nrf51_vbluno51.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
BIN
boards/arm/nrf51_vbluno51/doc/img/nrf51_vbluno51_bot.jpg
Normal file
BIN
boards/arm/nrf51_vbluno51/doc/img/nrf51_vbluno51_bot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
BIN
boards/arm/nrf51_vbluno51/doc/img/vbluno51_frizting.png
Normal file
BIN
boards/arm/nrf51_vbluno51/doc/img/vbluno51_frizting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
boards/arm/nrf51_vbluno51/doc/img/vbluno51_nordic_pinout.png
Normal file
BIN
boards/arm/nrf51_vbluno51/doc/img/vbluno51_nordic_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
141
boards/arm/nrf51_vbluno51/doc/nrf51_vbluno51.rst
Normal file
141
boards/arm/nrf51_vbluno51/doc/nrf51_vbluno51.rst
Normal file
|
@ -0,0 +1,141 @@
|
|||
.. _nrf51_vbluno51:
|
||||
|
||||
nRF51-VBLUno51
|
||||
##############
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Zephyr uses the nrf51_vbluno51 board configuration to run on the VBLUno51 board,
|
||||
a VNG Bluetooth Low Energy UNO using an nRF51822 ARM processor.
|
||||
|
||||
.. figure:: img/nrf51_vbluno51.jpg
|
||||
:align: center
|
||||
:alt: nRF51_VBLUno51
|
||||
|
||||
nrf51_vbluno51 Top
|
||||
|
||||
.. figure:: img/nrf51_vbluno51_bot.jpg
|
||||
:align: center
|
||||
:alt: nRF51_VBLUno51 Bottom
|
||||
|
||||
nrf51_vbluno51 Bottom
|
||||
|
||||
More information about the board can be found at the
|
||||
`VBLUno51 wiki page`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
VBLUno51 board has two external oscillators. The frequency of
|
||||
the slow clock is 32.768 kHz. The frequency of the main clock
|
||||
is 16 MHz.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
- CPU:
|
||||
+ Nordic nRF51822: ARM® Cortex™ M0 32bit.
|
||||
+ *Bluetooth Low Energy interface.*
|
||||
+ 256KB Flash, 32KB Ram.
|
||||
+ UART(1), I2C(2), SPI(1), PWM(3), SWD, Timer 16bit(3).
|
||||
+ 21 digital channels, 6 ADC 10bit channels.
|
||||
+ 1 Led and 1 Button onboard.
|
||||
+ GPIO Voltage: 0 – 3.3V.
|
||||
- DAPLink (CMSIS-DAP) interface for program and debug:
|
||||
+ USB MSD: Drag and Drop programming flash memory.
|
||||
+ USB HID (DAP): CMSIS-DAP compliant debug channel.
|
||||
+ USB CDC: Virtual COM port for log, trace and terminal emulation.
|
||||
|
||||
- Supports hardware flow control features (RTS/CTS).
|
||||
- *Energy monitoring for BLE module by current measurement (Only VBLUno51_EM)*
|
||||
- FOTA (Firmware over the air): Upgrade firmware over BLE interface.
|
||||
- Build good applications with:
|
||||
+ Compiler and IDE: GCC, Keil MDK, IAR, Eclipse, Qt Creator.
|
||||
+ Frameworks: Arduino, ARM mbed-OS, Zephyr-OS, Nordic SDK, RIOT-OS, MyNewt-OS, ChibiOS, NuttX RTOS
|
||||
+ A lot of tutorials for Arduino, mbed-os and more.
|
||||
- Pinout: Arduino Uno Rev3 compliant.
|
||||
- Power:
|
||||
+ USB port.
|
||||
+ Power adapter: +9 -> +12V.
|
||||
+ 3V Battery: CR20xx holder
|
||||
+ Recharageable battery jump: +3.7 -> +12V
|
||||
- Open source: Hardware design, firmware, packages, tutorial and example codes
|
||||
|
||||
See `VBLUno51 wiki page`_ for full documents and tutorials about the VBLUno51 board.
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
LED
|
||||
---
|
||||
|
||||
* LED = LED0 (green) = P0.7
|
||||
|
||||
Push buttons
|
||||
------------
|
||||
|
||||
* BUTTON = BUT = SW0 = P0.15
|
||||
|
||||
More details
|
||||
------------
|
||||
|
||||
.. figure:: img/vbluno51_nordic_pinout.png
|
||||
:align: center
|
||||
:alt: nRF51_VBLUno51 Pinout
|
||||
|
||||
nrf51_vbluno51 Pinout
|
||||
|
||||
.. figure:: img/vbluno51_frizting.png
|
||||
:align: center
|
||||
:alt: nRF51_VBLUno51 Fritzing part
|
||||
|
||||
nrf51_vbluno51 Fritzing part
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
The VBLUno51 board has on-board DAPLink (CMSIS-DAP) interface for flashing and debugging.
|
||||
You do not need any other programming device.
|
||||
You only need to install 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=nrf51_vbluno51
|
||||
|
||||
#. To build and flash the generated binary image to the board, enter:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ make BOARD=nrf51_vbluno51 flash
|
||||
|
||||
Testing the VBLUno51 with Zephyr: buttons, LEDs, UART, BLE
|
||||
**********************************************************
|
||||
|
||||
Here are some sample applications that you can use to test different
|
||||
components on the VBLUno51 board:
|
||||
|
||||
* :ref:`hello_world`
|
||||
* :ref:`blinky-sample`
|
||||
* :ref:`button-sample`
|
||||
* :ref:`bluetooth-beacon-sample`
|
||||
* :ref:`peripheral_hr`
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _VBLUno51 website: http://iotviet.com.vn/store/detail?id=2
|
||||
.. _VBLUno51 wiki page: https://vngiotlab.github.io/vbluno/
|
8
boards/arm/nrf51_vbluno51/nrf51_vbluno51.yaml
Normal file
8
boards/arm/nrf51_vbluno51/nrf51_vbluno51.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
identifier: nrf51_vbluno51
|
||||
name: nRF51-VBLUno51
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gccarmemb
|
||||
ram: 32
|
17
boards/arm/nrf51_vbluno51/nrf51_vbluno51_defconfig
Normal file
17
boards/arm/nrf51_vbluno51/nrf51_vbluno51_defconfig
Normal file
|
@ -0,0 +1,17 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_SOC_FAMILY_NRF5=y
|
||||
CONFIG_SOC_SERIES_NRF51X=y
|
||||
CONFIG_SOC_NRF51822_QFAC=y
|
||||
CONFIG_BOARD_NRF51_VBLUNO51=y
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_NRF5=y
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
|
@ -35,6 +35,7 @@ dtb-$(CONFIG_BOARD_BBC_MICROBIT) = bbc_microbit.dts_compiled
|
|||
dtb-$(CONFIG_BOARD_CURIE_BLE) = curie_ble.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF51_BLENANO) = nrf51_blenano.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF51_PCA10028) = nrf51_pca10028.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF51_VBLUNO51) = nrf51_vbluno51.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_QUARK_SE_C1000_BLE) = quark_se_c1000_ble.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_QEMU_CORTEX_M3) = qemu_cortex_m3.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_SAM_E70_XPLAINED) = sam_e70_xplained.dts_compiled
|
||||
|
|
25
dts/arm/nrf51_vbluno51.dts
Normal file
25
dts/arm/nrf51_vbluno51.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 VNG IoT Lab Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "VNG VBLUno51 BLE board";
|
||||
compatible = "vng,vbluno51", "nordic,nrf51822-qfac",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <115200>;
|
||||
status = "ok";
|
||||
};
|
4
dts/arm/nrf51_vbluno51.fixup
Normal file
4
dts/arm/nrf51_vbluno51.fixup
Normal file
|
@ -0,0 +1,4 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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