1.. _nrf51_vbluno51:
2
3nRF51-VBLUno51
4##############
5
6Overview
7********
8
9Zephyr uses the nrf51_vbluno51 board configuration to run on the VBLUno51 board,
10a VNG Bluetooth Low Energy UNO using an nRF51822 ARM processor.
11
12.. figure:: img/nrf51_vbluno51.jpg
13     :align: center
14     :alt: nRF51_VBLUno51
15
16     nrf51_vbluno51 Top
17
18.. figure:: img/nrf51_vbluno51_bot.jpg
19     :align: center
20     :alt: nRF51_VBLUno51 Bottom
21
22     nrf51_vbluno51 Bottom
23
24More information about the board can be found at the
25`VBLUno51 wiki page`_.
26
27Hardware
28********
29
30VBLUno51 board has two external oscillators. The frequency of
31the slow clock is 32.768 kHz. The frequency of the main clock
32is 16 MHz.
33
34Supported Features
35==================
36
37- CPU:
38	+ Nordic nRF51822: ARM |reg| Cortex |trade| M0 32bit.
39	+ *Bluetooth Low Energy interface.*
40	+ 256KB Flash, 32KB RAM.
41	+ UART(1), I2C(2), SPI(1), PWM(3), SWD, Timer 16bit(3).
42	+ 21 digital channels, 6 ADC 10bit channels.
43	+ 1 Led and 1 Button onboard.
44	+ GPIO Voltage: 0 - 3.3V.
45- DAPLink (CMSIS-DAP) interface for program and debug:
46	+ USB MSD: Drag and Drop programming flash memory.
47	+ USB HID (DAP): CMSIS-DAP compliant debug channel.
48	+ USB CDC: Virtual COM port for log, trace and terminal emulation.
49
50- Supports hardware flow control features (RTS/CTS).
51- *Energy monitoring for BLE module by current measurement (Only VBLUno51_EM)*
52- FOTA (Firmware over the air): Upgrade firmware over BLE interface.
53- Build good applications with:
54	+ Compiler and IDE: GCC, Keil MDK, IAR, Eclipse, Qt Creator.
55	+ Frameworks: Arduino, ARM mbed-OS, Zephyr-OS, Nordic SDK, RIOT-OS, MyNewt-OS, ChibiOS, NuttX RTOS
56	+ A lot of tutorials for Arduino, mbed-os and more.
57- Pinout: Arduino Uno Rev3 compliant.
58- Power:
59	+ USB port.
60	+ Power adapter: +9 -> +12V.
61	+ 3V Battery: CR20xx holder
62	+ Rechargeable battery jump: +3.7 -> +12V
63- Open source: Hardware design, firmware, packages, tutorial and example codes
64
65See `VBLUno51 wiki page`_ for full documents and tutorials about the VBLUno51 board.
66
67Connections and IOs
68===================
69
70LED
71---
72
73* LED = LED0 (green) = P0.7
74
75Push buttons
76------------
77
78* BUTTON = BUT = SW0 = P0.15
79
80More details
81------------
82
83.. figure:: img/vbluno51_nordic_pinout.jpg
84     :align: center
85     :alt: nRF51_VBLUno51 Pinout
86
87     nrf51_vbluno51 Pinout
88
89.. figure:: img/vbluno51_frizting.jpg
90     :align: center
91     :alt: nRF51_VBLUno51 Fritzing part
92
93     nrf51_vbluno51 Fritzing part
94
95Programming and Debugging
96*************************
97
98Applications for the ``nrf51_vbluno51`` board configuration can be
99built and flashed in the usual way (see :ref:`build_an_application`
100and :ref:`application_run` for more details).
101
102Flashing
103========
104
105The VBLUno51 board has on-board DAPLink (CMSIS-DAP) interface for flashing and debugging.
106You do not need any other programming device.
107You only need to install pyOCD tool (https://pypi.python.org/pypi/pyOCD)
108
109This tutorial uses the blinky application :zephyr:code-sample:`blinky`.
110
111See the :ref:`getting_started` for general information on setting up
112your development environment. Then build and flash the application in
113the usual way.
114
115.. zephyr-app-commands::
116   :zephyr-app: samples/basic/blinky
117   :board: nrf51_vbluno51
118   :goals: build flash
119
120Debugging
121=========
122
123You can debug an application in the usual way.  Here is an example for the
124:zephyr:code-sample:`blinky` application.
125
126.. zephyr-app-commands::
127   :zephyr-app: samples/basic/blinky
128   :board: nrf51_vbluno51
129   :maybe-skip-config:
130   :goals: debug
131
132Testing the VBLUno51 with Zephyr: buttons, LEDs, UART, BLE
133**********************************************************
134
135 Here are some sample applications that you can use to test different
136 components on the VBLUno51 board:
137
138 * :ref:`hello_world`
139 * :zephyr:code-sample:`blinky`
140 * :zephyr:code-sample:`button`
141 * :ref:`bluetooth-beacon-sample`
142 * :ref:`peripheral_hr`
143
144References
145**********
146
147.. target-notes::
148
149.. _VBLUno51 website: http://iotviet.com.vn/store/detail?id=2
150.. _VBLUno51 wiki page: https://vngiotlab.github.io/vbluno/
151