Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overlapped serial comm: OVERRUN error

Status
Not open for further replies.

tompy

Programmer
May 16, 2001
9
BE
My program captures up to 4 external serial devices, communicating at 57600bd. The program is written using microsoft Visual C & applies standards OVERLAPPEd Win comms routines.

When my system gets occupied (when I start other apps), Windows reports buffer overrun errors on the serial line.

I suspect the OS of losing data:
* I allocate 4k system buffers on the opened serial channels (SetupComm(portHandle_, 4096,4096)) at startup
* I can verify that databytes are actually lost
* both BEFORE and AFTER the error occurs, the number of bytes read is order of magnitude 20 bytes, so system buffers are virtually empty.

My program starts a number of high-priority threads. I expect that all threads are competing within the operating system for processor service, as well as the serial line interrupt handler? The high level of the threads could block the driver.

* Do you know how/ at what priority level/ byte transfer between the FIFO and the internal system buffers is done by Windows?
* is there something I can do about it?

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top