Skip to content

How-To M.2 Slot

Description

The Pi-Tron CM5 has an M.2 slot on the bottom of the PCB. The slot has a B-Key marking and can be used to extend the Pi-Tron CM5s functionality with different modules like SSDs or mobile data communication like LTE. The M.2 slot is connected to the Raspberry Pi Compute Module 5s PCI Express bus and is therefor compatible with many modules available today.

Any B-Key coded module with 42mm in length can be slotted into the Pi-Tron CM5. Smaller modules are possible when using an 42mm adapter board.

For the purpose of this How-To, a PCIe or NVMe SSD is added to the Pi-Tron CM5. The PCIe or NVMe functionality was added to Raspberry Pi OS Buster in later versions and should be present in current versions of both Raspberry Pi OS Buster and Bullseye.

Note 1: The M.2 slot is not compatible with M.2 SATA SSDs, only PCIe or NVMe SSDs can be used.

Note 2: The space underneath any slotted M.2 card is limited. Use only M.2 cards with electronics on the upper side. The bottom should be empty.

pi-tron-cm4-bottom-m-dot-2

Requirements

  • 24 volts power supply with 2 pin power plug for the Pi-Tron CM5
  • Development computer with network access to the Pi-Tron CM5 or alternatively connect an HDMI monitor, mouse and keyboard.
  • To login into the Pi-Tron CM5 via network, it is requires that the SSH server is running.
  • One 42mm NVMe or PCIe SSD with a B-Key or B- and M-Key coding.
  • One NVMe or PCIe SSD screw.

How-To

  • Turn the Pi-Tron CM5 over and place it on a flat and steady ground.
  • Hold the Pi-Tron CM5 board with one hand and insert the NVMe SSD into the M.2 slot with a slight angle.
  • Push the SSD carefully into the slot.
  • Now release the Pi-Tron CM5 board.
  • Press down the SSD until the notched out end rests on the screw holder on the Pi-Tron CM5 PCB.
  • Use the screw to fix the SSD into place so it cannot move.
  • Turn the Pi-Tron CM5 around, so that the bottom side is now facing down.
  • Connect a network cable and/or keyboard, mouse and monitor as well as power.
  • Let the Pi-Tron CM5 boot and then login using the designated username and password.
  • Enter the following command to check that the OS has detected the SSD.

    • lspci -k

pi-tron-cm4-nvme-ssd-lspci

  • In the list of PCI devices there must be an entry starting with Non-Volatile memory controller: .... and the Kernel driver should be listed as nvme. This is a good indication that the NVMe SSD was recognized by the OS.
  • Another option to check if the device was detect by the system, is to run this command:

    • lsblk

pi-tron-cm4-nvme-ssd-lsblk

  • The lsblk command should print a list with all available block devices, one of them should have a name similar to nvme0n1. If there is an entry below the first one ending in p1, this means that there is already a partition on the SSD, which is the case in the screenshot above.
  • Now that the SSD is available of general use, any partition program like fdisk, parted or on the desktop gparted can be used to partition the new storage device.

This concludes the How-To for the M.2 slot on the Pi-Tron CM5. As stated before, use any partition tool to create a new partition on the SSD or delete existing ones if they are not needed or not compatible with the Raspberry Pi OS. Partitions with the FAT32 or EXT4 filesystem format should be fine, of course there are many many more.

Restrictions

Voltage Requirement

Only modules capable of working with 3.3 volts are supported.