0021 MPSAI EN:修订间差异

来自Mcuzone Wiki
无编辑摘要
 
(未显示同一用户的4个中间版本)
第1行: 第1行:
== '''关键词''' ==
[[0021 MPSAI|切换语言为中文]]
树莓派5、PCIe、驱动安装、操作演示、2230、2242、2280、NVMe SSD、固态硬盘 X1、AI、HAILO 8L、摄像头、OV5647、图像检测、图像识别


== '''一、简介''' ==
== '''Keywords''' ==
Raspberry Pi 5, PCIe, Driver installation, Operation demonstration, 2230, 2242, 2280, NVMe SSD, SSD X1, AI, HAILO 8L, Camera, OV5647, Image Recognition, Optional auxiliary power supply


== '''二、硬件资源''' ==
== '''I. Introduction''' ==
1. 基于树莓派5设计,采用16Pin FPC和树莓派5的PCle接口连接;


2. 扩展板通过PCIe Switch进行一扩二;
== '''II. Hardware Resources''' ==
1. Designed for the Raspberry Pi 5, it uses a 16-pin FPC to connect to the Raspberry Pi 5's PCIe interface.


3. 一路PCIe扩展M.2 M-key接口,2242尺寸,用于接AI模块 HAilo8,树莓派官方OS加载驱动;
2. The MPSTPU expansion board adds two PCIe interfaces via a PCIe Switch.


4. 一路PCIe扩展M.2 M-key接口,接NVMe SSD(PCIe X1,仅支持Gen2模式),支持2230/2242/2280尺寸(默认焊接2280铜柱),不支持SATA和NGFF SSD硬盘;
3. One PCIe extension M.2 E key interface, 2242 size, used for connecting the AI module HAilo8,with the official Raspberry Pi OS loading the driver.


5. SSD可用于存储数据和系统启动;从SSD启动时,需树莓派官方固件是2024.5.13以后的版本;
4. One PCIe expanded M.2 M key slot, for connecting NVMe SSD (PCIe X1, Gen2 mode only). Supports 2230/2242/2280 size SSDs (defaulting to welded mounting posts for 2280 size). It does not support SSDs that use NGFF and SATA protocols.


6. 40Pin GPIO部分采用开窗设计,可通过杜邦线连接,不影响树莓派5自身GPIO引脚使用;
5. The SSD can be used for data storage and system booting. When booting from the SSD, the Raspberry Pi official firmware needs to be version 2024.5.13 or later.


7. PCB板沉金工艺,无铅生产,且通过UL认证,符合ROHS标准,防火等级94V-0;
6. The 40-pin GPIO section adopts an unobstructed design on the top. It can be connected via DuPont cable, without affecting the use of the Raspberry Pi 5's own GPIO pins.


8. 采用4个M2.5固定孔,和树莓派5定位孔吻合;
7. Gold immersion PCB process, lead-free production, certified by UL, compliant with ROHS standards, and has a fire rating of 94V-0.


9. 可选配铝合金外壳。
8. It uses four M2.5 mounting holes that align with the Raspberry Pi 5 mounting holes.
 
9. It is compatible with an optional aluminum alloy enclosure.


http://www.mcuzone.com/wiki/0021_MPSAI/0021_MPSAI_01.jpg
http://www.mcuzone.com/wiki/0021_MPSAI/0021_MPSAI_01.jpg


== '''三、系统烧写及设置''' ==
== '''III. System flashing and setting''' ==


=== 3.1 概述 ===
=== 3.1 Overview ===
本文档采用树莓派OS、Ubuntu系统和OpenWrt系统进行测试。
This document uses the Raspberry Pi OS, Ubuntu system and OpenWrt system for testing.


1) 树莓派OS的版本为2024-07-04-raspios-bookworm-arm64.img.xz,树莓派OS下载地址:
The version of the Raspberry Pi OS is: 2024-07-04-raspios-bookworm-arm64.img.xz
 
You can download the Raspberry Pi OS in:


https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit


