Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(242 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[NanoPi M4|English]]
 
==介绍==
 
[[File:NanoPi M4-01B.jpg|thumb|Overview]]
 
[[File:NanoPi M4-A01.jpg|thumb|Front]]
 
[[File:NanoPi M4-B01.jpg|thumb|Back]]
 
*NanoPi M4是基于RK3399 SoC设计的一款尺寸和接口与树莓派B3+兼容的嵌入式开发板。它的尺寸只有85x56mm,接口丰富, 布局紧凑, 非常适合二次开发, 并方便嵌入到最终产品中去。
 
*NanoPi M4除了有4个USB3.0 A型主口, 一个千兆以太网口, 一个HDMI 2.0 A型口, 一个3.5mm耳机输出, 和一个Type-C等标准接口外, 还板载2.4G & 5G双频WiFi蓝牙模组, 和丰富的扩展接口,包括双MIPI-CSI(其中一路可做DSI), PCIex2, USB2.0, eMMC Socket, I2C, UART,SPI, 八通道I2S,PWM,RTC, GPIO等。M4没有板载eMMC, 默认通过SD启动系统, 但也可通过eMMC Socket外扩eMMC, 实现eMMC启动。
 
*NanoPi M4有4GB LPDDR3和2GB DDR3两个版本。支持运行Android 7.1和Lubuntu Desktop两种系统,它们均带有GPU和VPU加速处理。
 
  
==硬件特性==
+
{{RockchipUnbrick|NanoPC-T4}}
* 主控芯片: Rockchip RK3399
+
** CPU: big.LITTLE大小核架构,双Cortex-A72大核(up to 2.0GHz)+四Cortex-A53小核结构(up to 1.5GHz)
+
** GPU: Mali-T864 GPU,支持OpenGL ES1.1/2.0/3.0/3.1, OpenVG1.1, OpenCL, DX11, 支持AFBC(帧缓冲压缩)
+
** VPU: 支持4K VP9 and 4K 10bits H265/H264 视频解码,高达60fps, 双VOP显示等视频编解码功能
+
* 电源管理单元: RK808-D PMIC, 搭配独立DC/DC, 支持动态调压, 软件关机, 按键开机, RTC唤醒, 睡眠唤醒等功能
+
* 内存: 双通道4GB LPDDR3-1866, 或 双通道2GB DDR3-1866
+
* Flash: 支持扩展eMMC模块
+
* 有线网络: 原生千兆以太网
+
* Wi-Fi/蓝牙: 802.11a/b/g/n/ac, Bluetooth 4.1 双频Wi-Fi蓝牙模块, 双天线
+
* 视频输入:  1个或2个4线MIPI-CSI, 双ISP像素处理能力高达13MPix/s,支持双路摄像头数据同时输入
+
* 视频输出
+
** HDMI: HDMI 2.0a, 支持4K@60Hz显示,支持HDCP 1.4/2.2
+
** LCD Interface: 一个4线MIPI-DSI
+
* Audio Out: 3.5mm 双通道耳机接口, 或者通过HDMI输出
+
* Audio In: 2.54mm排针形式(默认不焊)的麦克风接口
+
* USB 3.0: 4个USB 3.0 Host A型接口
+
* USB Type-C: 支持USB2.0 OTG 和 5V电源输入
+
* microSD Slot x 1
+
* 40Pin GPIO 扩展接口:
+
** 2 X 3V/1.8V I2C, up to 1 x 3V UART, 1 X 3V SPI, 1 x SPDIF_TX, up to 8 x 3V GPIOs
+
** 1 x 1.8V 8通道 I2S
+
* 24Pin 扩展接口:
+
** 2个独立的原生USB 2.0 Host
+
** PCIe x2
+
** PWM x1, PowerKey
+
* 调试串口: 4 Pin 2.54mm 调试串口, 3V电平, 波特率为1500000
+
* LED: 1 x power LED and 1 x GPIO Controled LED
+
* RTC电池座子: 2 Pin 1.27/1.25mm RTC备份电池接口
+
* 供电电源: DC 5V/3A
+
* PCB: 8 Layer, 85 mm x 56 mm
+
* 环境工作温度: 0℃ to 80℃
+
 
