BPI-M2 ZERO使用教程

Introduction

The Banana Pi M2 Zero is an ultra compact single board computer which measures only 65mm*30mm. Its external interfaces are the same as the Raspberry Pi Zero W, and it will fit almost all cases and accessories for the Zero W. It uses the quad-core Cortex A7 Allwinner H3/H2+processor, with 512MB RAM. It's ideal for light-weight systems and space-limited applications. Like other members of the Banana Pi family, it supports both Linux and Android operating systems.

for Allwinner H2+ chip is EOL, so BPI-M2 Zero will use H3 chip defaults. but image for H2+ also support H3, so all image is same. support H2+ and H3 chip.


Key Features

  • CPU: Allwinner H2+, Quad-core Cortex-A7.
  • 512MB DDR 3 SDRAM.
  • WiFi (AP6212) & Bluetooth onboard.
  • Mini HDMI.
  • 40 Pin Raspberry Pi-compatible GPIO, including UART, SPI, I2C, etc.

Getting Start

Quick strart your BPI-M2 zero : Quick Start Banana pi SBC
How to development : Getting Start with M2 Zero

Hardware

Hardware interface


Hardware spec

HardWare Specification of Banana pi BPI-P2 Zero VS BPI-M2 zero VS Raspberry Pi Zero W
ModuleBanana Pi BPI-P2 ZeroBanana Pi BPI-M2 ZeroRaspberry Pi Zero W
CPUH2+ Quad-core Cortex-A7 H265/HEVC 1080PH2+ Quad-core Cortex-A7 H265/HEVC 1080PBroadcom BCM2835 32 Bit 1 GHz ARM1176JZF-S single-core
GPUMali400MP2 GPU @600MHz,Supports OpenGL ES 2.0Mali400MP2 GPU @600MHz,Supports OpenGL ES 2.0VideoCore IV
Memory \(SDRAM\)512M DDR3(shared with GPU)512M DDR3(shared with GPU)512 MB DDR2
Onboard StorageTF card \(Max. 64GB\)TF card \(Max. 64GB\)TF card \(Max. 64GB\)
Onboard Network100M LANNOPE (but can extension with PIN define)NOPE
PoE powerPoE function supportNOPENOPE
Onboard flash8G eMMCNOPENOPE
Onboard WIFISDIO AP6212(option AP6181、AP6335)SDIO AP6212(option AP6181、AP6335)802.11n wireless, Bluetooth 4.1
Video decoding1080p@60fps,H.264 Video encoding 1080p@30fps,H.2641080p@60fps,H.264 Video encoding 1080p@30fps,H.2641080p30 H.264/MPEG-4 AVC high-profile decoder and encoder
Video inputA CSI input connector CameraA CSI input connector CameraCSI camera connector
Video Outputsmini HDMI 1.4,1080P@30fps, DHCPmini HDMI 1.4,1080P@30fps, DHCPMini HDMI and USB On-The-Go ports
Audio OutputMini HDMIMini HDMIMini HDMI
Power SourceMicro USB with 5V/2A or PoE powerMicro USB with 5V/2A5V/2A
USB 2.0 Portsone USB 2.0 OTGone USB 2.0 OTGone USB 2.0 OTG
ButtonsPower Button, Reset ButtonPower Button, Reset ButtonComposite video and reset headers
Low-level peripherals40 Pins Header,compatible with Raspberry Pi 340 Pins Header,compatible with Raspberry Pi 340 PIN
uart GPIO\(1x3\) pinUART, groundUART, groundUART
LEDPower led & Status ledPower led & Status ledPower Status LED
IRN/AN/AN/A
Supported OSandroid linuxandroid linxLinux
Product size65mm X 52.5mm65mm × 30mm65mm x 30mm
Weight30g15g9g

GPIO PIN define

Banana Pi BPI-M2 zero has a 40-pin GPIO header that matches that of the Model Raspberry Pi 3. Following is the Banana Pi GPIO Pinout:

40 PIN GPIO of Banana pi BPI-M2 zero
GPIO Pin NameDefault FunctionFunction2:GPIOFunction3
CON2-P01VCC-3V3
CON2-P02VCC-5V
CON2-P03TWI0-SDAPA12-EINT12
CON2-P04VCC-5V
CON2-P05TWI0-SCKPA11-EINT11
CON2-P06GND
CON2-P07PWM1PA6-EINT6
CON2-P08UART3-TXPA13-EINT13SPI1-CS
CON2-P09GND
CON2-P10UART3-RXPA14-EINT14SPI1-CLK
CON2-P11UART2-RXPA1-EINT1
CON2-P12UART3-CTSPA16-EINT16SPI1-MISO
CON2-P13UART2-TXPA0-EINT0
CON2-P14GND
CON2-P15UART2-CTSPA3-EINT3
CON2-P16UART3-RTSPA15-EINT15SPI1-MOSI
CON2-P17VCC-3V3
CON2-P18PC4PC4
CON2-P19SPI0-MOSIPC0
CON2-P20GND
CON2-P21SPI0-MISOPC1
CON2-P22UART2-RTSPA2-EINT2
CON2-P23SPI0-CLKPC2
CON2-P24SPI0-CSPC3
CON2-P25GND
CON2-P26PC7PC7
CON2-P27TWI1-SDAPA19-EINT19
CON2-P28TWI1-SCKPA18-EINT18
CON2-P29PA7-EINT7PA7-EINT7
CON2-P30GND
CON2-P31PA8-EINT8PA8-EINT8
CON2-P32PL2-S-EINT2PL2-S-EINT2
CON2-P33PA9-EINT9PA9-EINT9
CON2-P34GND
CON2-P35PA10-EINT10PA10-EINT10
CON2-P36PL4-S-EINT4PL4-S-EINT4
CON2-P37PA17-EINT17PA17-EINT17SPDIF-OUT
CON2-P38PA21-EINT21PA21-EINT21
CON2-P39GND
CON2-P40PA20-EINT20PA20-EINT20
code on github: https://github.com/TuryRx/Banana-pi-m2-zero-GPIO

CSI Camera Connector specification:

The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin definitions of the CSI interface are shown as below. This is marked on the Banana Pi board as “CSI″.

24 PIN CSI Camera connector of Banana pi BPI-M2 Zero
CSI Pin NameDefault FunctionFunction2:GPIO
CN3-P01NC
CN3-P02GND
CN3-P03CSI0-SDAPE13
CN3-P04CSI0-AVDD
CN3-P05CSI0-SCKPE12
CN3-P06CSI0-ResetPE14
CN3-P07CSI0-VSYNCPE3
CN3-P08CSI0-PWDNPE15
CN3-P09CSI0-HSYNCPE2
CN3-P10CSI0-DVDD
CN3-P11CSI0-DOVDD
CN3-P12CSI0-D7PE11
CN3-P13CSI0-MCLKPE1
CN3-P14CSI0-D6PE10
CN3-P15GND
CN3-P16CSI0-D5PE9
CN3-P17CSI0-PCLKPE0
CN3-P18CSI0-D4PE8
CN3-P19CSI0-D0PE4
CN3-P20CSI0-D3PE7
CN3-P21CSI0-D1PE5
CN3-P22CSI0-D2PE6
CN3-P23GND
CN3-P24CSI0-DOVDD

UART specification:

The jumper CON3 is the UART interface. For developers of Banana Pi, this is an easy way to get the UART console output to check the system status and log message.

jumper CON3 of Banana pi BPI-M2 Zero
CON3 Pin NameDefault FunctionGPIO
CON3 P03UART0-TXDPA4
CON3 P02UART0-RXDPA5
CON3 P01GND

Development

Basic Development

how to use zero 10/100 Ethernet

BPI-M2 zero not RJ45 interface ,but it support 100M network with PIN define.


PIN 定义:


原理图,示意图:


