Holybro 6X CM4 carrier board serial port mapping

After some experimentation I can confirm that the mapping for the Holybro 6X with CM4 carrier board is as follows:

Telem1 port = serial1
GPS1 port =Serial3
GPS2 port = Serial4
Telem3 port = Serial 5
Internal CM4= Serial2

Cant work out what serial 6 is connected to.

@mogu Holybro - Any chance you can include this vital information on the documentation page so others can find it?

I’m about to go down the same path - ordering my pi/ cm today for same baseboard…will watch and revert…Cris

Have updated my initial post above
My next challenge is to get the camera port to work on the CM4 carrier board. camera and code work perfectly on a standard Pi4 but for some reason the CM4 baseboard simply doesnt see the camera… the struggle continues.

1 Like

@marblecreek @tegwin

I have review the information and it looks like the Serial 6 is connected to UART4, and the port that goes to UART4 on the CM4 has the Silk Screen UART&I2C.. Sorry for the confusion.

We will change this to UART4&I2C in the future.

1 Like

Thank @Holybro for your reply- really appreciate it.

Can I confirm therefore that this is correct?

Telem1 port = Ardupilot - serial1
GPS1 port =Ardupilot - Serial3
GPS2 port = Ardupilot - Serial4
Telem3 port = Ardupilot - Serial 5
Internal compute module= Ardupilot - Serial6 ??

1 Like

HI @tegwin ,

  • SERIAL0 → USB
  • SERIAL1 → UART7 (Telem1) RTS/CTS pins
  • SERIAL2 → FC Internal Connection to CM4
  • SERIAL3 → USART1 (GPS1)
  • SERIAL4 → UART8 (GPS2)
  • SERIAL5 → USART2 (Telem3) RTS/CTS pins
  • SERIAL6 → UART4 (User)
  • SERIAL7 → USART3 (Debug)
  • SERIAL8 → USB
3 Likes

Pixhawk 6X UART Mapping for Ardupilot can be found here: Pixhawk 6X Flight Controller — Plane documentation

Note that the TEL2 (Serial2) is connected internally between the FC & CM4 if you are using the Pixhawk CM4 baseboard. More information can be found here: Connections & Ports - Holybro Docs

3 Likes

Hello @VPHB Vince, quick question. If I wanted to control a servo with this CM4-PX6 board, through the CM4 module, I am guessing that I would have to send a mavlink message from the CM4 to the FC correct?

I have an external, regular RPi 4B that needs to communicate with the on board CM4 module, i.e., it will tell the CM4 to activate the servo at specific times (via wifi or Bluetooth), and since there are no CM4 GPIO pins, I will have to connect the servo directly to the baseboard GPIO, so when the external RPi tells the CM4 to activate the servo, the CM4 will then have to relay the message to the FC. This will have to be a mavlink message, correct?

Hey @tegwin, did you ever get the camera and code working… are you flying and using the camera with this cool PX6-CM4 board yet? If so, how’d it go?

I am currently starting my path down a similar route and I am making sure that everything I need my craft to do is possible. Like you, I need to use the camera port, along with both host ports to have another camera (one pointing down and the other forward) and a Coral edge TPU (USB accelerator). I want to run some detection and classification stuff on the two cameras (one CSI RPi cam and the other a USB cam), if possible, so I was wondering if you are working on something similar, which it sounds like you are.

Currently, I am trying to figure out how I am going to comunicate with the onboard CM4 from an external RPi 4B. The external one needs to tell the drone to activate a servo.

I really wish Holybro had a complete set of documentation for the base-board with ALL the pin outs!
I believe that the port labelled “A/D &IO” might be connected to the CM4 IO pins?!

Whilst I am having a grumble - it would have been so useful to have a JST-GH socket for CM4 power - relying on an external USB C connector is a bit clunky. Can’t complain too much - this device is much more integrated than any Cube product so far.

If you are wanting to connect an external Pi4 to the CM4 then the best method would be to connect them together via ethernet cable… We are using Bluerobotics botblox mini network switches.
The same with multiple cameras - if you can access the video over ethernet it makes life a lot easier.

Yes, we are doing something similar but I can’t go into that.

I do now have the pi-camera working via the CSI port. So far I have not been able to get the CM4 to reliably communicate with the FCU over internal serial. There’s probably some nuance that I am missing. Work continues on this. The only documentation I can find on this topic is aimed at Px4 - now it should be a similar connection for ardupilot but for some reason I don’t get a solid connection.

Managed a hover test with the FCU and so far the autopilot side of things seems to be working ok.

2 Likes

@tegwin Thanks for the feedback. We will make this changes to show ALL the pinout.

Currently, in the doc page it shows

This Pixhawk RPi CM4 Baseboards has all the ports in Pixhawk Baseboard Ports & the ports below.

In this page you can see the AD & IO pinout.

AD&IO Port

Pin Signal Volt
1(red) VCC +5V
2(black) FMU_CAP1 +3.3V
3(black) FMU_BOOTLOADER +3.3V
4(black) FMU_RST_REQ +3.3V
5(black) NARMED +3.3V
6(black) ADC1_3V3 +3.3V
7(black) ADC1_6V6 +6.6V
8(black) GND GND
1 Like

I can’t get the camera to be detected on the RPI CM4 board with the sudo raspi-config menu, nor with rpicam-hello. Have tried both the HQ Camera and Module 3 and definitely have my cables properly inserted but it just doesn’t see it. Would be hugely grateful to learn how you managed to get it working?

– default rpi cm4 image does not enable libcamera on CM4
Access EMMC via USB and edit config.txt
Or via SSH
sudo nano /boot/config.txt

Automatically load overlays for detected cameras

#disable automatic camera detection
#camera_auto_detect=1

enable camera on cam1 (!) interface

dtoverlay=ov5647
#once CAM1 is confirmed working uncomment below for cam0
#dtoverlay=ov5647,cam0

  • v1 ov5647 - “dtoverlay=ov5647”
  • v2 imx219- “dtoverlay=imx219”
  • v3 imx708 - “dtoverlay=imx708”
  • HQ imx477 - “dtoverlay=imx477”
  • Global Shutter imx296 - “dtoverlay=imx296”
    Holybro CM4 carrier port labelled “camera” is CM4 CAM1 connector

Hope that helps.

2 Likes

You’re an absolute hero. Disabling camera autodetect and adding the camera config made it work instantly. Almost all the guides online reference the interfaces menu but its clear that now those are obsolete for modern versions. Thanks once again!

Out of interest where would you connect Cam0 if there is only one CSI port on the baseboard? Not sure I quite understand the significance or opportunities for setting up Cam0?

No worries,

Took me forever to figure that out!

The CM4 module does have two CSI camera ports but the holybro carrier board only uses one of them.

1 Like

But another camera can be connected via the CM4 host USB-C port, correct?

I’m planning on connecting two cameras in this way (i.e., one through CSI and one via USB), and also the Google Coral USB accelerator to use the two extra CM4 host ports.