What is Raspberry Pi Compute Module 4?

The Raspberry Pi Compute Module 4 is a stripped-down version of the Raspberry Pi 4 Model B. It is designed for deeply embedded and industrial applications. Raspberry Pi Compute Module 4 succeeds the Compute Module 3 and 3+ from 2017 and 2019, respectively. Compute Module 4 has a 36% smaller form factor. CM4 does not support any of these direct peripheral connectivity on board, 

  • HDMI
  • GPIO
  • Ethernet
  • USB ports 

Instead of these direct peripheral connectivity, there is a 100-pin mezzanine connector that is designed to interface with these Peripherals.

On the enhancement side. Compute Module 4 has added the following

  • Onboard external antenna to improve WiFi Coverage &capability.
  • On-Board eMMC flash(8Gb to 32Gb).

These are the missing features in Raspberry pi Model 4B.

The Raspberry Pi Compute Module 4 includes a 64-bit 1.5GHz quad-core BCM2711 processor, the same as the Raspberry Pi 4 Model B, with a dual video output and a wide range of other interfaces as well. It is available in 32 variants, with various RAM and eMMC Flash options, and with or without wireless connectivity options for you.

Note: In this article we will refer Compute Module 4 as CM4.

Key Improvements in CM4 from previous Compute Modules

The Raspberry Pi Compute Module also offers some of the key improvements over its compute module predecessors,

  • such as faster CPU cores,
  • more interfacing capabilities,
  • better multimedia,
  • on board wifi Antenna,
  • on board wifi,
  • a range of RAM densities 1GB, 2GB, 4GB, and 8GB LPDDR4-3200 SDRAM,
  • 100 pin mezzanine interfaces. Earlier Compute module versions used SODMM interface.
  • and a wireless connectivity option as well. Includes 2.4GHz and 5GHz 802.11b/g/n/ac wireless LAN and Bluetooth 5.0 as well. There’s also Gigabit Ethernet availability with it. Storage is available with optional storage of 8GB, 16GB and 32GB eMMC Flash.
Raspberry Pi Compute Module 4 Explained Completely

Specifications Of Compute Module 4(CM4)

  • 1.5GHz Broadcom BCM2711 quad-core 64-bit ARMv8 Cortex-A72 CPU Processor which the same as the Raspberry Pi 4 model b. Whereas the previous version CM3 has a 1.2GHz Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC processor.
  • VideoCore VI graphics, supporting OpenGL ES 3.0 graphics.
  • 4Kp60 hardware decode of H.265 (HEVC) video
  • 1080p60 hardware decode, and 1080p30 hardware encode of H.264 (AVC) video
  • Dual HDMI interfaces, of resolutions up to 4K.
  • Single-lane PCI Express 2.0 interface
  • Dual MIPI DSI display and dual MIPI CSI-2 camera interfaces are also available.
  • RAM: Options for 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM
  • Storage Options: 0GB (“Lite”), 8GB, 16GB or 32GB eMMC Flash Storage
  • Gigabit Ethernet PHY with IEEE 1588 support.
  • 28 GPIO pins, with up to 6 × UART, 6 × I2C and 5 × SPI.
  • Option for fully certified radio module:
    2.4 GHz and 5.0 GHz IEEE 802.11 b/g/n/ac wireless LAN, Bluetooth 5.0 and BLE. On-board electronic switch to select either external or PCB trace antenna.


  • 2 x HDMI 2.0 Ports
  • 28 x User GPIO Pins
  • Gigabit Ethernet PHY
  • 2-Lane MIPI DSI Display Port
  • 4-Lane MIPI DSI Display Port
  • 2-Lane MIPI DSI Camera Port
  • 4-Lane MIPI DSI Camera Port
  • PCle Gen 2 x 1 Socket
  • USB 2.0 Port (High Speed)
  • Single +5V PSU Input
  • MicroSD Card Socket

Raspberry Pi Compute Module 4 gives you the choices for wireless, RAM and eMMC as well, as mentioned in the table below.

Raspberry pi table
Specification Table of Raspberry Pi Compute Module 4

How To Access Various Peripheral Ports On CM4?

