Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(120 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[NanoPi M4B|English]]
 
==介绍==
 
[[File:NanoPi M4B-01B.jpg|thumb|Overview]]
 
[[File:NanoPi M4B-A01.jpg|thumb|Front]]
 
[[File:NanoPi M4B-B01.jpg|thumb|Back]]
 
*NanoPi M4B是基于RK3399 SoC设计的一款接口尺寸与树莓派3兼容的嵌入式ARM计算机。它的尺寸只有85x56mm,接口丰富, 布局紧凑, 非常适合二次开发, 并方便嵌入到最终产品中去。
 
*NanoPi M4B板载2.4G & 5G双频WiFi蓝牙模组, 除了带有2个USB3.0 A型主口, 2个USB2.0 A型主口 1个千兆以太网口, 1个HDMI 2.0 A型口, 1个3.5mm耳机输出, 还带有丰富的扩展接口,包括40Pin树莓派兼容口, 双摄像头接口MIPI-CSI, PCIe x2,红外输入接口, eMMC模块接口, RTC等接口。
 
*NanoPi M4B 标配双通道2GB DDR3, 可使用TF卡启动运行系统,并可外扩eMMC模块启动运行系统。
 
*NanoPi M4B支持运行Ubuntu Desktop 18.04 (64-bit), Lubuntu 16.04(32-bit), Ubuntu Core 18.04(64-bit), Android 8等多种系统, 它们均带有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, OpenCL, DX11, 支持AFBC(帧缓冲压缩)
+
** VPU: 支持4K VP9 and 4K 10bits H265/H264 视频解码,高达60fps, 双VOP显示等视频编解码功能
+
* 电源管理单元: RK808-D PMIC, 搭配独立DC/DC, 支持动态调压, 软件关机, 按键开机, RTC唤醒, 睡眠唤醒等功能
+
* 内存: 双通道2GB DDR3
+
* Flash: 支持扩展eMMC模块
+
* 有线网络: 原生千兆以太网
+
* Wi-Fi/蓝牙: 802.11a/b/g/n/ac, Bluetooth 5.0 双频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: 3.5mm耳机接口集成麦克风输入
+
* USB: 2个独立带宽USB 3.0 Host,2个独立带宽USB 2.0 Host
+
* 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 扩展接口:
+
** PCIe x2
+
** PWM x1, PowerKey, 红外输入
+
* 按键:一个电源按键(PowerKey),一个系统恢复按键(RecoveryKey)
+
* 调试串口: 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
+
* 环境工作温度: -20℃ to 70℃
+
 
+
==接口布局和尺寸==
+
===接口布局===
+
[[File:NanoPi_M4B_Layout.jpg |thumb|600px|NanoPi M4B Layout]]
+
[[File:NanoPi_M4B_eMMC.jpg |thumb|600px|NanoPi M4B eMMC]]
+
* '''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/UART4_TX(3V)  ||20    || GND
+
|-
+
|21  || SPI1_RXD/UART4_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    ||
+
|-
+
|17  || PCIE_REF_CLKN ||18    ||
+
|-
+
|19  || GND    ||20    || GND
+
|-
+
|21  || PWR_KEY    ||22    ||
+
|-
+
|23  || GPIO4_C6/PWM1(3V)    ||24    || IR_RX
+
|}
+
 
+
* '''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电流, 独立带宽, 其中上面的接口可切换为ADB调试接口。
+
::2个USB 2.0 接口共享2A输出电流, 独立带宽。
+
 
+
*'''RTC'''
+
::我们实测的RTC备份电流为27uA.
+
::连接器型号: Molex 53398-0271
+
:'''其他说明'''
+
::#只能从Type-C或40-pin GPIO接口的第2和第4脚给板子供电, 电压范围4.7~5.5V
+
::#板子原理图: [http://wiki.friendlyarm.com/wiki/images/1/16/NanoPi-M4B-1909-Schematic.pdf NanoPi-M4B-1909-Schematic.pdf]
+
 
+
===尺寸===
+
::PCB dxf文件, 仅供做产品时结构设计使用: [http://wiki.friendlyarm.com/wiki/images/0/0b/NanoPi_M4B_1909_dxf.zip NanoPi_M4B_1909_dxf.zip]
+
 
+
==快速入门==
+
===准备工作===
+
要开启你的NanoPi-M4B,请先准备好以下硬件:
+
* NanoPi-M4B主板
+
* 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-M4B}}
+
{{RK3399-DebugPort/zh|NanoPi-M4B}}
+
==FriendlyDesktop系统的使用==
+
{{FriendlyDesktop-Intro/zh|NanoPi-M4B}}
+
{{FriendlyDesktop-Contents/zh|NanoPi-M4B}}
+
===FriendlyDesktop下使用NVME SSD===
+
请参考: [[Template:RK3399 Linux Using NVME SSD|Linux-Using-NVME-SSD]]<br />
+
{{FriendlyCoreGeneral/zh|NanoPi-M4B}}
+
{{FriendlyCoreRunX11Application/zh|NanoPi-M4B}}
+
{{RK3399 Linux mpv/zh|NanoPi-M4B}}
+
==同时适用于FriendlyDesktop与FriendlyCore系统的功能特性==
+
{{Linux-RK3399MIPICamera/zh|NanoPi-M4B}}
+
{{RK3399-Linux-Install-Docker/zh|NanoPi-M4B}}
+
{{RK3399 Linux FFmpeg/zh|NanoPi-M4B}}
+
{{RK3399 Linux Using NVME SSD/zh|NanoPi-M4B}}
+
===Linux下使用4G EC20模块===
+
请参考: [[How to use 4G Module on NanoPC-T4/zh]]<br />
+
==Buildroot Linux系统的使用==
+
{{RK3399 Buildroot Intro/zh|NanoPi-M4B}}
+
<br />
+
关于Buildroot系统更详细的说明,请参考: [[Buildroot for RK3399/zh|Buildroot for RK3399]]<br />
+
==Lubuntu 系统的使用==
+
看这里: [[Lubuntu desktop 16.04 for RK3399/zh]]<br />
+
Lubuntu下使用NVME SSD: [[Template:RK3399 Linux Using NVME SSD/zh|Linux-Using-NVME-SSD]]<br />
+
{{RK3399-Android8/zh|NanoPi-M4B}}
+
{{RK3399-Android-USBCamera/zh|NanoPi-M4B}}
+
{{RK3399-Android-4G-EC20/zh|NanoPi-M4B}}
+
{{RK3399-Android-SSD/zh|NanoPi-M4B}}
+
==Android7.1 系统的使用==
+
看这里: [[RK3399-Android7|Android7]]
+
{{RK3399-BuildFromSource/zh|NanoPi-M4B}}
+
==选配配件eMMC模块的使用==
+
[[File:nanopim4emmc.jpg|frameless|500px]]
+
{{RK3399-BurnOS-To-EMMC/zh|NanoPi-M4B}}
+
{{RK3399-HWAccess/zh|NanoPi-M4B}}
+
{{RK3399-SourceCodeURLs/zh|NanoPi-M4B}}
+
 
+
== 查看瑞芯微原厂资料==
+
*请访问以下网址查看:https://gitlab.com/friendlyelec/rk3399-nougat/tree/nanopc-t4-nougat/RKDocs
+
*[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]
+
 
+
==原理图、尺寸图==
+
*原理图: TODO
+
*尺寸图:TODO
+
 
+
==更新日志==
+
{{RK3399-UpdateLog/zh|NanoPi-M4B}}
+

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.