+
==接口布局和尺寸==
+
===接口布局===
+
[[File:NanoPi M4-4GB-1807-IF-01.jpg |thumb|600px|NanoPi M4 Layout]]
+
[[File:NanoPi M4-2GB-1807-IF-01.jpg |thumb|600px|NanoPi M4 Layout]]
+
* '''40 Pin GPIO1 引脚定义'''
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' || '''Assignment'''          ||'''Pin#'''  || '''Assignment'''   
+
|-
+
|1    || VCC3V3_SYS  ||2    || VDD_5V
+
|-
+
|3    || I2C2_SDA(3V)      ||4    || VDD_5V
+
|-
+
|5    || I2C2_SCL(3V)      ||6    || GND
+
|-
+
|7    || GPIO1_A0(3V)      ||8    || GPIO4_C1/I2C3_SCL(3V)
+
|-
+
|9    || GND          ||10    || GPIO4_C0/I2C3_SDA(3V)
+
|-
+
|11  || GPIO1_A1(3V)      ||12    || GPIO1_C2(3V)
+
|-
+
|13  || GPIO1_A3(3V)      ||14    || GND
+
|-
+
|15  || GPIO1_A4(3V)      ||16    || GPIO1_C6(3V)
+
|-
+
|17  || VCC3V3_SYS ||18    || GPIO1_C7(3V)
+
|-
+
|19  || SPI1_TXD/UARM4_TX(3V)    ||20    || GND
+
|-
+
|21  || SPI1_RXD/UARM4_RX(3V)    ||22    || GPIO1_D0(3V)
+
|-
+
|23  || SPI1_CLK(3V)    ||24    || SPI1_CSn0(3V)
+
|-
+
|25  || GND          ||26    || GPIO4_C5/SPDIF_TX(3V)
+
|-
+
|27  || I2C2_SDA(1.8V)      ||28    || I2C2_SCL(1.8V)
+
|-
+
|29  || I2S0_LRCK_RX(1.8V)      ||30    || GND
+
|-
+
|31  ||I2S0_LRCK_TX(1.8V)    ||32    || I2S_CLK(1.8V)
+
|-
+
|33  || I2S0_SCLK(1.8V)      ||34    || GND
+
|-
+
|35  || I2S0_SDI0(1.8V)    ||36    || I2S0_SDO0(1.8V)
+
|-
+
|37  || I2S0_SDI1SDO3(1.8V)    ||38    || I2S0_SDI2SDO2(1.8V)
+
|-
+
|39  || GND          ||40    || I2S0_SDI3SDO1(1.8V)
+
|}
+
 
+
* '''24 Pin GPIO2 引脚定义'''
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' || '''Assignment'''          ||'''Pin#'''  || '''Assignment'''   
+
|-
+
|1    || VCC5V0_SYS  ||2    || VCC5V0_SYS
+
|-
+
|3    || PCIE_RX1_P      ||4    || PCIE_TX1P
+
|-
+
|5    || PCIE_RX1_N      ||6    || PCIE_TX1N
+
|-
+
|7    || GND      ||8    || GND
+
|-
+
|9    || PCIE_RX0_P          ||10    || PCIE_TX0P
+
|-
+
|11  || PCIE_RX0_N      ||12    || PCIE_TX0N
+
|-
+
|13  || GND      ||14    || GND
+
|-
+
|15  || PCIE_REF_CLKP      ||16    || HOST0_DM
+
|-
+
|17  || PCIE_REF_CLKN ||18    || HOST0_DP
+
|-
+
|19  || GND    ||20    || GND
+
|-
+
|21  || PWR_KEY    ||22    || HOST1_DM
+
|-
+
|23  || GPIO4_C6/PWM1(3V)    ||24    || HOST1_DP
+
|}
+
 