The greatest shocker on the CM4 is the new connector. Ever since the first Raspberry Pi received its compute module, 200-pin SO-DIMM connectors have been available, much like DDR2 memory boards for a laptop. The CM4 switches, opting for two high-speed, high-density, 100-pin mezzanine connectors. Breaking from tradition is painful, and we know that some of you will be left with a closet full of SO-DIMM sockets, but they did it for a good cause. You cannot access GPIO, HDMI, and PCI-E ports directly from CM4; you need an expansion board to access these peripherals. CM4 has 100 pin connectors on the rear-side of the board. This connection is also called the Mezzanine Connection.

Latestly Launched 100 pin Connector Feature in Compute Module 4

The system-on-a-chip (SOC) that the Pi 4 family uses, the Broadcom BCM2711, has added even more peripheral capability to the group (PDF). As a result, the Pi 4 Model B has picked up a second HDMI connector, USB 3.0, and Gigabit Ethernet. Yet it was worthy of more than that! For instance, it wasn’t long before enterprising hackers discovered that the USB 3.0 was on a PCIe bus and traded the USB 3.0 for PCIe. This was possible, but complicated, with some complex on-board rework.

How CM4 connector is better than previous CM3 Connector?

The CM4 design implements a good break between low-speed and high-speed peripherals with two mezzanine connections instead of one SO-DIMM. On one side, there are the traditional GPIOs Raspberry Pi, power, SD card, and Ethernet port. PCIe, USB, HDMI, MIPI CSI, and DSI display cameras are controlled, on the other hand, per two of them. This indicates, on the one hand, that there is a lot of IO to play with, and on the other, that if you don’t have some high-speed stuff, you can get away with a basic one-connector configuration.

The new connectors allow the module to be smaller and mounted in your unit, with lower board heights and weights. They are making the high-speed and low-speed realms more distinct, which would make them easier to schedule. Heck, they cost the pair much less than the old socket of SO-DIMM. And since this is the PCIe deal, we do not whine at all about the transition.

How to Access GPIO pins on Compute Module 4?

You can not access the GPIO pins directly on Raspberry Pi Compute Module 4. You’ll be needing a CM4 expansion board to access this peripheral on Compute Module 4. For connecting this expansion board, CM4 has come up with a totally new feature which is not found in any other previous compute modules. The name of this feature is 100 pin connector which you can find on the rear side of your CM4 IO board.

You can connect the expansion board to the CM 4 IO board with the help of this 100 pin connector to access the GPIO pins on Compute Module 4 and this connection is also called as Mezzanine Connection.

How to Access USB 3.0 and HDMI  ports on CM4?

Just as with the GPIO pins, there is no direct way to access the USB 3.0 and HDMI ports on CM4. So, if you wish to access USB 3.0 and HDMI ports on CM4, then you can use the alternative of establishing a Mezzanine Connection. As we’ve already discussed, the brand new feature of CM4, i.e., the 100 pin connector that gives you the upper hand to access all the peripherals such as GPIO, HDMI, USB 3.0, and PCI-E ports by just connecting the 100 pin connector to the CM4 expansion board and forming a Mezzanine Connection.

So, in this way you can access the USB 3.0 and HDMI ports on CM4 indirectly as there is no direct connection possible through CM4.

How To Connect A PCIE Device To Compute Module 4?

The x1 PCI Express (PCIe) Gen 2 interface is a more interesting improvement, or rather an exhibitor since it opens the platform up to a major extension. The inclusion of a PCI Express switch would allow the carrier board to introduce a range of high-speed interfaces. The constraint of Gen 2 or x1 is not that important, as the host’s output is the limiting factor rather than the size of the pipe. I will present some PCIe expansion module to determine how to use the IO board PCIe x1.

PCIE2.0 is supported on Compute Module 4. This can be accessed easily just by connecting CM4 to the Expansion board. The CM4 Expansion board has a PCIE2.0  X1 interface. PCIE-Gen-2.0 1x interface supports 4Gbps throughput speed. Apart from the CM4 official Expansion board, there are other PCIE Expansion boards also in the market.

Below is the list of other PCIE Expansion boards for Compute Module 4(CM4)

1. PCIe to Gigabit Ethernet

PCIe to Gigabit Ethernet

Have you ever considered converting your RPi into a smart router? You probably need this one then. Extends the PCIe x1 to a 4 Gigabit Ethernet port that allows you to connect several network devices to your RPi. You can install OpenWRT, pfsense, or any other open-source router you need with the aid of this expression board.

Amazon Link

2. PCIe to USB3.0

PCIe to USB3.0

