Serial port (RS232) problem

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
 
P

Paul G. Tobey [eMVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top