NanoPi NEO Core2

From FriendlyARM WiKi
Jump to: navigation, search



  • The NanoPi NEO Core2 as its name tells is an alternative NanoPi NEO2 that works like a CPU board with male pin-headers. It has the same form facotor as the NanoPi NEO2, same pin descriptions and works with all the OS images the NanoPi NEO2 supports. The connectors and ports on the NEO2 are populated to pin-headers on the NEO2 Core. In addition the NEO Core2 can have an optional onboard eMMC flash and ESD protection for connectors and ports. There features are highly preferred by industrial customers.
  • The NEO2 Core uses a popular Allwinner H5 SoC and has onboard 1G DDR3 RAM. FriendlyElec offers models with three eMMC options: 8GB(default)/16GB/32GB. FriendlyElec migrated UbuntuCore with mainline kernel 4.11 for it. It works with other OS such as Armbian as well. Compared to the NanoPi NEO2 the NanoPi NEO Core2 runs more reliably with much less overheat. It is a good platform for IoT applications, mornitoring systems, smart control systems, cluster computing and AI applications.
  • FriendlyElec develops a Mini Shield for NanoPi NEO Core/Core2 which has the same form factor as the RPi 3. When a NanoPi NEO Core2 is connected to this Mini Shield the whole assembled module can be well fit into a common RPi 3's case.

Hardware Spec

  • CPU: Allwinner H5, Quad-core 64-bit high-performance Cortex A53
  • DDR3 RAM: 512MB/1GB
  • Storage: 8GB/16GB/32GB eMMC
  • Connectivity: 10/100/1000M Ethernet utilizing RTL8211E-VB-CG
  • USB Host x 3(included in 2.54mm pitch pin header)
  • MicroSD Slot x 1
  • LED: x 2, one for power status and the other for system status
  • GPIO1: 2.54mm pitch 12 x 2 pin header containing UART, SPI, I2C, GPIO and etc
  • GPIO2: 2.54mm pitch 24 pin header containing SPI, IR, I2S, USB, serial debug port, audio and etc
  • GPIO3: 2.54mm pitch 20 pin header containing USB, Gbps Ethernet, I2C and etc
  • PCB Size: 40 x 40mm
  • MicroUSB: OTG and power input
  • OS/Software: u-boot,Ubuntu Core
  • Weight: xxg(Without Pin-headers)

Diagram, Layout and Dimension


NanoPi NEO Core2 Layout
  • GPIO1 Pin Description
Pin# Name Linux gpio Pin# Name Linux gpio
1 SYS_3.3V 2 VDD_5V
3 I2C0_SDA / GPIOA12 12 4 VDD_5V
5 I2C0_SCL / GPIOA11 11 6 GND
7 GPIOG11 203 8 UART1_TX / GPIOG6 198
9 GND 10 UART1_RX / GPIOG7 199
11 UART2_TX / GPIOA0 0 12 GPIOA6 6
13 UART2_RTS / GPIOA2 2 14 GND
15 UART2_CTS / GPIOA3 3 16 UART1_RTS / GPIOG8 200
17 SYS_3.3V 18 UART1_CTS / GPIOG9 201
19 SPI0_MOSI / GPIOC0 64 20 GND
21 SPI0_MISO / GPIOC1 65 22 UART2_RX / GPIOA1 1
23 SPI0_CLK / GPIOC2 66 24 SPI0_CS / GPIOC3 67
  • GPIO2 Pin Description
Pin# Name Description Pin# Name Description
5 USB-DM1 USB1 DM Signal 6 CLK1 SPI1-CLK
7 USB-DP2 USB2 DP Signal 8 CS1 SPI1-CS
9 USB-DM2 USB2 DM Signal 10 MP Microphone Positive Input
11 GPIOL11 / IR-RX GPIOL11 or IR Receive 12 MN Microphone Negative Input
13 SPDIF-OUT / GPIOA17 GPIOA17 or SPDIF-OUT 14 LR LINE-OUT Right Channel Output
15 PCM0_SYNC / I2S0_LRCK/I2C1_SCL I2S/PCM Sample Rate Clock/Sync 16 LL LINE-OUT Left Channel Output
17 PCM0_CLK / I2S0_BCK/I2C1_SDA I2S/PCM Sample Rate Clock 18 RXD UART_RXD0/GPIOA5/PWM0
19 PCM0_DOUT / I2S0_SDOUT I2S/PCM Serial Bata Output 20 TXD UART_TXD0/GPIOA4
21 PCM0_DIN / I2S0_SDIN I2S/PCM Serial Data Input 22 VDD_5V
23 GND 0V 24 GND 0V
  • GPIO3 Pin Description
