More than 2 Serial ports on SKR Pro 1.2

Hi everyone,

I want to add a TFT touch screen to my build, but I am already using two serial ports (-1 for the USB and 6 for a wifi module). If I understand it correctly, Marlin firmware is the limiting factor here, since the SKR Pro board has at least one more serial port (serial port 3 on the uart pins). Has someone ever tried adding another serial port to marlin?

Thanks in advance!

I don’t know much about Marlin source, nor am I proficient in C++. With that said, I took a quick look at the source. There is code supporting a third serial port. Apparently it is for use by DWIN DGUS displays. You might be able to repurpose that serial port code for your third serial port. DGUS_SERIAL_PORT is the define that enables the code and a good starting grep string to look for the supporting code. The only thing that gives me pause is that in a couple of places the term “internal” is used wrt this port.

Another approach would be to duplicate all the code conditionally compiled using SERIAL_PORT_2 as SERIAL_PORT_3. There might be a small amount of logic fixup and/or renaming. Most of that code is in MarlinSerial.c It is something that can be tried quickly. If it fails, then you might be in for a tough time getting it working. But it might succeed with little effort.

If you get a third serial port working, I’d appreciate knowing.


I think serial port 3 might also be useful to merge into Marlin, if you get it working. Maybe sone reasonable sanity checks so someone with an atmega 328 doesn’t enable 3 serial ports.

1 Like

Thanks for the reply! I hoped someone with a bit more programming experience had already tried it. I already tried to google and only found other people who wanted this feature, but I didn’t find someone who already tried it. I hope someone here has tried it or is going to do it. Else I will try it myself, but I fear I don’t have enough experience in programming.

Does someone know what happens when I disable the usb serial connection? I know I will not be able to control the cnc through the usb connection, but how about updating the firmware? Will that be possible through usb?

According to what I’ve read on this forum, you can update the firmware on the SKR Pro by butting the binary on the SD card and turning the board on. No USB required.

It won’t change the bootloader. The bootloader is responsible for flashing the firmware. And as Ryan said, it doesn’t flash over USB anyway.

Thanks! One more (unrelated) question: how can you enable the usb A port to run gcodes from an usb flash drive instead of micro sd card?

I am not sure. I would guess that Marlin would have to know how to do that, and it would need a setting for it.

It may be something weird like enabling sd card and then changing the sd card type to usb.