测试


GPIO 5V 输入的零功耗

BPI-M2 Zero 40 PIN GPIO支持5V输入,所以你可以使用5V输入PIN给零板供电。


Resources

Documents

Source code

  • Android 4.4 source code
download link: https://drive.google.com/open?id=0B_YnvHgh2rwjdWNEQzg1UDl1bUE
forum thread: http://forum.banana-pi.org/t/bpi-m2-android-4-4-source-code-download-link/3159
  • Linux source code
kernel 4.4 source code : https://github.com/BPI-SINOVOIP/BPI-M2P-bsp-4.4
kernel 3.4 source code : https://github.com/BPI-SINOVOIP/BPI-M2Z-bsp
duscuss on forum : https://forum.banana-pi.org/t/gpio-imagenes-ubuntu-banana-pi-bpi-m2-zero/13247

Image Release

Note: all image support H2+ and H3 chip on board for BPI-M2 Zero

Android

  • 2018-07-09 update Android 4.4, kernel 3.4
Google Drive: https://drive.google.com/file/d/1fAwnXuJI9C8aAfVrD3gM0mIgPKQGWFBY
Baidu Drive : https://pan.baidu.com/s/1zaUoVBK39AxZw6ou5bDv2g
Forum pthread: http://forum.banana-pi.org/t/bananapi-bpi-m2z-h2-new-image-android4-4-release-2018-07-09/6223
  • 2017-11-12 update Android 4.4, kernel 3.4
Google Drive: https://drive.google.com/open?id=1TywrMLLxqJj23ql2jyzLruZw18V_XwX3
Baidu Drive : https://pan.baidu.com/s/1c2pTXUo
MD5: 67a5953dac47f3ca7a2628e1422a36e2
Forum pthread:
https://forum.banana-pi.org/t/bpi-m2-zero-new-image-android-4-4-version-v1/4384

Linux

  • 2020-04-28 update, Debian 9, Rasbian Stretch, Ubuntu 16.04 Mate Desktop and Ubuntu 16.04 Server, base on kernel 4.4
google driver: https://drive.google.com/drive/folders/1uRE8BppgDjK2TXH5kUIJ1_YrbAAW3HKF
baidu cloud : https://pan.baidu.com/s/1pJfJbhIcU52uaR4mkWc-4A
 Pincode:5e3E
discuss on forum: http://forum.banana-pi.org/t/banana-pi-bpi-m2-zero-new-image-2020-04-28-debian-rasbian-ubuntu/11068

Arch Linux

discuss on forum : https://forum.banana-pi.org/t/instalacion-y-configuracion-de-arch-linux-en-bpi-m2-zero/13192

Armbian

BPi-M2 Zero Armbian+ OV5640 + OpenCV SD image

RetroPie

  • RetroPie for Banana Pi M2 Zero v.1.2.1 beta
mage Link : http://www.nintendont.it/download/nintendont-retropie-banana-pi-m2-zero-v-1-2-1-beta/
Forum thread: http://forum.banana-pi.org/t/bpi-m2-zero-new-image-retropie-for-banana-pi-m2-zero-v-1-2-1-beta/4889

retrorangepi

Raspbian

  • 2020-04-10 update Raspbian Stretch, kernel 4.4 ( user :  pi   password :  bananapi )
google driver https://drive.google.com/file/d/1Xk86WchdJemKb4ltCX0AB9wRj5NJcZL1/view
baidu cloud: https://pan.baidu.com/s/1eKs85jMW3PS8pdX4jukLUQ
 PIN code:6W2M
fourm: http://forum.banana-pi.org/t/banana-pi-bpi-m2-zero-new-image-2020-04-10-raspbian-jessie-ap6212-bpi-m2z-sd-emmc-image/10978
  • 2019-04-30 update Raspbian Stretch, kernel 3.4