Pin# Name Description Pin# Name Description
1 LINK-LED Ethernet Link LED 2 SPEED-LED Ethernet Speed LED
3 TRD1+ Ethernet TRD1+ Signal 4 TRD1- Ethernet TRD1- Signal
5 TRD2+ Ethernet TRD2+ Signal 6 TRD2- Ethernet TRD2- Signal
7 TRD3+ Ethernet TRD3+ Signal 8 TRD3- Ethernet TRD3- Signal
9 TRD4+ Ethernet TRD4+ Signal 10 TRD4- Ethernet TRD4- Signal
11 GND 0V 12 GND 0V
13 USB-DP3 USB3 DP Signal 14 GPIOA7 GPIOA7
15 USB-DM3 USB3 DM Signal 16 I2C2-SDA I2C2_SDA/GPIOE13
17 VDD_5V 5V Power Out 18 I2C2-SCL I2C2_SCL/GPIOE12
19 VDD_5V 5V Power Out 20 VDD_3.3V 3.3V Power Outt
  1. SYS_3.3V: 3.3V power output
  2. VVDD_5V: 5V power input/output. When the external device’s power is greater than the MicroUSB's the external device is charging the board otherwise the board powers the external device. The input range is 4.7V ~ 5.6V
  3. All pins are 3.3V, output current is 5mA
  4. For more details refer to its schematic: NanoPi NEO Core2-1707-Schematic.pdf

Dimensional Diagram


For more details refer to the document:pcb in dxf format

Get Started

Essentials You Need

Before starting to use your NanoPi NEO Core2 get the following items ready

  • NanoPi NEO Core2
  • microSD Card/TF Card: Class 10 or Above, minimum 8GB SDHC
  • microUSB power. A 5V/2A power is a must
  • A Host computer running Ubuntu 16.04 64 bit system

TF Cards We Tested

To make your NanoPi NEO Core2 boot and run fast we highly recommend you use a Class10 8GB SDHC TF card or a better one. The following cards are what we used in all our test cases presented here:

  • SanDisk TF 8G Class10 Micro/SD TF card:

SanDisk MicroSD 8G

  • SanDisk TF128G MicroSDXC TF 128G Class10 48MB/S:

SanDisk MicroSD 128G

  • 川宇 8G C10 High Speed class10 micro SD card:

chuanyu MicroSD 8G

Install OS

Get Image Files

Visit this link download link to download image files and the flashing utility:

Image Files: FriendlyCore (base on UbuntuCore) Image File, Kernel: Linux-4.x.y eflasher Image File, Kernel: Linux-4.x.y
Flash Utility:
win32diskimager.rar Windows utility for flashing Debian image. Under Linux users can use "dd"


Boot from TF
  • FriendlyCore / Debian / Ubuntu are all based on a same Linux distribution and their installation methods are the same.
  • Extract the Linux image and win32diskimager.rar files. Insert a TF card(at least 8G) into a Windows PC and run the win32diskimager utility as administrator. On the utility's main window select your TF card's drive, the wanted image file and click on "write" to start flashing the TF card.
  • Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the green LED is on and the blue LED is blinking this indicates your board has successfully booted.
Boot from eMMC
  • Extract the eflasher Image and win32diskimager.rar files. Insert a TF card(at least 4G) into a Windows PC and run the win32diskimager utility as administrator. On the utility's main window select your TF card's drive, the wanted image file and click on "write" to start flashing the TF card.
  • Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the green LED is on and the blue LED is blinking this indicates your board has successfully booted.
  • Connect the board to an HDMI monitor or an LCD and a USB mouse, and select an OS to start installation.

If no monitor is connected you can select an OS by running the following command:

$ su root
$ eflasher

The password for "root" is "fa".Type a number and enter to select an OS, then type "yes" and enter to start installation:
After installation is done shutdown the system, take out the TF card, power on your board again and it will boot from eMMC.

Mini Shield for NanoPi NEO Core/Core2

Here is a setup where we connect a NanoPi NEO Core to a Mini Shield for NanoPi NEO Core/Core2. Here is an introduction to Mini Shield for NanoPi NEO Core/Core2 Mini Shield
: Mini Shield for NanoPi NEO Core/Core2 和 Core2

Work with FriendlyCore


FriendlyCore is a light Linux system without X-windows, based on ubuntu core, It uses the Qt-Embedded's GUI and is popular in industrial and enterprise applications.

Besides the regular Ubuntu core's features our FriendlyCore has the following additional features:

  • it supports our LCDs with both capacitive touch and resistive touch(S700, X710, HD702, S430, HD101 and S70)
  • it supports WiFi
  • it supports Ethernet
  • it supports Bluetooth and has been installed with bluez utilities
  • it supports audio playing
  • it supports Qt5.9 EGLES and OpenGL ES1.1/2.0 (Only for S5P4418/S5P6818)

