0005 MPS2242 2280 2280P(Single SSD Expansion Board):修订间差异

来自Mcuzone Wiki
(创建页面,内容为“== '''关键词''' == 树莓派5、Raspberry Pi 5、2230、2242、2280、Pi OS、Ubuntu、NVMe SSD、PCIe、固态硬盘 X1、Gen2、Gen3、AI、HAILO 8L、摄像头、OV5647、图像检测、图像识别 == '''一、简介''' == MPS2242及MPS2280是针对树莓派5设计的支持NVMe协议的SSD扩展板,两者的区别是分别支持2242和2280尺寸的SSD。可从SSD启动系统,也可以从TF卡启动系统SSD仅做存储用途。 == '''二、硬件…”)
 
 
(未显示同一用户的16个中间版本)
第1行: 第1行:
== '''关键词''' ==
[[0005 MPS2242 2280 2280P(单SSD扩展板)|切换语言为中文]]
树莓派5、Raspberry Pi 5、2230、2242、2280、Pi OS、Ubuntu、NVMe SSD、PCIe、固态硬盘 X1、Gen2、Gen3、AI、HAILO 8L、摄像头、OV5647、图像检测、图像识别


== '''一、简介''' ==
== '''Keywords''' ==
MPS2242及MPS2280是针对树莓派5设计的支持NVMe协议的SSD扩展板,两者的区别是分别支持2242和2280尺寸的SSD。可从SSD启动系统,也可以从TF卡启动系统SSD仅做存储用途。
Raspberry Pi 5, 2230, 2242, 2280, Pi OS, Ubuntu, NVMe SSD, PCIe, SSD X1, Gen2, Gen3, AI、HAILO 8L, Camera, OV5647, Image Detection, Image Recognition, Optional auxiliary power supply


== '''二、硬件资源''' ==
== '''I. Introduction''' ==
2.1 分2242和2280两个版本的HAT,均支持NVMe协议 SSD固态硬盘;<u>注意:不支持NGFF和SATA协议的盘;</u>
The MPS2242, MPS2280 and MPS2280P are SSD expansion boards designed for the Raspberry Pi 5 that support the NVMe protocol. The difference between there is that they support SSDs of different sizes: the MPS2242 supports 2242-sized SSDs, and the MPS2280 supports 2280-sized SSDs. The system can boot from the SSD, or it can boot from the TF card while using the SSD solely for storage purposes. The MPS2280P adds an auxiliary power supply interface for the hard drive to the MSP2280, capable of providing up to 3A of power


MPS2242支持2230/2242尺寸的固态硬盘(默认焊接2242固定柱);
== '''II. Hardware Resources''' ==
2.1 There are two versions: one for 2242 and one for 2280, the installation position is on the HAT, and both supporting NVMe protocol SSDs. <u>Note: SSD that use the NGFF and SATA protocols are not supported.</u>


MPS2280版本支持2230/2242/2280尺寸的固态硬盘(默认焊接2280固定柱)
The MPS2242 supports 2230/2242 size SSDs (defaulting to welded mounting posts for 2242 size).


2.2 采用0.5mm间距16Pin PCIe2.0 x1接口连接;
The MPS2280/MPS2280P supports 2230/2242/2280 size SSDs (defaulting to welded mounting posts for 2280 size).


2.3 采用1.5A高效DC-DC电路,可支持绝大部分固态盘(受限于x1接口,固态盘的实际峰值功耗仅为额定功耗的1/3);
2.2 It uses a 0.5mm pitch 16-pin PCIe 2.0 x1 interface for connection.


2.4 一盏5V电源指示灯,一盏硬盘工作状态指示灯;
2.3 MPS2242/MPS2280 uses a 1.5A high-efficiency DC-DC circuit, which can support most SSDs (however, due to the x1 interface, the actual peak power consumption of the SSD is only one-third of its rated power consumption).


2.5 采用内凹开槽设计,40Pin上方无遮挡不影响杜邦线连接;
2.4 One 5V power indicator light and one hard drive activity status indicator light.


2.6 预留CSI/DSI出线槽;
2.5 It features an indented slot design, with no obstruction above the 40-pin connector, ensuring that DuPont cable connections are not affected.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_60.jpg
2.6 Reserve CSI/DSI cable slots.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_61.jpg
2.7 Gold immersion PCB process, lead-free production, certified by UL, compliant with ROHS standards, and has a fire rating of 94V-0.


树莓派端:
2.8 The MPS2280P uses a 3A high-efficiency DC-DC circuit. The SSD can draw power from the PCIe interface, or it can obtain 3A power through a 2.54mm 2-pin connector and a USB-C auxiliary power interface. The auxiliary power supply supports hot-swapping and meets the power requirements for most NVMe SSD.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_27.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_63.jpg


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_62.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_73.jpg


== '''三、系统烧写及设置''' ==
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_66.jpg


=== 3.1 概述 ===
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_76.jpg
本文档采用树莓派OS及Ubuntu系统进行测试,


其中树莓派OS的版本为2024-07-04-raspios-bookworm-arm64.img.xz,
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_75.jpg


Ubuntu系统的版本为ubuntu-24.04-preinstalled-desktop-arm64+raspi.img.xz。
MPS2280P辅助供电:


树莓派OS下载地址:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_74.jpg
 
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_68.jpg
 
== '''III. System flashing and setting''' ==
 
=== 3.1 Overview ===
This document uses the Raspberry Pi OS and Ubuntu system for testing.
 
The version of the Raspberry Pi OS is: 2024-07-04-raspios-bookworm-arm64.img.xz,
 
The version of the Ubuntu system is: ubuntu-24.04-preinstalled-desktop-arm64+raspi.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


Ubuntu系统下载地址:
You can download the Ubuntu system in:


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


=== 3.2 从TF卡启动 ===
=== 3.2 Boot from TF card ===
 
==== 3.2.1 Use the Imager to flash the system ====
First, install the Imager on the Windows. You can download it in: <nowiki>https://www.raspberrypi.com/software/</nowiki>


==== 3.2.1 使用树莓派镜像烧录器烧写 ====
Insert the TF card into the card reader after installation, plug the card reader into the PC's USB port, and then open the software.
首先在WIndows端安装树莓派镜像烧录器,下载地址:https://www.raspberrypi.com/software/


安装完毕后将TF卡插入读卡器,读卡器插入PC的USB口,然后打开软件:
Raspberry Pi Device: Choose Raspberry Pi 5;


Raspberry Pi Device:选择Raspberry Pi 5;
Operating System:


请选择需要写入的操作系统:选择Raspberry Pi OS(64-bit),为从树莓派官网下载系统镜像烧写(需联网);选择Use Custom,则需要自行选择硬盘上已经下载的系统镜像(无需联网);
Choose Raspberry Pi OS(64-bit), to flash the system image downloaded from the Raspberry Pi official website (internet connection required).


储存卡:选择所需烧入的TF卡(即插在PC的USB接口的卡);
Choose Use Custom, to flash the system image already downloaded onto the hard drive (no internet connection required).
 
Storge: Select the TF card that needs to be flashed (i.e., the card inserted into the PC's USB port).


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


选择完毕后按“NEXT”,建议点击“编辑设置”,将一些参数预设置进烧写软件,之后在系统启动时就不必再次设置,便于使用。
After making your selection, press "NEXT." It is recommended to click "Edit Settings" to pre-set some parameters in the flashing software. This way, you won't need to set them again when the system starts up, making it easier to use.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_02.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_02.jpg
第70行: 第86行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_03.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_03.jpg


需要使用预设置的按“是”,不需要使用预设置的按“不”,进入下一页,点击“是”,就开始烧写及验证完整性,烧写完毕后按提示取下卡即可。
If you need to use the pre-set settings, press "Yes"; if you do not need to use the pre-set settings, press "No". Proceed to the next page, and click "Yes" to start the flashing and verification process. After the flashing is complete, follow the prompts to remove the card.


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


以上介绍的是烧写树莓派OS,烧写Ubuntu系统也是用类似的操作,只是在“请选择需要写入的操作系统”时,需要选择Use Custom,然后选择预先下载的Ubuntu系统镜像即可。
The above instructions describe how to flash the Raspberry Pi OS. For flashing the Ubuntu system or the OpenWrt system, similar operations are used; when you reach the step "Operating System", you need to select Use Custom, and then choose the pre-downloaded image.
 
==== 3.2.2 Use the balenaEtcher to flash the system ====
First, install the balenaEtcher on the Windows. You can download it in: https://etcher.balena.io/#download-etcher


==== 3.2.2 使用balenaEtcher烧写 ====
Insert the TF card into the card reader after installation, plug the card reader into the PC's USB port, and then open the software.
首先在WIndows端安装balenaEtcher,将TF卡插入读卡器,读卡器插入PC的USB口,然后打开软件:


从文件烧录:选择预先下载的树莓派OS或者Ubuntu系统镜像;
Flash from file: Select the pre-downloaded Raspberry Pi OS or Ubuntu system image.


选择目标磁盘:选择所需烧入的TF卡(即插在PC的USB接口的卡);
Select target: Select the TF card that needs to be flashed (i.e., the card inserted into the PC's USB port).


然后点击“现在烧录!”,就开始烧录了,等待烧录完毕即可。
Then click "Flash!" to start the process, and wait for it to complete.


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


==== 3.2.3 启动系统 ====
==== 3.2.3 Boot the system ====
将TF卡从读卡器中取下,塞进树莓派开发版的TF卡卡槽,上电后即可进入系统。
Remove the TF card from the card reader, insert it into the TF card slot of the Raspberry Pi, and power the board on to enter the system.


=== 3.3 从SSD硬盘启动 ===
=== 3.3 Boot from SSD ===
树莓派仅支持PCIe NVMe协议接口的SSD。
The Raspberry Pi only supports SSDs with PCIe NVMe protocol interface.


3.3.1 在TF卡上烧写树莓派OS镜像,然后从TF卡启动树莓派OS。
3.3.1 Flash the Raspberry Pi OS image onto the TF card, and then boot the Raspberry Pi OS from the TF card.


3.3.2 设置启动顺序并使能SSD。打开树莓派OS的终端,输入<code>sudo rpi-eeprom-config --edit</code>,修改 BOOT_ORDER为:
3.3.2 Set the boot order and enable the SSD. Open the terminal on the Raspberry Pi OS, enter <code>sudo rpi-eeprom-config --edit</code>, and modify the BOOT_ORDER to:


<code>BOOT_ORDER=0xf416</code>
<code>BOOT_ORDER=0xf416</code>


修改或添加PCIE_PROBE为:
Modify or add PCIE_PROBE to:


<code>PCIE_PROBE=1</code>
<code>PCIE_PROBE=1</code>


然后按Ctrl+X,保存退出并重启。
Then press Ctrl+X, save and exit, and reboot.


注意1:这个文件编辑后保存在树莓派开发板的E<sup>2</sup>PRom中,因此如果不更换树莓派开发板,只是更换系统的话,是不需要再次编辑的。
Note 1: This file is saved in the E<sup>2</sup>PROM of the Raspberry Pi board after editing. Therefore, if you do not change the Raspberry Pi board and only change the system, you do not need to edit it again.


注意2:不同时期出货的树莓派5出厂设置并不相同,2024年出货的已经都使能固态盘启动。
Note 2: The factory settings of the Raspberry Pi 5 vary depending on the shipment period; those shipped in 2024 have already enabled SSD booting.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_06.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_06.jpg
第113行: 第131行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_07.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_07.jpg


其中启动顺序的说明如下:<ref>1</ref>
The explanation for the boot order is as follows: <ref>1</ref>


http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_24.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_24.png


即上述的BOOT_ORDER=0xf416表示启动顺序为NVMe(SSD)、SD(TF)卡、U盘,大家可以按照自己的需求设置启动顺序。
The <code>BOOT_ORDER=0xf416</code> indicates the boot order is NVMe (SSD), SD (TF) card, and USB drive. You can set the boot order according to your own requirements.
 
 
3.3.3 将SSD插入一个M.2(PCIe NVMe协议)转USB读卡器,将其接到PC上,使用与在TF卡上烧写镜像同样的方法烧写系统镜像到SSD,然后将SSD取下,插回扩展板,并上电启动系统(可以取下原本用来启动系统的TF卡)即可。
 


另一种烧写方法是直接在树莓派OS下烧写,需要准备一个U盘,将树莓派OS的镜像拷入U盘,将启动顺序设置成SD(TF)卡为第一位,NVMe(SSD)为第二位。然后将装好系统的TF卡、放有树莓派OS安装镜像的U盘,以及需要烧写的SSD都插上板子。
3.3.3 Insert the SSD into an M.2 (PCIe NVMe protocol) to USB adapter, connect it to the PC, and use the same method as flashing an image to a TF card to flash the system image onto the SSD. Then remove the SSD, plug it back into the expansion board, and power on the system (you can remove the TF card originally used to boot the system).


3.3.4 Another method of flashing is to do it directly in the Raspberry Pi OS. You will need to prepare a USB drive and copy the Raspberry Pi OS image onto the USB drive. Set the boot order with the SD (TF) card as the first priority and the NVMe (SSD) as the second priority. Then insert the TF card with the installed system, the USB drive containing the Raspberry Pi OS installation image, and the SSD that needs to be flashed into the board.


3.3.4 启动系统,此时系统从TF卡启动。最新的树莓派OS中包含有Imager,如果树莓派OS中没有Imager软件,可用下面的命令进行安装:
Boot the system; at this time, the system boots from the TF card. The latest Raspberry Pi OS includes Imager. If Imager is not included in your Raspberry Pi OS, you can install it using the following command:


<code>sudo apt install rpi-imager</code>
<code>sudo apt install rpi-imager</code>


在图形界面下将其打开。
Open it in the GUI:


http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_25.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_25.png


http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_26.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_26.png
3.3.7 在烧写界面中,选好device、OS、storage,开始烧写,注意,此时的storage需要选择SSD,而不能选择U盘。


在烧写界面中,选好device、OS、storage,开始烧写,注意,此时的storage需要选择SSD,而不能选择U盘。
3.3.7 In the flashing interface, select the device, OS, and storage, and start the flashing process. Note that the storage should be set to SSD at this point and not a USB drive.


http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_27.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_27.png


在烧写中会跳出两次需要输入密码的界面,请输入系统的登录密码,等待烧写完毕后,关机,拔掉TF卡和U盘,再次重启,就是从SSD启动了。
During the flashing process, a prompt to enter a password will appear twice. Please enter the system login password. After the flashing process is complete, shut down the system, remove the TF card and USB drive, and restart again, it will boot from the SSD.


http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_28.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_28.png
第149行: 第163行:
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_30.png
http://www.mcuzone.com/wiki/0002_MPS2280iPoE/MPS2280iPoE_30.png


== '''四、树莓派系统下使用演示''' ==
== '''IV. Demonstration of using the Raspberry Pi OS''' ==


=== 4.1 SSD用作存储扩展 ===
=== 4.1 Use the SSD for storage expansion ===
4.1.1 把树莓派开发板设置为从TF卡启动,将一块SSD硬盘插入扩展板的M.2接口,从TF卡启动树莓派OS。
4.1.1 Set the Raspberry Pi to boot from the TF card, insert an SSD hard drive into the M.2 slot on the expansion board, and boot the Raspberry Pi OS from the TF card.


4.1.2 在树莓派OS中,打开File Manager,我们可以看到SSD的分区。如下图所示:
4.1.2 In the Raspberry Pi OS, open the File Manager, and we can see the partitions of the SSD. As shown in the following figure:


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


如果需要对SSD操作,请点击分区图标,此时需要输入系统密码,然后点击“Authenticate”,授权成功后即可对SSD进行操作:
If you need to operate on the SSD, click on the partition icon. At this point, you need to enter the system password and then click "Authenticate." After successful authorization, you can proceed to operate on the SSD:


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


此时回到桌面,就可以看到SSD分区的快捷图标:
When you return to the desktop, you can see the shortcut icon for the SSD partition:


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


同时在终端中输入<code>df</code>,也可以看到SSD分区,我们可以将这个SSD作为存储设备。
At the same time, by entering <code>df</code> in the terminal, we can also see the SSD partitions, and we can use this SSD as a storage device.


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


=== 4.2 SSD用于系统启动 ===
=== 4.2 Use the SSD for system boot ===
4.2.1 将树莓派OS烧写进SSD硬盘,然后拔掉TF卡,或者在启动顺序设置中,把从NVMe(SSD)启动设置成第一位。
4.2.1 Flash the Raspberry Pi OS onto the SSD, then remove the TF card, or in the boot order settings, set booting from NVMe (SSD) as the first priority.


4.2.2 将烧写好系统的进SSD硬盘插入扩展板的M.2接口,启动树莓派OS。
4.2.2 Insert the SSD with the flashed system into the M.2 slot on the expansion board, and boot the Raspberry Pi OS.


4.2.3 打开File Manager,我们可以看到在右下角显示剩余空间为106.3G(这块SSD硬盘的总容量为120G),同时在终端中输入<code>df</code>,也可以看到SSD被分成了两个分区,nvme0n1p1被用作系统分区,nvme0n1p2被用作存储分区。
4.2.3 Open the File Manager, and we can see that the remaining space displayed in the lower right corner is 106.3GB (the total capacity of this SSD is 120GB). At the same time, by entering `df` in the terminal, you can also see that the SSD is divided into two partitions, with nvme0n1p1 used as the system partition and nvme0n1p2 used as the storage partition.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_12.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_12.jpg
第181行: 第195行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_13.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_13.jpg


== '''五、Ubuntu系统下使用演示''' ==
== '''V. Demonstration of using the Ubuntu system''' ==


==== 5.1 SSD用作存储扩展 ====
=== 5.1 Use the SSD for storage expansion ===
5.1.1 把树莓派开发板设置为从TF卡启动,将一块SSD硬盘插入扩展板的SSD M.2接口,从TF卡启动Ubuntu系统。
5.1.1 Set the Raspberry Pi to boot from the TF card, insert an SSD hard drive into the M.2 slot on the expansion board, and boot the Ubuntu system from the TF card.


5.1.2 在Ubuntu系统中,与树莓派OS不同的是,我们不需要输入系统密码就可以对SSD进行操作。我们进入Files,点击Other Locations,可以看到SSD的分区(500GB Volume,挂载到/dev/nvme0n1p1)。如下图所示:
5.1.2 In the Ubuntu system, unlike the Raspberry Pi OS, we do not need to enter a system password to perform operations on the SSD. We go into Files, click on Other Locations, and we can see the SSD partition (500GB Volume, mounted to /dev/nvme0n1p1). As shown in the following figure:


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


'''''注意:如果要在终端中对SSD硬盘进行操作,必须按照上面的步骤先进一次SSD文件夹。'''''
'''''Note: If you need to perform operations on the SSD in the terminal, you must enter the SSD folder following the steps above first.'''''


5.1.3 同时在桌面,也可以看到SSD分区的快捷图标:
5.1.3 When you return to the desktop, you can see the shortcut icon for the SSD partition:


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


在终端中输入<code>lsblk</code>,也可以看到这个SSD分区,我们可以将这个SSD作为存储设备。
At the same time, by entering lsblk in the terminal, we can also see the SSD partitions, and we can use this SSD as a storage device.


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


==== 5.2 SSD用于系统启动 ====
=== 5.2 Use the SSD for system boot ===
5.2.1 将Ubuntu系统烧写进SSD硬盘,然后拔掉TF卡,或者在启动顺序设置中,把从NVMe(SSD)启动设置成第一位。
5.2.1 Flash the Ubuntu system onto the SSD, then remove the TF card, or in the boot order settings, set booting from NVMe (SSD) as the first priority.


5.2.2 将烧写好系统的进SSD硬盘插入扩展板的SSD M.2接口,启动Ubuntu系统。
5.2.2 Insert the SSD with the flashed system into the M.2 slot on the expansion board, and boot the Ubuntu system.


5.2.3 我们进入Files,点击Other Locations,可以看到SSD的分区。在终端中输入<code>df</code>,可以看到SSD被分成了两个分区,nvme0n1p1被用作系统分区,nvme0n1p2被用作存储分区。
5.2.3 We go into Files, click on Other Locations, and we can see the SSD partition. Enter <code>df</code> in the terminal, and you can see that the SSD is divided into two partitions: nvme0n1p1 is used as the system partition, and nvme0n1p2 is used as the storage partition.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_17.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_17.jpg
第211行: 第225行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_18.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_18.jpg


== '''六、对SSD进行分区等操作''' ==
== '''VI. Perform partitioning and other operations on the SSD''' ==


=== 6.1 概述 ===
=== 6.1 Overview ===
本章以树莓派OS为例,介绍对安装在MPS2242/2280的SSD进行分区、挂载等操作。
This chapter uses Raspberry Pi OS as an example to introduce operations such as partitioning and mounting an SSD installed in the MPS2242/2280.


=== 6.2 使用GParted软件对SSD进行分区 ===
=== 6.2 Use the GParted to partition the SSD ===
6.2.1 下载GParted软件。打开树莓派OS终端,输入以下命令,安装GParted软件。
6.2.1 Open the Raspberry Pi OS terminal and enter the following command to install the GParted:


<code>sudo apt install gparted</code>
<code>sudo apt install gparted</code>
第223行: 第237行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_77.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_77.jpg


6.2.2 打开GParted软件,选择相应SSD。
6.2.2 Open the GParted and select the corresponding SSD.


打开GParted软件的命令是<code>sudo gparted</code>,打开后为图形化界面,我们在右上角的下拉菜单中选择SSD。
The command to open the GParted software is <code>sudo gparted</code>. After opening, it presents a graphical interface, and we select the SSD from the drop-down menu in the upper right corner.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_23.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_23.jpg
第231行: 第245行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_24.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_24.jpg


6.2.3 在对SSD进行分区前,首先要对该分区进行取消原来的挂载,在该分区上点右键,选择“Unmount”,取消挂载后,再次在此分区上点右键,选择“Delete”,删除分区。本SSD上有两个分区,对另一个分区也是如此操作。
6.2.3 Before partitioning the SSD, it is necessary to unmount the original partition. Right-click on the partition and select "Unmount" to unmount it. After unmounting, right-click on the partition again and select "Delete" to delete the partition. This SSD has two partitions, and the same operation should be performed on the other partition.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_25.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_25.jpg
第237行: 第251行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_26.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_26.jpg


6.2.4 删除分区完毕后,我们在菜单中选择“Edit - Apply All Operations”,接受上述所有的操作。GParted类似于DiskGenius,在没有Apply之前,是不会对分区进行真实的操作的。
6.2.4 After deleting the partitions, we select "Edit - Apply All Operations" from the menu to apply all the operations. GParted is similar to DiskGenius, it does not perform actual operations on the partition until you apply the changes.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_27.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_27.jpg
第245行: 第259行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_29.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_29.jpg


6.2.5 然后在空白的SSD上点击右键,选择“New”,建立新分区,在这里我们建立了两个分区,格式为exfat,操作如下所示。
6.2.5 Then right-click on the blank SSD and select "New" to create a new partition. We created two partitions, formatted as exfat. The operations are as follows:


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_30.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_30.jpg
第261行: 第275行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_36.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_36.jpg


这样我们就完成了对SSD的分区。
This completes the partitioning of the SSD.


=== 6.3 挂载分区 ===
=== 6.3 Mount the partition ===
6.3.1 此时SSD已经分为了两个区,这两个区可以在Windows下进行操作,但Linux和Windows不一样,需要对新建的分区进行挂载,挂载完毕后才能操作。我们首先用命令<code>lsblk</code>查看分区信息,可见新建的两个分区,名字分别为nvme0n1p1和nvme0n1p2。
6.3.1 Now, the SSD has been divided into two partitions. These partitions can be managed under Windows, but the process differs from Linux, where the newly created partitions need to be mounted before they can be used. First, we use the command lsblk to view the partition information. The two newly created partitions' name are nvme0n1p1 and nvme0n1p2.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_37.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_37.jpg


然后我们依次输入以下命令,建立挂载点:
Then we enter the following commands in sequence to create the mount points:


<code>sudo mkdir /ssd1</code>
<code>sudo mkdir /ssd1</code>
第274行: 第288行:
<code>sudo mkdir /ssd2</code>
<code>sudo mkdir /ssd2</code>


6.3.2 查看分区UUID,我们在树莓派终端中输入命令<code>sudo blkid</code>,如图所示,两个SSD分区的UUID分别是769F-F2E1和77F0-F2E1,将这两个值记录下来。
6.3.2 We enter the command <code>sudo blkid</code> in the terminal to view the partition UUIDs. As shown in the figure, the UUIDs of the two SSD partitions are 769F-F2E1 and 77F0-F2E1. Record these values.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_38.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_38.jpg


6.3.3 在树莓派终端中输入命令<code>sudo nano /etc/fstab</code>,在文件的末尾加入两行代码:
6.3.3 Enter the command <code>sudo nano /etc/fstab</code>in the terminal. Add two lines of code at the end of the file:


<code>UUID=769F-F2E1 /ssd1 exfat defaults,umask=000,gid=1000 0 2</code>
<code>UUID=769F-F2E1 /ssd1 exfat defaults,umask=000,gid=1000 0 2</code>
第288行: 第302行:
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_40.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_40.jpg


保存后退出,然后重启系统,在树莓派终端中输入<code>lsblk</code>,可以看见nvme0n1p1和nvme0n1p2分别被挂载到ssd1和ssd2下。
Save and exit, then restart the system, and enter <code>lsblk</code> in the Raspberry Pi terminal. You can see that nvme0n1p1 and nvme0n1p2 are mounted under ssd1 and ssd2.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_42.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_42.jpg


此时我们也可以在文件目录的根目录下看到ssd1和ssd2两个目录,分别代表SSD上的两个分区,我们可以对这两个文件夹进行操作,这样就完成了分区的挂载。
Now, we can also see two directories, ssd1 and ssd2, at the root of the file directory, each representing one of the two partitions on the SSD. We can perform operations on these two folders, thus completing the mounting of the partitions.


http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_41.jpg
http://www.mcuzone.com/wiki/0003_MPS2280D/MPS2280D_41.jpg


== '''七、使用hdparm对SSD硬盘进行测速''' ==
== '''VII. Use hdparm to test speed of the SSD''' ==


=== 7.1 概述 ===
=== 7.1 Overview ===
树莓派5支持系统运行在 PCIe Gen2和 PCIe Gen3两种模式下,本章以树莓派OS为例,分别测试在PCIe Gen2和 PCIe Gen3两种模式下,SSD硬盘的运行速度。
Raspberry Pi 5 supports system operation in both PCIe Gen2 and PCIe Gen3 modes. This chapter uses Raspberry Pi OS as an example to test the SSD drive's performance under both PCIe Gen2 and PCIe Gen3 modes.


=== 7.2 在PCIe Gen2下测试硬盘速度 ===
=== 7.2 Test the SSD speed in PCIe Gen2 mode ===
7.2.1 树莓派OS的默认配置是运行在PCIe Gen2下的,因此这里不需要改变系统配置。
7.2.1 The default configuration for Raspberry Pi OS is to operate in PCIe Gen2 mode, so there is no need to change the system configuration here.


7.2.2 安装硬盘测速软件hdparm。在树莓派终端下运行:
7.2.2 Install the SSD speed testing software hdparm. Enter the following command in the terminal:


<code>sudo apt install hdparm</code>
<code>sudo apt install hdparm</code>
第310行: 第324行:
http://www.mcuzone.com/wiki/0004_MPS2280Bi/0004_MPS2280Bi_05.jpg
http://www.mcuzone.com/wiki/0004_MPS2280Bi/0004_MPS2280Bi_05.jpg


7.3.3 在树莓派终端下运行<code>df</code>,查看SSD分区名为nvme0n1p1:
7.3.3 Run <code>df</code> in the terminal to check the SSD partition name, which is nvme0n1p1:


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


运行命令,可多次运行,测试多次硬盘速度:
Run the command, it can be run multiple times to test the disk speed repeatedly:


<code>sudo hdparm -t /dev/nvme0n1p1</code>
<code>sudo hdparm -t /dev/nvme0n1p1</code>
第320行: 第334行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_20.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_20.jpg


可见此测试硬盘在PCIe Gen2下的运行速度为450MB/s左右。
It can be seen that the test disk operates at a speed of about 450MB/s in PCIe Gen2 mode.


=== 7.3 在PCIe Gen3下测试硬盘速度 ===
=== 7.3 Test the SSD speed in PCIe Gen3 mode ===
7.3.1 在树莓派终端中输入<code>sudo nano /boot/firmware/config.txt</code>,在最后一行加入下列代码:
7.3.1 In the Raspberry Pi terminal, enter<code>sudo nano /boot/firmware/config.txt</code>, and add the following line at the end:


<code>dtparam=pciex1_gen=3</code>
<code>dtparam=pciex1_gen=3</code>
第331行: 第345行:
http://www.mcuzone.com/wiki/0004_MPS2280Bi/0004_MPS2280Bi_03.jpg
http://www.mcuzone.com/wiki/0004_MPS2280Bi/0004_MPS2280Bi_03.jpg


保存后退出并重启系统,这样就切换到了PCIe Gen3。
Save and exit, then restart the system; this will switch it to PCIe Gen3 mode.


7.3.2 使用上节介绍的方法,运行命令,可多次运行,测试多次硬盘速度:
7.3.2 Using the method described in the previous section, run the command, it can be run multiple times to test the disk speed repeatedly:


<code>sudo hdparm -t /dev/nvme0n1p1</code>
<code>sudo hdparm -t /dev/nvme0n1p1</code>
第339行: 第353行:
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_21.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_21.jpg


可见此测试硬盘在PCIe Gen3下的运行速度为880MB/s左右。
It can be seen that the test disk operates at a speed of about 880MB/s in PCIe Gen3 mode.


=== 7.4 结论 ===
=== 7.4 Conclusion ===
PCIe Gen2的理论带宽是5Gbps,PCIe Gen3的理论带宽是8Gbps。对比PCIe Gen3下和PCIe Gen2下的测试结果,可见在PCIe Gen3下,因为带宽的影响,SSD硬盘的运行速度有所提高。
The theoretical bandwidth of PCIe Gen2 mode is 5 Gbps, and the theoretical bandwidth of PCIe Gen3 mode is 8 Gbps. Comparing the test results under PCIe Gen3 mode with those under PCIe Gen2 mode, it is evident that under PCIe Gen3 mode, due to the impact of bandwidth, the operating speed of the SSD has improved.


'''''注意:硬盘运行速度受硬盘质量、硬盘上的文件存储情况等多种因素影响,以上测试结果仅供参考,不作为实际产品的最终参数。'''''
'''''Note: The disk operation speed is affected by various factors, including the quality of the disk and the file storage situation on the disk. The above test results are for reference only and do not represent the final specifications of the actual product.'''''


== '''八、Ai模块(HAILO 8L)在MPS2242上的使用演示''' ==
== '''VIII. Demonstration of AI module (HAILO 8L) usage on the MPS2242''' ==


=== 8.1 概述 ===
=== 8.1 Overview ===
在各种实际应用的场合中,人们对于摄像头图像检测识别的需求逐渐增加,市面上也有许多利用AI的解决方案,本文所演示的方案是树莓派5搭配OV5647摄像头、MPS2242和HAILO 8L AI模块在树莓派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 MPS2242, and the HAILO 8L AI module paired with the Raspberry Pi 5.


此操作演示同时也适用于我们司所有树莓派5的SSD相关的PCIE转接板,包括MPS2242-POE、MPS2280、MPS2280P、MPS2280Bi、MPS2280-POE、MPS2280D、MPS2.5G、MPSAI、MPSD2.5GD等。
This demonstration also applies to all Raspberry Pi 5 SSD-related PCIe adapter boards from our company, including the MPS2242-POE, MPS2280, MPS2280P, MPS2280Bi, MPS2280-POE, MPS2280D, MPS2.5G, MPSAI, MPSD2.5GD.


(另外我司树莓派CM4扩展板上其它带CSI接口+M.2 SSD接口的板子均可使用,如CM4_SSD扩展板、CM4_3PCIE扩展板、CM4_Ultra扩展板、CM4_SSD+WiFi扩展板、CM4_SSD+双以太网、CM4_NAS等。)
(Additionally, other boards with CSI interfaces and M.2 SSD interfaces on our company's Raspberry Pi CM4 expansion board can also use this solution, including the CM4_SSD expansion board, CM4_3PCIE expansion board, CM4_Ultra expansion board, CM4_SSD+WiFi expansion board, CM4_SSD+dual Ethernet, CM4_NAS.)


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_44.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_44.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.'''''


=== 8.2 更新系统 ===
=== 8.2 Update system ===
8.2.1 启动树莓派OS,在终端中执行:
8.2.1 Boot the Raspberry Pi OS and run commands in the terminal:


<code>sudo apt update</code>
<code>sudo apt update</code>
第370行: 第384行:
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


8.2.2 执行<code>sudo rpi-eeprom-update</code>,查看树莓派固件,确保树莓派的固件日期在2023年12月6日之后:
8.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.


8.2.3 执行<code>sudo raspi-config</code>,根据下图依次选择对应选项:
8.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
第390行: 第404行:
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.


=== 8.3 AI模块所需要的依赖安装 ===
=== 8.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
第399行: 第413行:
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


=== 8.4 图像识别检测 ===
=== 8.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>
第426行: 第440行:
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>'''


== '''九、应用选配''' ==
== '''IX. Optional applications''' ==
MPS2280 HAT有3个固定孔,此固定孔可以适配我们是一些CM4尺寸的功能模块,比如CM4 4G mini、CM4 CAT1 4G、CM4 GPS、CM4温湿度模块、CM4 4G语音模块,还有5V5A电源和5V5A PD电源等,而且可以多个叠加组装使用。
The MPS2280 HAT has three mounting holes, and these holes can accommodate some of our CM4-sized functional modules, such as CM4 4G mini, CM4 CAT1 4G, CM4 GPS, CM4 Temperature and humidity module, CM4 4G voice module, 5V5A power supply, 5V5A PD power supply, and they can be stacked and assembled together.


MPS2242也有可以利用2个固定孔来组装CM4 4G mini模块。
The MPS2242 also has two mounting holes that can be used to assemble the CM4 4G mini module.


http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_59.jpg
http://www.mcuzone.com/wiki/0005_MPS2242_2280/0005_MPS2242_2280_70.jpg


{{联系我们_图标}}
{{Contact_Us_icon}}

2024年9月4日 (三) 17:26的最新版本

切换语言为中文

Keywords

Raspberry Pi 5, 2230, 2242, 2280, Pi OS, Ubuntu, NVMe SSD, PCIe, SSD X1, Gen2, Gen3, AI、HAILO 8L, Camera, OV5647, Image Detection, Image Recognition, Optional auxiliary power supply

I. Introduction

The MPS2242, MPS2280 and MPS2280P are SSD expansion boards designed for the Raspberry Pi 5 that support the NVMe protocol. The difference between there is that they support SSDs of different sizes: the MPS2242 supports 2242-sized SSDs, and the MPS2280 supports 2280-sized SSDs. The system can boot from the SSD, or it can boot from the TF card while using the SSD solely for storage purposes. The MPS2280P adds an auxiliary power supply interface for the hard drive to the MSP2280, capable of providing up to 3A of power

II. Hardware Resources

2.1 There are two versions: one for 2242 and one for 2280, the installation position is on the HAT, and both supporting NVMe protocol SSDs. Note: SSD that use the NGFF and SATA protocols are not supported.

The MPS2242 supports 2230/2242 size SSDs (defaulting to welded mounting posts for 2242 size).

The MPS2280/MPS2280P supports 2230/2242/2280 size SSDs (defaulting to welded mounting posts for 2280 size).

2.2 It uses a 0.5mm pitch 16-pin PCIe 2.0 x1 interface for connection.

2.3 MPS2242/MPS2280 uses a 1.5A high-efficiency DC-DC circuit, which can support most SSDs (however, due to the x1 interface, the actual peak power consumption of the SSD is only one-third of its rated power consumption).

2.4 One 5V power indicator light and one hard drive activity status indicator light.

2.5 It features an indented slot design, with no obstruction above the 40-pin connector, ensuring that DuPont cable connections are not affected.

2.6 Reserve CSI/DSI cable slots.

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

2.8 The MPS2280P uses a 3A high-efficiency DC-DC circuit. The SSD can draw power from the PCIe interface, or it can obtain 3A power through a 2.54mm 2-pin connector and a USB-C auxiliary power interface. The auxiliary power supply supports hot-swapping and meets the power requirements for most NVMe SSD.

0005_MPS2242_2280_63.jpg

0005_MPS2242_2280_73.jpg

0005_MPS2242_2280_66.jpg

0005_MPS2242_2280_76.jpg

0005_MPS2242_2280_75.jpg

MPS2280P辅助供电:

0005_MPS2242_2280_74.jpg

0005_MPS2242_2280_68.jpg

III. System flashing and setting

3.1 Overview

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

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

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

You can download the Raspberry Pi OS in:

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

You can download the Ubuntu system in:

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

3.2 Boot from TF card

3.2.1 Use the Imager to flash the system

First, install the Imager on the Windows. You can download it in: https://www.raspberrypi.com/software/

Insert the TF card into the card reader after installation, plug the card reader into the PC's USB port, and then open the software.

Raspberry Pi Device: Choose Raspberry Pi 5;

Operating System:

Choose Raspberry Pi OS(64-bit), to flash the system image downloaded from the Raspberry Pi official website (internet connection required).

Choose Use Custom, to flash the system image already downloaded onto the hard drive (no internet connection required).

Storge: Select the TF card that needs to be flashed (i.e., the card inserted into the PC's USB port).

0005_MPS2242_2280_01.jpg

After making your selection, press "NEXT." It is recommended to click "Edit Settings" to pre-set some parameters in the flashing software. This way, you won't need to set them again when the system starts up, making it easier to use.

0005_MPS2242_2280_02.jpg

0005_MPS2242_2280_03.jpg

If you need to use the pre-set settings, press "Yes"; if you do not need to use the pre-set settings, press "No". Proceed to the next page, and click "Yes" to start the flashing and verification process. After the flashing is complete, follow the prompts to remove the card.

0005_MPS2242_2280_04.jpg

The above instructions describe how to flash the Raspberry Pi OS. For flashing the Ubuntu system or the OpenWrt system, similar operations are used; when you reach the step "Operating System", you need to select Use Custom, and then choose the pre-downloaded image.

3.2.2 Use the balenaEtcher to flash the system

First, install the balenaEtcher on the Windows. You can download it in: https://etcher.balena.io/#download-etcher

Insert the TF card into the card reader after installation, plug the card reader into the PC's USB port, and then open the software.

Flash from file: Select the pre-downloaded Raspberry Pi OS or Ubuntu system image.

Select target: Select the TF card that needs to be flashed (i.e., the card inserted into the PC's USB port).

Then click "Flash!" to start the process, and wait for it to complete.

0005_MPS2242_2280_05.jpg

3.2.3 Boot the system

Remove the TF card from the card reader, insert it into the TF card slot of the Raspberry Pi, and power the board on to enter the system.

3.3 Boot from SSD

The Raspberry Pi only supports SSDs with PCIe NVMe protocol interface.

3.3.1 Flash the Raspberry Pi OS image onto the TF card, and then boot the Raspberry Pi OS from the TF card.

3.3.2 Set the boot order and enable the SSD. Open the terminal on the Raspberry Pi OS, enter sudo rpi-eeprom-config --edit, and modify the BOOT_ORDER to:

BOOT_ORDER=0xf416

Modify or add PCIE_PROBE to:

PCIE_PROBE=1

Then press Ctrl+X, save and exit, and reboot.

Note 1: This file is saved in the E2PROM of the Raspberry Pi board after editing. Therefore, if you do not change the Raspberry Pi board and only change the system, you do not need to edit it again.

Note 2: The factory settings of the Raspberry Pi 5 vary depending on the shipment period; those shipped in 2024 have already enabled SSD booting.

0005_MPS2242_2280_06.jpg

0005_MPS2242_2280_07.jpg

The explanation for the boot order is as follows: [1]

MPS2280iPoE_24.png

The BOOT_ORDER=0xf416 indicates the boot order is NVMe (SSD), SD (TF) card, and USB drive. You can set the boot order according to your own requirements.

3.3.3 Insert the SSD into an M.2 (PCIe NVMe protocol) to USB adapter, connect it to the PC, and use the same method as flashing an image to a TF card to flash the system image onto the SSD. Then remove the SSD, plug it back into the expansion board, and power on the system (you can remove the TF card originally used to boot the system).

3.3.4 Another method of flashing is to do it directly in the Raspberry Pi OS. You will need to prepare a USB drive and copy the Raspberry Pi OS image onto the USB drive. Set the boot order with the SD (TF) card as the first priority and the NVMe (SSD) as the second priority. Then insert the TF card with the installed system, the USB drive containing the Raspberry Pi OS installation image, and the SSD that needs to be flashed into the board.

Boot the system; at this time, the system boots from the TF card. The latest Raspberry Pi OS includes Imager. If Imager is not included in your Raspberry Pi OS, you can install it using the following command:

sudo apt install rpi-imager

Open it in the GUI:

MPS2280iPoE_25.png

MPS2280iPoE_26.png

3.3.7 In the flashing interface, select the device, OS, and storage, and start the flashing process. Note that the storage should be set to SSD at this point and not a USB drive.

MPS2280iPoE_27.png

During the flashing process, a prompt to enter a password will appear twice. Please enter the system login password. After the flashing process is complete, shut down the system, remove the TF card and USB drive, and restart again, it will boot from the SSD.

MPS2280iPoE_28.png

MPS2280iPoE_29.png

MPS2280iPoE_30.png

IV. Demonstration of using the Raspberry Pi OS

4.1 Use the SSD for storage expansion

4.1.1 Set the Raspberry Pi to boot from the TF card, insert an SSD hard drive into the M.2 slot on the expansion board, and boot the Raspberry Pi OS from the TF card.

4.1.2 In the Raspberry Pi OS, open the File Manager, and we can see the partitions of the SSD. As shown in the following figure:

0005_MPS2242_2280_08.jpg

If you need to operate on the SSD, click on the partition icon. At this point, you need to enter the system password and then click "Authenticate." After successful authorization, you can proceed to operate on the SSD:

0005_MPS2242_2280_09.jpg

When you return to the desktop, you can see the shortcut icon for the SSD partition:

0005_MPS2242_2280_10.jpg

At the same time, by entering df in the terminal, we can also see the SSD partitions, and we can use this SSD as a storage device.

0005_MPS2242_2280_11.jpg

4.2 Use the SSD for system boot

4.2.1 Flash the Raspberry Pi OS onto the SSD, then remove the TF card, or in the boot order settings, set booting from NVMe (SSD) as the first priority.

4.2.2 Insert the SSD with the flashed system into the M.2 slot on the expansion board, and boot the Raspberry Pi OS.

4.2.3 Open the File Manager, and we can see that the remaining space displayed in the lower right corner is 106.3GB (the total capacity of this SSD is 120GB). At the same time, by entering `df` in the terminal, you can also see that the SSD is divided into two partitions, with nvme0n1p1 used as the system partition and nvme0n1p2 used as the storage partition.

0005_MPS2242_2280_12.jpg

0005_MPS2242_2280_13.jpg

V. Demonstration of using the Ubuntu system

5.1 Use the SSD for storage expansion

5.1.1 Set the Raspberry Pi to boot from the TF card, insert an SSD hard drive into the M.2 slot on the expansion board, and boot the Ubuntu system from the TF card.

5.1.2 In the Ubuntu system, unlike the Raspberry Pi OS, we do not need to enter a system password to perform operations on the SSD. We go into Files, click on Other Locations, and we can see the SSD partition (500GB Volume, mounted to /dev/nvme0n1p1). As shown in the following figure:

0005_MPS2242_2280_14.jpg

Note: If you need to perform operations on the SSD in the terminal, you must enter the SSD folder following the steps above first.

5.1.3 When you return to the desktop, you can see the shortcut icon for the SSD partition:

0005_MPS2242_2280_15.jpg

At the same time, by entering lsblk in the terminal, we can also see the SSD partitions, and we can use this SSD as a storage device.

0005_MPS2242_2280_16.jpg

5.2 Use the SSD for system boot

5.2.1 Flash the Ubuntu system onto the SSD, then remove the TF card, or in the boot order settings, set booting from NVMe (SSD) as the first priority.

5.2.2 Insert the SSD with the flashed system into the M.2 slot on the expansion board, and boot the Ubuntu system.

5.2.3 We go into Files, click on Other Locations, and we can see the SSD partition. Enter df in the terminal, and you can see that the SSD is divided into two partitions: nvme0n1p1 is used as the system partition, and nvme0n1p2 is used as the storage partition.

0005_MPS2242_2280_17.jpg

0005_MPS2242_2280_18.jpg

VI. Perform partitioning and other operations on the SSD

6.1 Overview

This chapter uses Raspberry Pi OS as an example to introduce operations such as partitioning and mounting an SSD installed in the MPS2242/2280.

6.2 Use the GParted to partition the SSD

6.2.1 Open the Raspberry Pi OS terminal and enter the following command to install the GParted:

sudo apt install gparted

MPS2280D_77.jpg

6.2.2 Open the GParted and select the corresponding SSD.

The command to open the GParted software is sudo gparted. After opening, it presents a graphical interface, and we select the SSD from the drop-down menu in the upper right corner.

MPS2280D_23.jpg

MPS2280D_24.jpg

6.2.3 Before partitioning the SSD, it is necessary to unmount the original partition. Right-click on the partition and select "Unmount" to unmount it. After unmounting, right-click on the partition again and select "Delete" to delete the partition. This SSD has two partitions, and the same operation should be performed on the other partition.

MPS2280D_25.jpg

MPS2280D_26.jpg

6.2.4 After deleting the partitions, we select "Edit - Apply All Operations" from the menu to apply all the operations. GParted is similar to DiskGenius, it does not perform actual operations on the partition until you apply the changes.

MPS2280D_27.jpg

MPS2280D_28.jpg

MPS2280D_29.jpg

6.2.5 Then right-click on the blank SSD and select "New" to create a new partition. We created two partitions, formatted as exfat. The operations are as follows:

MPS2280D_30.jpg

MPS2280D_31.jpg

MPS2280D_32.jpg

MPS2280D_33.jpg

MPS2280D_34.jpg

MPS2280D_35.jpg

MPS2280D_36.jpg

This completes the partitioning of the SSD.

6.3 Mount the partition

6.3.1 Now, the SSD has been divided into two partitions. These partitions can be managed under Windows, but the process differs from Linux, where the newly created partitions need to be mounted before they can be used. First, we use the command lsblk to view the partition information. The two newly created partitions' name are nvme0n1p1 and nvme0n1p2.

MPS2280D_37.jpg

Then we enter the following commands in sequence to create the mount points:

sudo mkdir /ssd1

sudo mkdir /ssd2

6.3.2 We enter the command sudo blkid in the terminal to view the partition UUIDs. As shown in the figure, the UUIDs of the two SSD partitions are 769F-F2E1 and 77F0-F2E1. Record these values.

MPS2280D_38.jpg

6.3.3 Enter the command sudo nano /etc/fstabin the terminal. Add two lines of code at the end of the file:

UUID=769F-F2E1 /ssd1 exfat defaults,umask=000,gid=1000 0 2

UUID=77F0-F2E1 /ssd2 exfat defaults,umask=000,gid=1000 0 2

MPS2280D_39.jpg

MPS2280D_40.jpg

Save and exit, then restart the system, and enter lsblk in the Raspberry Pi terminal. You can see that nvme0n1p1 and nvme0n1p2 are mounted under ssd1 and ssd2.

MPS2280D_42.jpg

Now, we can also see two directories, ssd1 and ssd2, at the root of the file directory, each representing one of the two partitions on the SSD. We can perform operations on these two folders, thus completing the mounting of the partitions.

MPS2280D_41.jpg

VII. Use hdparm to test speed of the SSD

7.1 Overview

Raspberry Pi 5 supports system operation in both PCIe Gen2 and PCIe Gen3 modes. This chapter uses Raspberry Pi OS as an example to test the SSD drive's performance under both PCIe Gen2 and PCIe Gen3 modes.

7.2 Test the SSD speed in PCIe Gen2 mode

7.2.1 The default configuration for Raspberry Pi OS is to operate in PCIe Gen2 mode, so there is no need to change the system configuration here.

7.2.2 Install the SSD speed testing software hdparm. Enter the following command in the terminal:

sudo apt install hdparm

0004_MPS2280Bi_05.jpg

7.3.3 Run df in the terminal to check the SSD partition name, which is nvme0n1p1:

0005_MPS2242_2280_19.jpg

Run the command, it can be run multiple times to test the disk speed repeatedly:

sudo hdparm -t /dev/nvme0n1p1

0005_MPS2242_2280_20.jpg

It can be seen that the test disk operates at a speed of about 450MB/s in PCIe Gen2 mode.

7.3 Test the SSD speed in PCIe Gen3 mode

7.3.1 In the Raspberry Pi terminal, entersudo nano /boot/firmware/config.txt, and add the following line at the end:

dtparam=pciex1_gen=3

0004_MPS2280Bi_02.jpg

0004_MPS2280Bi_03.jpg

Save and exit, then restart the system; this will switch it to PCIe Gen3 mode.

7.3.2 Using the method described in the previous section, run the command, it can be run multiple times to test the disk speed repeatedly:

sudo hdparm -t /dev/nvme0n1p1

0005_MPS2242_2280_21.jpg

It can be seen that the test disk operates at a speed of about 880MB/s in PCIe Gen3 mode.

7.4 Conclusion

The theoretical bandwidth of PCIe Gen2 mode is 5 Gbps, and the theoretical bandwidth of PCIe Gen3 mode is 8 Gbps. Comparing the test results under PCIe Gen3 mode with those under PCIe Gen2 mode, it is evident that under PCIe Gen3 mode, due to the impact of bandwidth, the operating speed of the SSD has improved.

Note: The disk operation speed is affected by various factors, including the quality of the disk and the file storage situation on the disk. The above test results are for reference only and do not represent the final specifications of the actual product.

VIII. Demonstration of AI module (HAILO 8L) usage on the MPS2242

8.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 MPS2242, and the HAILO 8L AI module paired with the Raspberry Pi 5.

This demonstration also applies to all Raspberry Pi 5 SSD-related PCIe adapter boards from our company, including the MPS2242-POE, MPS2280, MPS2280P, MPS2280Bi, MPS2280-POE, MPS2280D, MPS2.5G, MPSAI, MPSD2.5GD.

(Additionally, other boards with CSI interfaces and M.2 SSD interfaces on our company's Raspberry Pi CM4 expansion board can also use this solution, including the CM4_SSD expansion board, CM4_3PCIE expansion board, CM4_Ultra expansion board, CM4_SSD+WiFi expansion board, CM4_SSD+dual Ethernet, CM4_NAS.)

0005_MPS2242_2280_44.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.

8.2 Update system

8.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

8.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.

8.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.

8.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

8.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.

IX. Optional applications

The MPS2280 HAT has three mounting holes, and these holes can accommodate some of our CM4-sized functional modules, such as CM4 4G mini, CM4 CAT1 4G, CM4 GPS, CM4 Temperature and humidity module, CM4 4G voice module, 5V5A power supply, 5V5A PD power supply, and they can be stacked and assembled together.

The MPS2242 also has two mounting holes that can be used to assemble the CM4 4G mini module.

0005_MPS2242_2280_70.jpg

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-2024 Wildchip

  1. 1