+
* '''MIPI-CSI接口引脚定义'''
+
:: 0.5mm FPC 连接器
+
:: MIPI-CSI2也可作为MIPI-DSI接口连接LCD显示屏
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' ||  '''MIPI-CSI1'''  ||  '''MIPI-CSI2'''  ||  '''Description ''' 
+
|-
+
|1    ||  VCC5V0_SYS  || VCC5V0_SYS  ||  5V Power ouput
+
|-
+
|2    ||  VCC5V0_SYS || VCC5V0_SYS    ||  5V Power ouput
+
|-
+
|3    ||    GND    ||  GND          ||  Return current path
+
|-
+
|4    || VCC_CSI_AF2.8V || VCC_CSI_AF2.8V || 2.8V Power for VCM
+
|-
+
|5    || VCC_CSI_1.2V  || VCC_CSI_1.2V  || 1.2V Power for image sensor core circuit
+
|-
+
|6    ||  VCC1V8_CAM  ||  VCC1V8_CAM  || 1.8V power for I/O circuit
+
|-
+
|7    ||  VCC_CSI_2.8V || VCC_CSI_2.8V || 2.8V power for image sensor analog circuit
+
|-
+
|8    ||  VCC_CSI_1.0V || VCC_CSI_1.0V || 1.0V Power for image sensor core circuit
+
|-
+
|9    || I2C1_SCL ||  I2C2_SCL        || 1.8V I2C clock signal
+
|-
+
|10    || I2C1_SDA || I2C2_SDA        ||  1.8V I2C data signal
+
|-
+
|11    || MIPI_CSI0_RST || MIPI_CSI1_RST || reset  camera module
+
|-
+
|12    || MIPI_CSI0_PWN || MIPI_CSI1_PWN  || Power down camera module
+
|-
+
|13    ||  GND          ||      GND          || Return current path
+
|-
+
|14    || GPIO2_B3_CIF_CLKOUTA || GPIO2_B3_CIF_CLKOUTA || MCLK to camera module
+
|-
+
|15      || GND          ||    GND            || Return current path
+
|-
+
|16    ||  MIPI_RX0_D3P  || MIPI_TX1/RX1_D3P  || MIPI CSI positive differential data line transceiver output
+
|-
+
|17    ||  MIPI_RX0_D3N || MIPI_TX1/RX1_D3N    || MIPI CSI negative differential data line transceiver output
+
|-
+
|18    ||  GND    || GND                      || Return current path
+
|-
+
|19    || MIPI_RX0_D2P || MIPI_TX1/RX1_D2P  || MIPI CSI positive differential data line transceiver output
+
|-
+
|20    || MIPI_RX0_D2N || MIPI_TX1/RX1_D2N    || MIPI CSI negative differential data line transceiver output
+
|-
+
|21    || GND || GND    || Return current path
+
|-
+
|22    ||  MIPI_RX0_D1P  || MIPI_TX1/RX1_D1P  || MIPI CSI positive differential data line transceiver output
+
|-
+
|23    || MIPI_RX0_D1N || MIPI_TX1/RX1_D1N    || MIPI CSI negative differential data line transceiver output
+
|-
+
|24    || GND || GND    || Return current path
+
|-
+
|25    || MIPI_RX0_CLKP || MIPI_TX1/RX1_CLKP  || MIPI CSI positive differential clock line transceiver output
+
|-
+
|26    || MIPI_RX0_CLKN || MIPI_TX1/RX1_CLKN    || MIPI CSI negative differential clock line transceiver output
+
|-
+
|27    || GND ||  GND  || Return current path
+
|-
+
|28    || MIPI_RX0_D0P || MIPI_TX1/RX1_D0P || MIPI CSI positive differential data line transceiver output
+
|-
+
|29    || MIPI_RX0_D0N || MIPI_TX1/RX1_D0N  || MIPI CSI negative differential data line transceiver output
+
|-
+
|30    || GND      ||  GND    || Return current path
+
|}
+
 
+
* '''eMMC Socket接口引脚定义'''
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' || '''Assignment'''          ||'''Pin#'''  || '''Assignment'''   
+
|-
+
|1    || EMMC_D0  ||2    || EMMC_D1
+
|-
+
|3    || EMMC_D2    ||4    || EMMC_D3
+
|-
+
|5    || EMMC_D4      ||6    || EMMC_D5
+
|-
+
|7    || EMMC_D6    ||8    || EMMC_D7
+
|-
+
|9    || EMMC_STRB          ||10    || GND
+
|-
+
|11  || EMMC_CMD      ||12    || EMMC_CLKO
+
|-
+
|13  || N/C    ||14    || GND
+
|-
+
|15  || N/C    ||16    || VCC1V8_S3
+
|-
+
|17  || eMMC_RST  ||18    || VCC3V3_S3
+
|-
+
|19  || GND    ||20    || GND
+
|}
+
 