2) Ubuntu系统的版本为ubuntu-24.04-preinstalled-desktop-arm64+raspi.img.xz,Ubuntu OS下载地址:
The version of the Ubuntu system is: ubuntu-24.04-preinstalled-desktop-arm64+raspi.img.xz
 
You can download the Ubuntu system in:


https://ubuntu.com/download/raspberry-pi
https://ubuntu.com/download/raspberry-pi


3) OpenWrt系统版本:
The version of the OpenWrt system is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.1.100-20240805.img.gz


openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.1.100-20240805.img.gz
=== 3.2 System flashed onto the SD (TF) card ===
 
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#3.2 Boot from TF card|Click here to read the instructions for System flashing]]
=== 3.2 系统烧写在SD(TF)卡上 ===
[[0005 MPS2242 2280 2280P(单SSD扩展板)#3.2 从TF卡启动|点击直达烧写方法说明]]


=== 3.3 系统烧写在SSD硬盘上 ===
=== 3.3 系统烧写在SSD硬盘上 ===
[[0005 MPS2242 2280 2280P(单SSD扩展板)#3.3 从SSD硬盘启动|点击直达烧写方法说明]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#3.3 Boot from SSD|Click here to read the instructions for System flashing]]


== '''四、树莓派OS下的AI(HAILO 8L)使用演示''' ==
== '''IV. AI (HAILO 8L) usage Demonstration on the Raspberry Pi OS''' ==


=== 4.1 概述 ===
=== 4.1 Overview ===
In various practical applications, the demand for camera image detection and recognition is gradually increasing, and there are many AI-based solutions available on the market. The solution demonstrated in this article involves the OV5647 camera, the MPSAI, and the HAILO 8L AI module paired with the Raspberry Pi 5.
In various practical applications, the demand for camera image detection and recognition is gradually increasing, and there are many AI-based solutions available on the market. The solution demonstrated in this article involves the OV5647 camera, the MPSAI, and the HAILO 8L AI module paired with the Raspberry Pi 5.


第71行: 第75行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_29.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_29.jpg


4.2.2 执行<code>sudo rpi-eeprom-update</code>,查看树莓派固件,确保树莓派的固件日期在2023年12月6日之后:
4.2.2 Run <code>sudo rpi-eeprom-update</code>to check the Raspberry Pi firmware and ensure that the firmware date is after December 6, 2023:


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_30.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_30.jpg


如上图所示,固件时间是2024年6月5日。
As shown in the above figure, the firmware date is June 5, 2024.


4.2.3 执行<code>sudo raspi-config</code>,根据下图依次选择对应选项:
4.2.3 Run <code>sudo raspi-config</code> ,select the corresponding options in sequence according to the following diagram:


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_31.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_31.jpg
第91行: 第95行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_36.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_36.jpg


选择完之后退出,系统会自动重启,如果没有自动重启,请手动执行 <code>sudo reboot</code> ,重启系统。
After making your selection and exiting, the system will automatically restart. If it does not restart automatically, please manually execute <code>sudo reboot</code> to restart the system.


=== 4.3 AI模块所需要的依赖安装 ===
=== 4.3 Install the depends required for the AI module ===
执行<code>sudo apt install hailo-all</code>,安装AI模块所需要的依赖安装:
Run <code>sudo apt install hailo-all</code>, install the depends required for the AI module:


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_37.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_37.jpg
第100行: 第104行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_38.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_38.jpg


完成后执行 <code>sudo reboot</code> ,重启系统,使这些设置生效。
After completing this, execute <code>sudo reboot</code> to restart the system and apply these settings.


执行<code>hailortcli fw-control identify</code>,如果出现以下输出则成功安装了HAILO 8L的依赖:
Run <code>hailortcli fw-control identify</code>, If the following output appears, it indicates that the depends for HAILO 8L have been successfully installed:


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_39.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_39.jpg


最后再执行<code>rpicam-hello -t 10s</code>,打开摄像头并出现预览窗口,确定摄像头正常。
Finally, execute <code>rpicam-hello -t 10s</code> to turn on the camera and bring up the preview window, ensuring that the camera is functioning normally.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_40.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_40.jpg


=== 4.4 图像识别检测 ===
=== 4.4 Image recognition and detection ===
执行:
Run:


<code>git clone --depth 1 <nowiki>https://github.com/raspberrypi/rpicam-apps.git</nowiki> ~/rpicam-apps</code>
<code>git clone --depth 1 <nowiki>https://github.com/raspberrypi/rpicam-apps.git</nowiki> ~/rpicam-apps</code>


克隆rpicam-apps库:
Clone the library of rpicam-apps:


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_41.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_41.jpg


克隆完成后,就可以开始进行图像的识别检测:
After cloning is completed, you can begin image recognition and detection:


<code>rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640</code>
<code>rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640</code>
第127行: 第131行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_43.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_43.jpg


'''<big>鉴于本开发板的测试需要在外网下载大量数据,为了方便用户进行测试,用户在购买本开发板后,可以联系我司获取已经配置完毕的树莓派OS镜像。</big>'''
'''<big>You should downloading a large amount of data from the internet out of China to use the testing of this development board, so users can contact our company after buying this development board to obtain a pre-configured Raspberry Pi OS image.</big>'''


== '''五、树莓派系统下使用SSD硬盘''' ==
== '''V. Using SSD in the Raspberry Pi OS''' ==
关于对SSD硬盘的基本操作,我们可以参考以下链接:
For basic operations on the SSD, we can refer to the following link:


[[0005 MPS2242 2280 2280P(单SSD扩展板)#4.1 SSD用作存储扩展|SSD用作存储扩展(树莓派OS下)]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#4.1 Use the SSD for storage expansion|Use the SSD for storage expansion (Raspberry Pi OS)]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#六、对SSD进行分区等操作|对SSD进行分区等操作]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#VI. Perform partitioning and other operations on the SSD|Perform partitioning and other operations on the SSD]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#cite ref-1|调整外设启动顺序]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#cite ref-1|Adjust the peripheral boot order]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#7.2 在PCIe Gen2下测试硬盘速度|安装硬盘测速软件hdparm]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#7.2 Test the SSD speed in PCIe Gen2 mode|Install the SSD speed testing software hdparm]]


关于如何测试SSD硬盘,我们可以参考以下链接:
For how to test the SSD, we can refer to the following link:


[[0008 MPS2.5G(SSD和2.5G以太网)#4.2 SSD硬盘测试|SSD硬盘测试(树莓派OS下)]]
[[0008 MPS2.5G(SSD和2.5G以太网)#4.2 SSD硬盘测试|SSD硬盘测试(树莓派OS下)]]


== '''六、Ubuntu系统下使用SSD硬盘''' ==
== '''VI. Using SSD in the Ubuntu system''' ==
关于对SSD硬盘的基本操作,我们可以参考以下链接,除了SSD用作存储扩展中与树莓派OS下操作略有不同,其余部分基本相同:
For basic operations on the SSD, we can refer to the following link, apart from the SSD being used for storage expansion, which operates slightly differently under Raspberry Pi OS, the rest is basically the same.


[[0005 MPS2242 2280 2280P(单SSD扩展板)#5.1 SSD用作存储扩展|SSD用作存储扩展(Ubuntu系统下)]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#5.1 Use the SSD for storage expansion|Use the SSD for storage expansion(Ubuntu system)]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#六、对SSD进行分区等操作|对SSD进行分区等操作]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#VI. Perform partitioning and other operations on the SSD|Perform partitioning and other operations on the SSD]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#cite ref-1|调整外设启动顺序]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#cite ref-1|Adjust the peripheral boot order]]


[[0005 MPS2242 2280 2280P(单SSD扩展板)#7.2 在PCIe Gen2下测试硬盘速度|安装硬盘测速软件hdparm]]
[[0005 MPS2242 2280 2280P(Single SSD Expansion Board)#7.2 Test the SSD speed in PCIe Gen2 mode|Install the SSD speed testing software hdparm]]


关于如何测试SSD硬盘,我们可以参考以下链接:
For how to test the SSD, we can refer to the following link:


[[0008 MPS2.5G(SSD和2.5G以太网)#5.2 SSD硬盘测试|SSD硬盘测试(Ubuntu系统下)]]
[[0008 MPS2.5G(SSD和2.5G以太网)#5.2 SSD硬盘测试|SSD硬盘测试(Ubuntu系统下)]]


== '''七、OpenWrt系统下使用SSD硬盘''' ==
== '''VII. Using SSD in the OpenWrt system''' ==
关于如何在OpenWrt系统下使用SSD硬盘,我们可以参考以下链接:
For how to use the SSD in the OpenWrt system, we can refer to the following link:


[[2001 CM4 Ultra(CM4核心板的扩展板)#5.5 SSD硬盘测试|SSD硬盘测试(OpenWrt系统下)]]
[[2001 CM4 Ultra(CM4核心板的扩展板)#5.5 SSD硬盘测试|SSD硬盘测试(OpenWrt系统下)]]


{{联系我们_图标}}
{{Contact_Us_icon}}
 
[http://wiki.mcuzone.com/index.php?title=0021_MPSAI_EN T]

2024年12月18日 (三) 13:35的最新版本

切换语言为中文

Keywords

Raspberry Pi 5, PCIe, Driver installation, Operation demonstration, 2230, 2242, 2280, NVMe SSD, SSD X1, AI, HAILO 8L, Camera, OV5647, Image Recognition, Optional auxiliary power supply

I. Introduction

II. Hardware Resources

1. Designed for the Raspberry Pi 5, it uses a 16-pin FPC to connect to the Raspberry Pi 5's PCIe interface.

2. The MPSTPU expansion board adds two PCIe interfaces via a PCIe Switch.

3. One PCIe extension M.2 E key interface, 2242 size, used for connecting the AI module HAilo8,with the official Raspberry Pi OS loading the driver.

4. One PCIe expanded M.2 M key slot, for connecting NVMe SSD (PCIe X1, Gen2 mode only). Supports 2230/2242/2280 size SSDs (defaulting to welded mounting posts for 2280 size). It does not support SSDs that use NGFF and SATA protocols.

5. The SSD can be used for data storage and system booting. When booting from the SSD, the Raspberry Pi official firmware needs to be version 2024.5.13 or later.

6. The 40-pin GPIO section adopts an unobstructed design on the top. It can be connected via DuPont cable, without affecting the use of the Raspberry Pi 5's own GPIO pins.

7. Gold immersion PCB process, lead-free production, certified by UL, compliant with ROHS standards, and has a fire rating of 94V-0.

8. It uses four M2.5 mounting holes that align with the Raspberry Pi 5 mounting holes.

9. It is compatible with an optional aluminum alloy enclosure.

0021_MPSAI_01.jpg

III. System flashing and setting

3.1 Overview

This document uses the Raspberry Pi OS, Ubuntu system and OpenWrt system for testing.

The version of the Raspberry Pi OS is: 2024-07-04-raspios-bookworm-arm64.img.xz

You can download the Raspberry Pi OS in:

https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

The version of the Ubuntu system is: ubuntu-24.04-preinstalled-desktop-arm64+raspi.img.xz

You can download the Ubuntu system in:

https://ubuntu.com/download/raspberry-pi

The version of the OpenWrt system is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-linux-6.1.100-20240805.img.gz

3.2 System flashed onto the SD (TF) card

Click here to read the instructions for System flashing

3.3 系统烧写在SSD硬盘上

Click here to read the instructions for System flashing

IV. AI (HAILO 8L) usage Demonstration on the Raspberry Pi OS

4.1 Overview

In various practical applications, the demand for camera image detection and recognition is gradually increasing, and there are many AI-based solutions available on the market. The solution demonstrated in this article involves the OV5647 camera, the MPSAI, and the HAILO 8L AI module paired with the Raspberry Pi 5.

0021_MPSAI_02.jpg

Note: The operation requires a stable internet connection to the regions out of China (you may need to find your own method). Otherwise, many files may not download or may only partially download, which could ultimately lead to the code failing to run.

4.2 Update system

Note: The following operational steps apply whether the system is booted from a TF card or an SSD.

4.2.1 Boot the Raspberry Pi OS and run commands in the terminal:

sudo apt update

sudo apt full-upgrade

0005_MPS2242_2280_28.jpg

0005_MPS2242_2280_29.jpg

4.2.2 Run sudo rpi-eeprom-updateto check the Raspberry Pi firmware and ensure that the firmware date is after December 6, 2023:

0005_MPS2242_2280_30.jpg

As shown in the above figure, the firmware date is June 5, 2024.

4.2.3 Run sudo raspi-config ,select the corresponding options in sequence according to the following diagram:

0005_MPS2242_2280_31.jpg

0005_MPS2242_2280_32.jpg

0005_MPS2242_2280_33.jpg

0005_MPS2242_2280_34.jpg

0005_MPS2242_2280_35.jpg

0005_MPS2242_2280_36.jpg

After making your selection and exiting, the system will automatically restart. If it does not restart automatically, please manually execute sudo reboot to restart the system.

4.3 Install the depends required for the AI module

Run sudo apt install hailo-all, install the depends required for the AI module:

0005_MPS2242_2280_37.jpg

0005_MPS2242_2280_38.jpg

After completing this, execute sudo reboot to restart the system and apply these settings.

Run hailortcli fw-control identify, If the following output appears, it indicates that the depends for HAILO 8L have been successfully installed:

0005_MPS2242_2280_39.jpg

Finally, execute rpicam-hello -t 10s to turn on the camera and bring up the preview window, ensuring that the camera is functioning normally.

0005_MPS2242_2280_40.jpg

4.4 Image recognition and detection

Run:

git clone --depth 1 https://github.com/raspberrypi/rpicam-apps.git ~/rpicam-apps

Clone the library of rpicam-apps:

0005_MPS2242_2280_41.jpg

After cloning is completed, you can begin image recognition and detection:

rpicam-hello -t 0 --post-process-file ~/rpicam-apps/assets/hailo_yolov6_inference.json --lores-width 640 --lores-height 640

0005_MPS2242_2280_42.jpg

0005_MPS2242_2280_43.jpg

You should downloading a large amount of data from the internet out of China to use the testing of this development board, so users can contact our company after buying this development board to obtain a pre-configured Raspberry Pi OS image.

V. Using SSD in the Raspberry Pi OS

For basic operations on the SSD, we can refer to the following link:

Use the SSD for storage expansion (Raspberry Pi OS)

Perform partitioning and other operations on the SSD

Adjust the peripheral boot order

Install the SSD speed testing software hdparm

For how to test the SSD, we can refer to the following link:

SSD硬盘测试(树莓派OS下)

VI. Using SSD in the Ubuntu system

For basic operations on the SSD, we can refer to the following link, apart from the SSD being used for storage expansion, which operates slightly differently under Raspberry Pi OS, the rest is basically the same.

Use the SSD for storage expansion(Ubuntu system)

Perform partitioning and other operations on the SSD

Adjust the peripheral boot order

Install the SSD speed testing software hdparm

For how to test the SSD, we can refer to the following link:

SSD硬盘测试(Ubuntu系统下)

VII. Using SSD in the OpenWrt system

For how to use the SSD in the OpenWrt system, we can refer to the following link:

SSD硬盘测试(OpenWrt系统下)

Contact Us

0001_x.jpg 0002_fb.jpg 0004_ytb.jpg 0003_bb.jpg 0005_qq.jpg QQ:8204136

Email: mcuzone@vip.qq.com

Tel: +86(0)13957118045

If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!

Copyright 2004-2025 Wildchip

T