Currently, there’s a PCIe x1 on the original Raspberry Pi 4. But it’s being moved to USB3.0. But if you want to keep using CM4 just as you did with Raspberry Pi 4, you should get one of them. Turns the PCIe x1 into 4 USB3.0, each running at 5Gbps peak data transfer speed. It would be an excellent choice if most of your expansion devices were attached to your CM4 via USB ports.

Amazon Link

3. PCIe to M.2

PCIe to M.2

Earlier this year, the Raspberry Pi Foundation revealed that users can now boot raspberry pi via USB. This means that you can actually get rid of the SD card and accept the SSD, which will dramatically boost the efficiency of your Raspberry Pi.

Amazon Link

4. PCIe x1 to x16

PCIe x1 to x16

If you like more than PCIe x1, consider this one. Turns the x1 PCIe into x16. This means that you would be able to get an NVIDIA graphics card running on Raspberry Pi. Although I don’t think it’s worth it, you can always give it a shot.

Amazon Link



I believe many of you thought about turning your Raspberry Pi into a home NAS (Network Attached Storage) device. Usually, we use portable discs that connect to RPi via USB ports. You can now connect the real hard drive to the CM4 with this PCIe to the SATA III speech card. Turns the PCIe x1 into 2 SATA III ports with up to 6 Gps of speed transfer data. There are also 4 SATA III PCIe speech cards based on other chipsets. You can also consider them, but make sure you check the compatibility of ARM Linux with the vendor.

Amazon Link

What is Raspberry Pi Compute Module 4 Used For?

The Raspberry Pi Compute Module 4 IO Board is a powerful programming tool. Exhibiting every interface from Compute Module 4, the IO Board offers a production framework and reference base-board architecture for our most efficient Compute Module and is also designed for integration into end products. While Compute Module 4 is backward compatible with all applications written for earlier versions, it will not work on a carrier board designed for Compute Module, Compute Module 3, or Compute Module 3+.

The CM4 can be integrated into the final products, designed and prototyped using the full-size Raspberry Pi 4 SBC. This requires the elimination of redundant ports, peripherals and components, which decreases overall costs and complexities. Technology concepts are thus practically infinite and vary from DIY ventures such as PiBoy to commercial IoT prototypes such as automated home automation systems, small-scale hosting servers, data exchange centres and compact electronics needing the computing power provided by CM4, all while retaining a smaller form factor and power consumption. Compute Module Clusters such as the Turing Pi 2, which harnesses the power of several Compute Modules, are also an option with this efficient but compact Module System, the Raspberry Pi CM4.

It is completely up to you as the possibilities are endless with how flexible it is. We do not have a certain answer to it. As we know, it has a small-sized layout as compared to the Raspberry Pi Boards so that it can be embedded in many projects and places quite easily.

How to Program Compute Module 4?

compute module 4
Programming Compute Module 4


An installer is available for Windows users to install the required drivers and boot tools automatically. One can compile and run Cygwin or install the drivers manually by himself.

Lets, talk about the Windows Installer,

Microsoft Window Installer

This installer has been tested on Windows 10 32-bit and 64-bit, as well as Windows XP 32-bit.

Please ensure you are not writing to any USB devices whilst the installer is running.

Follow the steps mentioned below: –

  • Firstly, download and run the Windows installer to install the drivers and boot tools.
  • Plug your host PC USB into the CMIO USB SLAVE port, making sure J4 is set to the EN position.
  • Apply power to the CMIO board; Windows should now find the hardware and install the driver.
  • Once the driver installation is complete, run the RPiBoot.exe tool that was previously installed.
  • After a few seconds, the Compute Module 4 eMMC will pop up under Windows as a disk (USB mass storage device).

Next step is to set up the Compute Module 4 IO board,

  • Firstly, ensure that the Compute Module 4 is correctly installed on the IO board. It should lie parallel with the board, with the engagement clips clicked into place.
  • Now, make sure that J4 (USB SLAVE BOOT ENABLE) is set to the ‘EN’ position.

Use a micro USB cable to connect the IO board to the host device.

Now, we’ll build rpiboot on your host system (Cygwin/Linux),

  • In Cygwin, use the Cygwin installer. On a Pi or other Debian-based Linux machine, use the following command:

sudo apt install git
  • Git may produce an error if the date is not set correctly. On a Raspberry Pi, enter the following to correct this:
sudo date MMDDhhmm

where MM is the month, DD is the date, and hh and mm are hours and minutes respectively.

