Use of UART5 for RS485 communication IMX7D

Hello

i tried to use the UART5 to open a halfe duplex communication with an RS485 device.
the UART is on HArdware side adapted to the RS485 over an external driver.

first I tried to open the UART5 like the example in this thread

but it faild at this point

*port = CreateFile(TEXT("CoM5:"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, NULL);
if (*port == INVALID_HANDLE_VALUE)
{
    printf("Error Opening CoM Port\n");
    return FALSE;
}

which fault have i done to open this port.
additional question is which modifikation i have to do to run the UART5 as RS485 in halfe duplex mode

thanks for the Help

Dear @blaviken

By default, there is no driver loaded for UART5. To activate the additional serial port, you need to modify the following registry setting:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5]
Dll="serial_imx7.dll"

Make sure to save the registry.

Regards, Andy

Dear @andy.tx
thanks for your Help.

i changed the registry and now it works thanks.

Regards, Blaviken

Dear @andy.tx
thanks for your Help.

i changed the registry and now it works thanks.

Regards, Blaviken