+
* '''调试串口引脚定义'''
+
:: 3V电平, 波特率1500000bps
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' ||'''Assignment''' ||  '''Description ''' 
+
|-
+
|1    || GND                || 0V
+
|-
+
|2    || VCC5V0_SYS          || 5V power output
+
|-
+
|3    || UART2DBG_TX        || output
+
|-
+
|4    || UART2DBG_RX        || intput
+
|}
+
 
+
*'''USB接口'''
+
::USB 3.0 接口具有2A过流保护功能.
+
 
+
*'''RTC'''
+
::我们实测的RTC备份电流为27uA.
+
::连接器型号: Molex 53398-0271
+
:'''其他说明'''
+
::#只能从Type-C或40Pin GPIO接口的第2和第4脚给板子供电, 电压范围4.7~5.5V
+
::#板子原理图: [http://wiki.friendlyarm.com/wiki/images/d/dd/NanoPi-M4-2GB-1807-Schematic.pdf NanoPi-M4-2GB-1807-Schematic.pdf] [http://wiki.friendlyarm.com/wiki/images/7/7a/NanoPi-M4-4GB-1807-Schematic.pdf NanoPi-M4-4GB-1807-Schematic.pdf]
+
 
+
===尺寸===
+
[[File:NanoPi M4_1807_Drawing.png|frameless|800px|NanoPi M4 Dimensions]]
+
 
+
::PCB dxf文件, 仅供做产品时结构设计使用: [http://wiki.friendlyarm.com/wiki/images/e/e4/NanoPi-M4-1807_Drawing%28dxf%29.zip NanoPi-M4-1807-Drawing(dxf).zip]
+
 
+
==快速入门==
+
===准备工作===
+
要开启你的NanoPi-M4,请先准备好以下硬件:
+
* NanoPi-M4主板
+
* Type-C数据线
+
* TF卡: Class10或以上的8GB microSD卡
+
* USB转串口适配器(可选,用于调试或PC上进行操作)
+
* 一个5V/3A或以更大功率的电源适配器
+
* 一台支持HDMI输入的显示器或者电视(或选购LCD配件)
+
* 一套USB键盘鼠标,同时连接更多USB的设备时还需要USB HUB
+
* 一台电脑,需要联网,建议使用<b>Ubuntu 18.04 64位系统</b>
+
 
+
{{RK3399-BootFromSDCard/zh|NanoPi-M4}}
+
{{RK3399-DebugPort/zh|NanoPi-M4}}
+
==FriendlyDesktop系统的使用==
+
{{FriendlyDesktop-Intro/zh|NanoPi-M4}}
+
{{FriendlyDesktop-Contents/zh|NanoPi-M4}}
+
{{FriendlyCoreGeneral/zh|NanoPi-M4}}
+
{{Lubuntu-RK3399/zh|NanoPi-M4}}
+
{{RK3399-Android7/zh|NanoPi-M4}}
+
{{RK3399-BuildFromSource/zh|NanoPi-M4}}
+
{{RK3399-BurnOS-To-EMMC/zh|NanoPi-M4}}
+
{{RK3399-HWAccess/zh|NanoPi-M4}}
+
 
+
== 查看瑞芯微原厂资料==
+
*[http://opensource.rock-chips.com/images/6/60/Rockchip_RK3399_Datasheet_V1.6-20170301.pdf RK3399 datasheet V1.6]
+
*[http://opensource.rock-chips.com/images/e/ee/Rockchip_RK3399TRM_V1.4_Part1-20170408.pdf RK3399TRM V1.4]
+
 
+
==原理图、尺寸图==
+
*原理图:  [http://wiki.friendlyarm.com/wiki/images/d/dd/NanoPi-M4-2GB-1807-Schematic.pdf NanoPi-M4-2GB-1807-Schematic.pdf] [http://wiki.friendlyarm.com/wiki/images/7/7a/NanoPi-M4-4GB-1807-Schematic.pdf NanoPi-M4-4GB-1807-Schematic.pdf]
+
*尺寸图:[http://wiki.friendlyarm.com/wiki/images/e/e4/NanoPi-M4-1807_Drawing%28dxf%29.zip NanoPi-M4-1807-Drawing(dxf).zip]
+
 
+
==更新日志==
+
===2018-08-24===
+
首页发布
+

Latest revision as of 09:23, 4 June 2024

1 Unbricking Method

If the ROM is not installed correctly, causing the development board to become bricked, and you might not have the opportunity to reinstall the ROM via an SD card, you need to enter Maskrom mode to unbrick it by erasing the storage device.

1.1 Windows Users

1.1.1 Download Required Files

  • Get the necessary tools: Visit here, find RKDevTool_v3.19_for_window.zip and DriverAssitant_v5.12.zip in the 05_Tools directory, and download them to your local machine.
  • Install Rockchip USB driver and RKDevTool: Extract DriverAssitant_v5.12.zip to install the Rockchip USB driver, and extract RKDevTool_v3.19_for_window.zip to obtain the Rockchip flashing tool RKDevTool.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.1.2 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to your computer using a USB data cable.
  • Start RKDevTool on your computer.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button when you see Found One MASKROM Device displayed at the bottom of the interface, as shown below:

Rkdevtool found one maskrom device.png

  • Click the Advanced Function tab in the RKDevTool interface.
  • In the Boot text box, select MiniLoaderAll.bin, then click the Download button.
  • Select EMMC, click Switch Storage, then click the EraseAll button to erase the eMMC.

Rkdevtool erase emmc.png

  • At this point, NanoPC-T4 is restored to its initial state and can be normally booted via SD card or eMMC.

1.2 Linux/Mac Users

1.2.1 Download the Required Files

  • Get the necessary tools: Visit here and find upgrade_tool_v2.30_for_linux.tgz (or for Mac users, select upgrade_tool_v2.25_for_mac.tgz) in the 05_Tools directory and download it locally.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.2.2 Installation for upgrade_tool

The following commands are for Linux, with only slight differences in file and directory names for Mac users:

tar xzf upgrade_tool_v2.30_for_linux.tgz
cd upgrade_tool_v2.30_for_linux
sudo cp upgrade_tool /usr/local/sbin/
sudo chmod 755 /usr/local/sbin/upgrade_tool

1.2.3 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to the computer using a USB data cable.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button after 4 seconds.
  • Check the connection with the following command:
upgrade_tool LD

A result similar to "DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=13 Mode=Maskrom SerialNo=" indicates that the device has been detected.

  • Erase the eMMC with the following command:
upgrade_tool EF MiniLoaderAll.bin
  • At this point, NanoPC-T4 has been restored to its initial state and can boot the system normally via SD card or eMMC.