Clone the usbboot tool repository:

git clone --depth=1 https://github.com/raspberrypi/usbboot cd usbboot

  • libusb must be installed. If you are using Cygwin, please make sure libusb is installed as previously described. On the Raspberry Pi or other Debian-based Linux, enter the following command:
sudo apt install libusb-1.0-0-dev
  • Now build and install the usbboot tool:
  • Run the usbboot tool and it will wait for a connection:
sudo ./rpiboot

Now plug the host machine into the Compute Module IO board USB slave port (J15) and power the CMIO board on. The rpiboot tool will discover the Compute Module and send the boot code to allow access to the eMMC.

Now, the next step is to write to the eMMC –

After rpiboot completes, a new USB mass storage drive will appear in Windows. Once you have written an OS image, make sure J4 (USB SLAVE BOOT ENABLE) is set to the disabled position and/or nothing is plugged into the USB slave port. Power cycling the IO board should result in the Compute Module booting the OS image from eMMC.


After rpiboot completes, you will see a new device appear; this is common /dev/sda on a Pi but it could be another location such as /dev/sdb, so check-in /dev/ or run lsblk before running rpiboot so you can see what changes.

You now need to write a raw OS image (such as Raspberry Pi OS) to the device. Note the following command may take some time to complete, depending on the size of the image: (Change /dev/sdX to the appropriate device.)

sudo dd if=raw_os_image_of_your_choice.img of=/dev/sdX bs=4MiB

Unplug and re-plug the USB, once the image has been written; you should see two partitions appear (for Raspberry Pi OS) in /dev. In total, you should see something similar to this:

/dev/sdX    <- Device
/dev/sdX1   <- First partition (FAT)
/dev/sdX2   <- Second partition (Linux filesystem)

The /dev/sdX1 and /dev/sdX2 partitions can now be mounted normally.

Make sure J4 (USB SLAVE BOOT ENABLE) is set to the disabled position and/or nothing is plugged into the USB slave port. Power cycling the IO board should now result in the Compute Module booting from eMMC.

What is Raspberry Pi Compute Module 3?

The Raspberry Pi Compute Module 3 (CM3) has the,

  • 1.2GHz, quad-core Broadcom BCM2837 processor,
  • VideoCore IV GPU, and
  • 1GB memory used on the Pi 3 Model B but packed its components into a slimmer and smaller board. Similarly, the Raspberry Pi Compute Module 4 is based on the Raspberry Pi 4 Model B, but in a smaller form factor.
raspberry pi compute module 3
Raspberry Pi Compute Module 3

The compact design of Raspberry Pi Compute Module 3, the same size as a DDR2 small outline dual in-line memory module, is suited to be built into electronic appliances. The original Raspberry Pi Compute Module was used inside various IoT, home and factory automation products, as well as a media player.


The CM3+ Raspberry Pi Compute Module 3 contains the guts of a Raspberry Pi 3 Model B+ (the BCM2837 processor and 1GB RAM) as well as an optional eMMC Flash device of 8GB, 16GB or 32GB (which is the equivalent of the SD card in the Pi).

  • Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.2GHz
  • 8GB/16GB/32GB eMMC Flash memory, or a Lite variant without eMMC Flash memory

This is all integrated onto a small (67.6mm × 31mm) board that fits into a standard DDR2 SODIMM connector. The Flash memory is connected directly to the processor on the board, but the remaining processor interfaces are available to the user through the connector pins. You get the full flexibility of the BCM2837 SoC (which means that many more GPIOs and interfaces are available than with a standard Raspberry Pi), and designing the Module into a custom system should be relatively straightforward.

Difference Between Raspberry Pi 4 And Compute Module 4

Same as the Raspberry Pi 4, the new Compute Module 4 is built on the 64-bit quad-core BCM2711 application processor.

SpecificationsRaspberry Pi 4 Compute Module 4
ImageClick HereClick Here
ProcessorBroadcom BCM2711B0 quad-core A72 (ARMv8-A) 64-bit @ 1.5GHzBroadcom BCM2711C0 quad-core ARM Cortex-A72 (ARMv8-A) 64-bit @ 1.5GHz
Dimensions88 mm × 58 mm × 19.5 mm, 46 g55 mm × 40 mm × 4.5mm, 12g (exc. carrier board)  
GPIO40-pin GPIO header, populated Carrier board dependent
Ports2 × micro-HDMI 2.0, 3.5 mm analogue audio-video jack, 2 × USB 2.0, 2 × USB 3.0, Gigabit Ethernet, Camera Serial Interface (CSI), Display Serial Interface (DSI)Hirose U.FL antenna connector, 2× 100-pin high-density connectors  
Amazon LinkClick HereClick Here

