Disconnecting COM1 also stops communication on COM2

We have 2 COM ports on our embedded system. The problem we have is that disconnecting COM1 does also stop the communication on COM2. Why is there an interaction between we two ports?

We use the following registry configuration:

; COM1 serial port ("IClass"=multi_sz:"{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}")
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM1]
"Filter"="{28D1E69E-59EB-416a-96C4-D30FA2EAD0BD}"
"Drivername"="UARTA"
"LoadAsync"=dword:00000001
"Index"=dword:00000001
"Dll"="csp_serial.dll"
"Prefix"="COM"
"IoLen"=dword:000000d4
"DeviceArrayIndex"=dword:00000000
"IClass"=hex(7):7b,00,43,00,43,00,35,00,31,00,39,00,35,00,41,00,43,00,2d,00,42,\
  00,41,00,34,00,39,00,2d,00,34,00,38,00,61,00,30,00,2d,00,42,00,45,00,31,00,\
  37,00,2d,00,44,00,46,00,36,00,44,00,31,00,42,00,30,00,31,00,37,00,33,00,44,\
  00,44,00,7d,00,00,00,00,00

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM1\Unimodem]
"DevConfig"=hex:10,00,00,00,05,00,00,00,10,01,00,00,00,4b,00,00,00,00,08,00,00,\
  00,00,00,00
"FriendlyName"="COM1 UNIMODEM"
"DeviceType"=dword:00000000
"Tsp"="Unimodem.dll"

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM1\DependsOn]
"TAPI"="Drivers\\Builtin\\TAPI"

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM2]
"Filter"="{28D1E69E-59EB-416a-96C4-D30FA2EAD0BD}"
"Drivername"="UARTB"
"LoadAsync"=dword:00000001
"Index"=dword:00000002
"Dll"="csp_serial.dll"
"Prefix"="COM"
"IoLen"=dword:000000d4
"DeviceArrayIndex"=dword:00000001

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM2\Unimodem]
"DevConfig"=hex:10,00,00,00,05,00,00,00,10,01,00,00,00,4b,00,00,00,00,08,00,00,\
  00,00,00,00
"FriendlyName"="COM2 UNIMODEM"
"DeviceType"=dword:00000000
"Tsp"="Unimodem.dll"

Dear @widtmann

Just to make sure that I am interpreting your question correctly:

  • You physically disconnect the cable on COM1
  • After this, the Colibri i.MX6 cannot successfully open COM2 and transmit data anymore

Or in other words: how can we reproduce the problem (hardware setup, software steps to execute).
Can you please also indicate which UART control signals you are using on COM1 and COM2.

Regards, Andy

Dear @widtmann
I just found a possible explanation for your problem in a recent internal bug report, which is not yet published:

UARTA (COM1:) stops working when another serial port instance is closed

Description:
Calling CloseHandle on and handle for COM2:, COM3: etc. (all internal UARTS) will turn off the UART master clock, disabling also COM1: (UARTA) even if it’s still in use.

Workaround:
Keep an handle to an internal COM port open even if you are not actively using it.

The issue will be fixed in BSP release V1.5b2.

Regards, Andy

That sounds exactly like our problem. It happens when we close one COM port in our application (firmware). We can try to implement the workaround you mentioned. However, when is the planned release date of V1.5?

Dear @widtmann
The release is planned for Q2/2019, so within a couple of weeks.
Meanwhile you could download and test the latest beta version which should not show the issue anymore.
Regards, Andy

Updating to BSP release V1.5b4 solves our issue.