none
Sound playing cause COM port overrun error RRS feed

  • Question

  • I write one COM port data transmitting program, in order to validate the accuracy of serial data transmitting on two PCs.

    Method of program is easy as following,

      a, PC#1 (COM1) send 308 bytes to PC#2 (COM1)

      b. Once PC#2 received 308 bytes data with correct result. PC#2 send 25 bytes back.

      c. Once PC#1 received 25 bytes data with correct result, then go to step a. Continuous testing it.

    Test result is OK if there is only this application running in Windows XP.

    But, if I play .wav file (Windows XP's .wav file) randomly, program will get overrun error from COM port easily.

    It seems sound playing make interfere with interrupt process in COM driver.

    My platform is Sandy Bridge (Q67 + Intel i3 CPU + WinXP).

    The same program running on old platform (945 chipset or ATOM CPU) didn't have this overrun error from COM port.

    I try to contact Realtek vendor to discuss about audio driver issue, but of no use. Because audio inbox driver in Windows7 also had the same problem.

    Actually I try lots of main board which sandy bridge designed or new ivy bridge designed, all have the same problem.

    Problem also occur if only running COM port test of PASSMARK BurnInTest utility.

    Sound playing really causes overrun error from COM port. I guess it is interrupt interfering problem in kernel, especially by new architecture of CPU.

    Does anyone give some input ?

    thanks

    Rick

    Thursday, May 10, 2012 3:17 AM

Answers

  • we rely on drivers to be well behaved, it is not really  a function of new main board or old main board. it is a function of the drivers controlling those devices.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, May 10, 2012 4:47 PM

All replies

  • are you synchronously reading and writing to the com port? what if you had multiple IOs pending? the sound card could easily be queueing up many DPCs which could starve the com port's DPC

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, May 10, 2012 5:55 AM
  • Yes, my program is synchronously reading and writing COM port. Program is using "WaitCommEvent" to wait "EV_RXCHAR" for data reading. After received enough characters with correct content, program will send specific characters out again in the same thread code. 

    The strange thing is program is only work failed upon new main board.

    Thursday, May 10, 2012 7:32 AM
  • we rely on drivers to be well behaved, it is not really  a function of new main board or old main board. it is a function of the drivers controlling those devices.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, May 10, 2012 4:47 PM
  • I am studying serial driver code in DDK. Is this a good way to pinpoint root cause of overrun error ?

    It seems something stuck COM's IRQ a little.

    Do you know how to raise IRQ priority to COM port for getting better service by kernel ?

    Friday, May 11, 2012 1:17 AM
  • raising the IRQL will not help if DPC starvation is the root cause (which is far more likely than interrupt starvation)

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 11, 2012 4:14 AM