Difference Between Compute Module 3 And Compute Module 4

SpecificationsCompute Module 3 Compute Module 4
ImageClick HereClick Here
ProcessorBroadcom BCM2837B0, Cortex-A53 64-bit SoC @ 1.2GHzBroadcom BCM2711C0 quad-core ARM Cortex-A72 (ARMv8-A) 64-bit @ 1.5GHz
GPIO48 GPIO Count28 GPIO Count
Dimensions67.6 × 31.1 × 3.7 mm55 mm × 40 mm × 4.5mm, 12g (exc. carrier board)
Display InterfacesMIPI CSI/DSI, DPI, HDMI 1.3aMIPI CSI/DSI, DPI, HDMI 2.0, Dual HDMI interface (up to 4Kp60 supported)
Amazon LinkClick HereClick Here

Compute Module 3 Connectors VS Compute Module 4 Connectors

Compute Module 3 Connectors

Raspberry Pi Compute Module 3

Raspberry Pi Compute Module 3 (CM3) is a DDR2-SODIMM-mechanically-compatible Module System (SoMs) with processor, memory, eMMC Flash (CM3 only and power circuitry support. These modules allow the designer to leverage the hardware and software stack of Raspberry Pi in their own tailored systems and form factors. All of this is built into a compact 67.6mm x 31mm board that fits into the regular DDR2 SODIMM connector (the same type of connector used for laptop memory).

Compute Module 3 Expansion Board

CM3 IO expansion board is an expansion board designed for Raspberry pi compute model CM3 and CM3 lite. You can get a more wide range and more flexible application environment; you can get a simpler interface. The Flash memory is directly attached to the processor on the board, but the remaining processor interfaces are accessible to the user via connector pins. Compute Module 3 includes the following components in the SODIMM 200 pin design; Broadcom BCM2837 processor, 4Gbytes eMMC Flash, 1Gbyte LPDDR2 RAM, and 35µ Hard gold plated I/O Pins.

Compute Module 4 Connectors

Compute Module 4

Previous Compute Modules were all in a 200-pin SODIMM form factor. Still, two important factors prompted us to think of switching to another form factor: the need to reveal usable BCM2711 interfaces that were not present in earlier SoCs and the need to install additional components, which meant that we needed to route tracks differently to allow room on the PCB for additional sections.

What Is CM4 Expansion Board?

The CM4 expansion board is like an interface between the Hirose mezzanine connectors on the CM4 and the SODIMM connectors on the CM3 carrier board. The CM4 snaps into the expansion board with the surface-mounted mezzanine connectors, and this combination slip into the CM3 SODIMM slot. Long-time built-in computing company Gumstix also provides two expansion board options to upgrade your Raspberry Pi CM3 to CM4.

Amazon Link

Compute Module 4 Expansion Board

At first sight, the main difference with the CM4 is the shape factor of the module. Previous models, like the CM3, were designed to have a DDR2-SODIMM (mechanically compatible) form factor that looked like a notebook RAM handle. The successor, CM4, comes in a smaller form factor, with a 2x 100-pin high-density connector that can be ‘popped-on’ to the receiving frame. This 100 pin connector is connected to the extension board of Compute Module 4. 

It helps keep the connector pins on the GPIO. Also, it has two ports, HDMI, Gigabit Ethernet, two USB connectors, a power connector, DC Jack, a camera connector and screen, RTC, and a slot for PCIe. The CM4 has a pair of 100-pin connectors. The greatest change is the deletion of the USB 3 port used in the Raspberry Pi 4. There is a USB 2 interface, so if you require a USB 3 interface, a PCI Express USB 3 interface must be added to the mix.


5 1 vote
Article Rating
Next articleWiFi 2.4Ghz Vs 5Ghz:Which is better
Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Tim Lee
Tim Lee
7 months ago

Hi you have this line “Now, make sure that J4 (USB SLAVE BOOT ENABLE) is set to the ‘EN’ position” for programming the CM4 but on the CM4 IO board J4 is CAM0 There must be a mistake on your description. Where is the USB Slave boot enable jumper?