Main Site Documentation

Custom UART communication on FEZ Cerberus



I am trying to interface 3 external UART devices on a Cerberus. Even though there are only 2 official UART socket, socket 2 and socket 6, on the Cerberus, is it possible I can make use of the UART port on socket 1 and socket 3?

Based on the schematic provided,
socket 1 pin 8 - UART1_RX
socket 1 pin 9 - UART1_TX

socket 3 pin 7 - UART6_TX
socket 3 pin 9 - UART9_RX.

In fact, I am fine with using FEZ Hydra, which provides more UART port than the cerberus, however, as I am trying to interface an external device, I believe I will still need to define a serial port object which points to a particular TX/RX pin on a socket?

kindly advise

  1. Can I can use the UART port on socket 1 and socket 3 of Cerberus?
  2. Any sample codes to define serial point on a specific socket, specific pin?

Thanks in advance!


hi and welcome to the forum.

Cerberus only exposes two UARTs. They are explicitly on socket 2 and 6.

The STM32F4 chip has more than these two UARTs, but to enable these would require you to compile a custom firmware. If you wanted to do this, you could - while this would then expose the UARTs to you, it would no longer be “quite a Gadgeteer” configuration and you’d need to manually connect pins to your chosen devices

Your question 2 is covered in the firmware itself. The “port” of the framework maps a UART from the hardware to a specific software serial port name.

So simple answer is, by default you can’t do what you want on Cerberus, but if you are a more advanced user and want to delve into the porting kit you could potentially add this.


Just curious, how do I go ahead changing the firmware?

Seriously, I just did a firmware update like anyone else when I first received the Cerberus, but I have no idea how the firmware comes about. Which IDE to develop the firmware and where can I get a copy of source code to start modify.

I understand that FEZ hydra firmware in fact provides more UART interface, however, it is impossible to solder by hand for ST91SAM9RL64 if I would like to customize a PCB myself in the end.

Any recommendation on QFP type CPU that is equivalent to ST91SAM9RL64 (in term of firmware and available pins) on FEZ hydra that I can use when I customize my own board?



Yes, as most users would, me included, you have just used the precompiled firmware and just loaded it in when you updated to the latest SDK. And that’s the way 98.75% of users will do this too. And yes, that number is just made up.

There are a couple of good threads on building the Cerb firmware, this one is a good one to start as it has pointers to the community maintained source tree:

But this one and are also totally relevant to compiling it yourself as well - a little light reading to see if you think even compiling this is a task you’d want to take on. Then, you really are likely to have to dig into the porting kit, and you’re going to have to uncover how the current serial ports are mapped from hardware to software, and replicate/extend that to add the additional ports.

the problem with just looking at processors with more peripherals like the Hydra’s, is that you may still need to delve into the porting kit unless you can find one that is actually already supported (has an active port in the porting kit that you can use, plus it exposes the additional serial ports you need). I honestly think the best approach would be the community ports for the Cerb family, as there’s a number of people now who are active in that effort and may even have the knowledge or have done the porting kit plumbing already. Certainly the design files of the Hydra are available but it’s not as simple as the Cerb processor to re-purpose.

One more potential option (talking without knowledge here, stand clear this could be dangerous) is the processor on the DL40 is a reasonably powerful device, and I suspect it could be re-tasked to do the 3rd UART job and pass you back the data. Taylorza is the guru DL40 guy but has recently moved country and bought home a new baby to his household, so hasn’t been too active here of late, but he may see this… the DL40 thread is