FriendlyCore's User Accounts

  • If your board is connected to an HDMI monitor you need to use a USB mouse and keyboard.
  • If you want to do kernel development you need to use a serial communication board, ie a PSU-ONECOM board, which will allow you to operate the board via a serial terminal.Here is a setup where we connect a board to a PC via the PSU-ONECOM and you can power on your board from either the PSU-ONECOM or its MicroUSB:

For example, NanoPi-M1:
You can use a USB to Serial conversion board too.
Make sure you use a 5V/2A power to power your board from its MicroUSB port:
For example, NanoPi-M1:

  • FriendlyCore User Accounts:

Non-root User:

   User Name: pi
   Password: pi


   User Name: root
   Password: fa

The system is automatically logged in as "pi". You can do "sudo npi-config" to disable auto login.

  • Update packages
$ sudo apt-get update

Configure System with npi-config

The npi-config is a commandline utility which can be used to initialize system configurations such as user password, system language, time zone, Hostname, SSH switch , Auto login and etc. Type the following command to run this utility.

$ sudo npi-config

Here is how npi-config's GUI looks like:

Extend TF Card's Section

When FriendlyCore is loaded the TF card's section will be automatically extended.You can check the section's size by running the following command:

$ df -h


You can use the NetworkManager utility in FriendlyCore to manage its network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:

  • Check device list
sudo nmcli dev

Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make it accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.

  • Start WiFi
sudo nmcli r wifi on
  • Scan Surrounding WiFi Sources
sudo nmcli dev wifi
  • Connect to a WiFi Source
sudo nmcli dev wifi connect "SSID" password "PASSWORD"

The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface
If a connection succeeds it will be automatically setup on next system reboot.

For more details about NetworkManager refer to this link: Use NetworkManager to configure network settings

  • Use USB WiFi

Our OS system has support for popular USB WiFi drivers. Many USB WiFi modules are plug and play with our system. Here is a list of models we tested;

Number Model
1 RTL8188CUS 802.11n WLAN Adapter
2 RT2070 Wireless Adapter
3 RT2870/RT3070 Wireless Adapter
4 RTL8192CU Wireless Adapter
5 mi WiFi mt7601

Ethernet Connection

If a board is connected to a network via Ethernet before it is powered on it will automatically obtain an IP with DHCP activated after it is powered up. If you want to set up a static IP refer to: Use NetworkManager to configure network settings


If your board has an onboard bluetooth module you can search for surrounding bluetooth devices by running the following command:

hcitool scan

You can run "hciconfig" to check bluetooth's status.

Playing Audio

You can play an audio file by running the following command:

aplay -t raw -c 2 -f S16_LE -r 44100 /root/test.pcm

HDMI Audio Output

Our system's default audio output is the 3.5mm audio jack. You can turn on the HDMI audio by editing the /etc/asound.conf file:

