Serial port (RS232) problem

  • Thread starter Thread starter pavel.orehov
  • Start date Start date
P

pavel.orehov

Hi,

We are trying to establish an Rs232 serial communication for 3 RS232
ports.

The communication class is written in Native win32 C++ while the client
is a C# winform application .

The interop layer is done using IJW mechanism.


We are encounter in a phenomena :

At the beginning all COM ports opens and functions normally until
one of the following happens:

- the system gets into high CPU consumption ( due to other not related
activities that consume the CPU )

- after passing a visual studio 2005 debugging breakpoint

Then one of the ports is throwing an exception "the com port was
closed due to thread or application terminating or request " .

We don't want to interact with the COM ports using Pinvoke or the .
Net Serial comm. control due to their high CPU consumption.

System Environment parameters are :

- OS is Windows WP sp2
- Framework is .Net 2.0

Thanks,
Pavel
 
It sounds like you have a bug in your native code. Perhaps, when the FIFO
in your serial port overflows, you don't handle it very well. That would
explain why high CPU consumption by other processes or hitting a breaking
might cause it.

Paul T.
 
Back
Top