Google Drive : https://drive.google.com/open?id=14tsP-ctECFxFBsF7Lmuv_C-Bm7Xppl79
Baidu Drive : https://pan.baidu.com/share/init?surl=gmg-qX235t5kpL1N9uHy5A
 ( PinCode: 146j )
forum: https://forum.banana-pi.org/t/bananapi-bpi-m2z-bpi-p2-zero-h2-new-images-reapbian9-4-ubuntu16-04-release-2019-04-30/9166
  • 2018-07-09 update Raspbian Stretch, kernel 3.4
Google Drive: https://drive.google.com/file/d/1XMVCWCWoWmhzL-c89rkqzZVE_k7xYCvd/view
baidu Drive: https://pan.baidu.com/s/1ahXv3Hl7Dst7uBwz60pcrg
 2
forum: https://forum.banana-pi.org/t/bananapi-bpi-m2z-h2-new-image-raspbian-ubuntu-release-2018-07-09/6221

Ubuntu

  • Banana Pi new image: Ubuntu 16.04 with Allwinner BSP, use MPV play 1080P video,Allwinner BSP kernel 3.4 , BPI-M2 Ultra/Berry use kernel 3.10
google driver: https://drive.google.com/drive/folders/1DEO7JdMfDhHynC83K7JMxgnNxf1gV82S
discuss on forum: https://forum.banana-pi.org/t/banana-pi-new-image-ubuntu-16-04-with-allwinner-bsp-use-mpv-play-1080p-video/13272
  • .2019-4-30 update BPI-M2 Zero & BPI-P2 Zero Ubuntu Server 16.04
Features Map: https://wiki.banana-pi.org/M2Z_Image_Map#Kernel_3.4
Image Links:
HDMI-Version
Google Drive : https://drive.google.com/open?id=1nTrali0w7GgcGatu-jxyJR-sF06rMN39
Baidu Drive : https://pan.baidu.com/share/init?surl=00LiQcD7V2_AJ3EmYN8p0g ( PinCode: q379 )
Md5sum : f8aa74511677a0543d2af65115d7d0d0
Forum pthread: https://forum.banana-pi.org/t/bananapi-bpi-m2z-bpi-p2-zero-h2-new-images-reapbian9-4-ubuntu16-04-release-2019-04-30/9166

4.2018-4-30 update BPI-M2 Zero & P2Zero Ubuntu Desktop 16.04

Features Map: https://wiki.banana-pi.org/M2Z_Image_Map#Kernel_3.4
Image Links:
HDMI-Version
Google Drive : https://drive.google.com/open?id=14_qm7Nk3FIycIC95ghVyeFz2xEbKjuSx
Baidu Drive : https://pan.baidu.com/s/1LZmkxRnszlhfdLD0Ngg18g ( PinCode: dqe1 )
Md5sum : 25daaac1e678a5cc98259a82ea5ce53c
Forum pthread: https://forum.banana-pi.org/t/bananapi-bpi-m2z-bpi-p2-zero-h2-new-images-reapbian9-4-ubuntu16-04-release-2019-04-30/9166
  • 2018-07-09 update
Image Link:
Google Drive: https://drive.google.com/file/d/19WUVZGEeUaIXe5vPtGpsENvS61fPYmEi/view
baidu Drive: https://pan.baidu.com/s/1dg7okBYBkt_1U3saVqOMUw
Forum thread: https://forum.banana-pi.org/t/bananapi-bpi-m2z-h2-new-image-raspbian-ubuntu-release-2018-07-09/6221
  • 2017-11-13 update
Image Link:
Google Drive: https://drive.google.com/file/d/1Q4NxmO33RYtmECZ8BobW6DXzGWkvCs9F/view?usp=sharing
baidu Drive: https://pan.baidu.com/s/1gfvRUk7
Forum thread: https://forum.banana-pi.org/t/bpi-m2-zero-new-image-2017-11-13-ubuntu-16-04-mate-desktop-beta-bpi-m2z-sd-emmc-img/4172

LibreElec 10 (Kodi Matrix) at BPI-M2 Zero