Why can't UART 3 not open if it is receiving bytes?

Hello,

I encounter a problem, that if i keep receiving data the Application hangs when io.ports.serialport.open is called.

TC1: Connect UART RXD with source of Data ==> Hangs at io.ports.serialport.open() and the Serial Debug prints “AudioCodecWrite: Error in the i2c communication 0x00000005” “Error: I2c Transaction Timeout” and if i touch the Display also “STMPE811:NvError” The OS is not responding. Eventually sometimes later (a few minutes!) i receive “UART2 INT: FixedPhantom=2” then the application continues.

TC2: Open Application and Port ==> connect UART RXD with source of Data ==> Works

What would you propose how to fix this? I believe with CE7 1.4 this didn’t happen.

Environment Apalis T30, Ixora Board, Win CE7 V2.0 Beta 4 (And also CE V2.0 Release but without check of Debug Messages), VB.net with CF3.5.

Best regards, and have a nice Weekend,
Stefan

Maybe some other Topics with different plattforms are interesting:

https://www.toradex.com/community/questions/7707/system-freezes-when-the-port-is-opened-on-vf50.html

https://www.toradex.com/community/questions/7357/uart-4-can-not-open.html

@Sefan.P: Is you device already sending data over UART before you open the COM port? We recently found an issue in such situations and will document and fix this this.

@samuel.tx The Application is only receiving. In TC1 the data source is already sending data to the Device (The device receives).

As mentioned in the comment above we got reported a similar issue recently. The issue is documented now on our roadmap under issue 25340.

If you want to check if this also solves your issue, please use this driver which will be part of 2.1 beta 2.

To replace the existing driver, do the following:

  • Copy the driver to \Flashdisk\System
  • Rename the driver to i.e. libnvuart2.dll
  • Change the registry DLL key under [HKLM\Drivers\BuiltIn\SerialX] to the new name
  • Save the registry and reboot the device

Alternatively to this patch you could also try once to set the DMASetting key under [HKLM\Drivers\BuiltIn\SerialX] to 0 (no DMA).

I added the DMASetting = 0 (It did not exist before). It worked. But now it looks unbearable slow.
I tried to delete the DMASetting key but it does not work, it just clears the right view and the key persists.

After that i tried the new driver which you sent. [link text][1]
[1]: https://share.toradex.com/ciiypl74w7c9fs9?direct

I added two screenshots one of the file and one of the Registry.

It seems it does work from time to time - but it still loads a bit (~20s, >120s) while the port is opened.
In the DebugConsole i still get “UART2 INT: FixedPhantom=2”, “AudioCodecWrite: Error in the i2c communication 0x00000005” and “Error: I2c Transaction Timeout”.
New Error: “STMPE811:NvError timeout”
When closing i get Message “[WaitForCommEvent]: Aborted by SetCommMask()”

When i get “UART2 INT: FixedPhantom=2” it mostly works.

@Stefan.p: Please also replace the DLL for all the other serial ports. Are you using only TX and RX on UART 2? If you use only 2 lines, pleas try once to also set the new added key NumberOfLines=2. This was added in 25075 due to interrupt issues on floating pins. You also find more details in the issue description.

@samuel.tx: I only use RX (and TX but never send anything). Is it already possible to use the NumberOfLines Key with Image 2.0?
When will you release Image 2.1 Beta2?

Best regards, Stefan

@Stefan.P: NumberOfLines is not available in 2.0 image. You either can use the driver I have sent you in a 2.0 image or wait for 2.1b2. The image should be available in late Q2.