• sales

    +86-0755-88291180

PCIe-TO-M.2-MINI User Guide

Overview

Introduction

Mini PCIe TO M.2 adapter for Raspberry Pi 5, supports NVMe Protocol M.2 solid state drive with high-speed reading/writing, compatible with M.2 solid state drive in 2230 / 2242 size, supports Gen2 and Gen3 modes, and supports booting PI5 from SSD.

Features

  • Support NVMe protocol and M.2 solid state drive protocol, high-speed read/write, with high work efficiency.
  • Support PCI-E×1 Gen2 or Gen3 modes.
  • Only supports PI5B.
  • Compatible with M.2 solid state drive of 2230/2242 sizes.
  • Onboard working indicator lights, with PWR on continuously when powered, and ACT blinking during read/write.

Note

  • As the Raspberry Pi does not support NVME booting, the config text should be modified.

Hardware Description

Hardware Connection

Pay attention to the orientation of the cable and connect it as shown in the figure:

Load

1. Enable PCIe interface:
Connect the hardware and the PCIE interface will automatically open as the latest system detects the hardware.
If it does not open, you can execute: add "dtparam=pciex1" in the /boot/firmware/config.txt 
2. PCIE selects GEN2 mode by default. If PCIE gen3 is needed, you can add the following content in /boot/firmware/config.txt:
dtparam=pciex1_gen=3
3. Reboot the Pi5 after modifying, and then the device can be recognized.
As shown below, SM2263 is the recognized solid-state drive that I use, and the other one is the RPI chip for PI5:
4. Partitioning: If partitioning and formatting have already been performed on another platform, skip this step. Caution: Partitioning and formatting will erase all data on the SSD, so proceed with caution.
lsblk  #see the disk (execute "sudo fdisk -l" for more details)

Partition 
sudo fdisk /dev/nvme0n1    #dev is the total device number, do not add "p1", just one partition 
How do use fdisk
n New partition
q Exit without saving
p Print partition table 
m Print selection menu  
d Delete partition  
w Save and exit
t Modify ID 
Add the partition and execute "n", and then press "w" to save and exit. 

5: Format:

sudo mkfs.  #Then, pressing Tab will display various file extensions. Each extension corresponds to a format you may want to format the drive into

If I need to format it in "ext4" format, execute:  
sudo mkfs.ext4 /dev/nvme0n1p1
Wait for a moment, when "done" appears for all, it means the formatting is complete.

6: Load:

Create the mounting directory:
sudo mkdir toshiba
Mount the device
sudo mount /dev/nvme0n1p1 ./toshiba
Check disk status
df -h

Read/Write Test

Enter the directory to mount the disk:

cd toshiba
  • Release the caches:
sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
  • Copy the Raspberry Pi memory to the hard flash driver (write).
sudo dd if=/dev/zero of=./test_write count=2000 bs=1024k
  • Copy the contents of the hard drive to the Raspberry Pi's memory (read).
 sudo dd if=./test_write of=/dev/null count=2000 bs=1024k
  • Please note that using this product with different cards in different environments, the results may vary. When working with the Raspberry Pi, its performance will be significantly affected.

Auto Mount

If there are no issues with the test and the disk is not needed as a system disk, only for expanding disk usage, set up automatic mounting.

sudo nano /etc/fstab

#Add the following content at the end:
/dev/nvme0n1p1  /home/pi/toshiba  ext4  defaults  0  0
#/dev/nvme0n1p1 device name, /home/pi/toshiba mount to the directory, ext4 is the file system type, defaults means using the default mounting options  
#Reboot to take effect (Please make sure there are no issues before rebooting, otherwise it can not be booted without mounting)  
sudo mount -a

#And then reboot
Check the device through lsblk 

Booting from NVMe SSD

1: First, you can use an SD card to boot the Raspberry Pi, just test it to make sure the hardware can work properly.

2: Use the SD card to boot the Raspberry Pi and modify the config file, modify BOOT_ORDER:

sudo rpi-eeprom-config --edit 
Modify BOOT_ORDER=0xf41 as BOOT_ORDER=0xf416

For more details, you can refer to BOOT_ORDER 

3: Reboot the Raspberry Pi, and you can see the following content in serial port log during start-up:


That means the modification is successful. 
If you fail after trying several times, you can connect it to the network before modify again (wait for network time synchronization), or set the correct time before modifying the file.

4: Flash the system to NVME, and then connect to the board, remove the SD card, and power it on again.

Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Mobile: +86  13434470212

Email: services01@spotpear.com