[DEV] Serial5 on Pixhawk cannot be used

Hello,

I am developing protocol for serial communication. I looked into FrSky Telemetry protocol implementation, how is pointer to UART is initialized (based on what user choose in GCS - param SERIAL#_PROTOCOL).

I found this:

if ((_port = serial_manager.find_serial(AP_SerialManager::SerialProtocol_FrSky_D, 0))) {
_protocol = AP_SerialManager::SerialProtocol_FrSky_D; // FrSky D protocol (D-receivers)
}

So I implemented it like this in my protocol. What is strange, when I set SERIAL5_PROTOCOL to 14 (14 is my protoco in all protocols enum) it does not work.

I did this (ADB_Port is equal to _port in the previous piece of code):

if (ADB_Port == hal.uartA) hal.uartD->write(0x01);
if (ADB_Port == hal.uartB) hal.uartD->write(0x02);
if (ADB_Port == hal.uartC) hal.uartD->write(0x03);
if (ADB_Port == hal.uartD) hal.uartD->write(0x04);
if (ADB_Port == hal.uartE) hal.uartD->write(0x05);

I use uartD as a debug port. So when the SERIAL5_PROTOCOL was set to 14, nothing came out. When I set SERIAL3_PROTOCOL to 14, it worked.

I think Im missing something, could somebody explain if there is something preventing SERIAL5 from using it?

One more thing, when I hardcoded ADB_Port to uartE (SERIAL5) it worked (like this: ADB_Port = hal.uartE).

Thanks for any help!