Inkplate Motion Serial4 undefined reference on pins PA11/PA12

Customer:

I’m trying to set up UART4 on pins PA11/PA12. Serial4.begin(9600, SERIAL_8N1) generates a loader error “EncoderDisplay.ino.cpp:(.text.setup+0x9c): undefined reference to `Serial4’”. How do I set up pins and use UART4?

Originally submitted via email support on 8 December 2025. Migrated to the forum for community visibility.

Soldered Support:

To use UART4, you need to instantiate HardwareSerial explicitly. Try this code:

HardwareSerial Serial4(UART4);

void setup() {
 Serial4.setTx(PA11);
 Serial4.setRx(PA12);
 Serial4.begin(115200);
}

void loop() {

}