pcm.!default {
    type hw
    card 1
    device 0
ctl.!default {
    type hw
    card 1

card 0 points to the 3.5mm audio jack and card 1 points to the HDMI audio. You need to save your changes and reboot your system to make your changes take effect.

Connect to USB Camera(FA-CAM202)

The FA-CAM202 is a 200M USB camera.
Refer to this link for more details on how to connect to a FA-CAM202: Connect NanoPi M1 to DVP Camera CAM500B

Develop Qt Application

Please refer to: How to build Qt application

Setup Program to AutoRun

You can setup a program to autorun on system boot with npi-config:

sudo npi-config

Go to Boot Options -> Autologin -> Qt/Embedded, select Enable and reboot.

Run Qt Demo

Run the following command

$ sudo /opt/QtE-Demo/

Here is what you expect to observe. This is an open source Qt Demo:

Play & Record Audio

Core2's audio interface is populated to a 2.54mm pitch pin-header. Here is the pin description:

Pin# Name Description
1 MICIN1P Microphone Positive Input
2 MICIN1N Microphone Negative Input
3 LINEOUTR LINE-OUT Right Channel Output
4 LINEOUTL LINE-OUT Left Channel Output

Here is a hardware setup for connecting an audio device to a NanoPi NEO Core2:
Make sure an audio device is connected to your NEO Core2 and you can play and record audio by running the following commands.
List audio device:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Both Allwinner H5 and H3 have a codec device which is recognized in the kernel as [H3 Audio Codec].

Play audio:

$ aplay /root/Music/test.wav -D plughw:0

Record audio:

$ arecord -f cd -d 5 test.wav

Make Your Own FriendlyCore

Use Mainline BSP

The NanoPi NEO Core2 works with a 64-bit Linux kernel and 64-bit UbuntuCore 16.04. For more details about how to use mainline u-boot and Linux-4.x.y refer to :Mainline U-boot & Linux

Use Allwinner's BSP


Visit this link download link and enter the "sources/nanopi-h5-bsp" directory and download all the source code.Use the 7-zip utility to extract it and a lihee directory and an Android directory will be generated.You can check that by running the following command:

$ ls ./
android lichee

Or you can get it from our github:

$ git clone lichee

Note: "lichee" is the project name named by Allwinner for its CPU's source code which contains the source code of U-boot, Linux kernel and various scripts.

Install Cross Compiler

Visit this site download link, enter the "toolchain" directory, download the cross compiler gcc-linaro-arm-4.6.3.tar.xz and gcc-linaro-aarch64.tar.xz and copy them to the "lichee/brandy/toochain/" directory.
The gcc-linaro-arm-4.6.3.tar.xz compiler is used to compile u-boot and gcc-linaro-aarch64.tar.xz is used to compile a Linux kernel.

Compile lichee Source Code

Compilation of the H5's BSP source code must be done under a PC running a 64-bit Linux.The following cases were tested on Ubuntu-14.04 LTS-64bit:

$ sudo apt-get install gawk git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386

Enter the lichee directory and un the following command to compile the whole package:

$ cd lichee/fa_tools
$ ./ -b nanopi-neo2 -p linux -t all

After this compilation succeeds a u-boot, Linux kernel and kernel modules will be generated.
Note: the lichee directory contains a cross-compiler we have setup. When the script runs it will automatically call this cross-compiler.

Type the following command to update the U-boot on your TF card:

$ cd lichee/fa_tools/
$ ./ -d /dev/sdX -p linux -t u-boot

Note: you need to replace "/dev/sdx" with the device name in your system.
The boot.img and kernel modules are under the "linux-3.10/output" directory. You can copy the new boot.img file to your TF card's boot partition.

Compile U-boot

Note:before you can compile u-boot individually you need to compile the whole lichee directory. You can compile u-boot individually by using the following command:

$ cd lichee/fa_tools/
$ ./ -b nanopi-neo2 -p linux -t u-boot

Type the following command to update the U-boot on your TF card:

$ cd lichee/fa_tools/
$ ./ -d /dev/sdX -p linux -t u-boot

Note: you need to replace "/dev/sdx" with the device name in your system.

Compile Linux Kernel

If you want to compile the Linux kernel run the following command:

$ cd lichee/fa_tools/
$ ./ -b nanopi-neo2 -p linux -t kernel

After the compilation is done a uImage and its kernel modules will be generated under "linux-3.10/output".

Clean Source Code

$ cd lichee/fa_tools/
$ ./ -b nanopi-neo2 -p linux -t clean

Connect External Modules to NEO Core2

Connect Python Programmable NanoHat OLED to NEO Core2

The NanoHat OLED module is a small and cute monochrome OLED module with low power consumption. It has three user buttons. We provide its driver's source code and a user friendly shell interface on which you can check system information and status.A customized aluminum case is made for it. You cannot miss this lovely utility! Here is a hardware setup:NanoHat OLED
NanoHat OLED_nanopi_NEO_Core2

Connect Python Programmable NanoHat Motor to NEO Core2

The NanoHat Motor module can drive four 5V PWM steering motors and four 12V DC motors or four 5V PWM steering motors and two 12V four-wire step motors.Here is a hardware setup: NanoHat Motor
NanoHat Motor_nanopi_NEO_Core2

Connect NanoHat PCM5102A to NEO Core2

The NanoHat PCM5102A module uses TI's DAC audio chip PCM5102A, a convenient and easy-to-use audio module for hobbyists. Here is a hardware setup:NanoHat PCM5102A
Matrix - NanoHat PCM5102A_nanopi_NEO_Core2

Connect Arduino Compatible UNO Dock to NEO Core2

The UNO Dock module is an Arduino board compatible with Arduino UNO and works with Arduino programs.You can use Arduino IDE to run all Arduino programs on the Dock.It also exposes the NanoPi NEO Core2's pins.It converts 12V power input to 5V/2A output.You can search for various code samples from Ubuntu's ecosystem and run on the Dock. These features make it a powerful platform for IOT projects and cloud related applications. Here is a hardware setup:UNO Dock for NanoPi NEO v1.0

Connect NanoHat Proto to NEO Core2

The NanoHat Proto is an expansion board which exposes NEO Core2's various pins.It has an onboard EEPROM for data storage.Here is a hardware setup:NanoHat Proto
Matrix - NanoHat Proto_nanopi_NEO_Core2

Connect Matrix - 2'8 SPI Key TFT to NanoPi NEO Core2

The Matrix-2'8_SPI_Key_TFT module is a 2.8" TFT LCD with resistive touch. It uses the ST7789S IC and XPT2046 resistive touch IC. It has SPI interface and three configurable user keys.Here is its wiki page Matrix - 2'8 SPI Key TFT

3D Printing Files for Housing


Datasheet & Schematic

Update Log


  • Released English version