Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-8433 receiver drops data when USB Drive is inserted/removed

I’m using a PCI-8433 card at 1.8432M Baud on a Windows 7 PC and it normally works great. My VB.NET application uses System.IO.Ports.SerialPort. However, if serial communication is in progress when I insert or remove a USB drive, part of the PCI-8433 receive data fails to transfer. This problem does not occur at 115.2KBaud. The receive buffer size for the SerialPort object is 1K bytes which is greater than my expected receive data length. This appears to be a problem with the PCI-8433 FIFO. I used the Windows Device Manager to change the FIFO buffer levels but it didn’t help. How can I get this card to work reliably at higher baud rates when USB drives are inserted or removed?

0 Kudos
Message 1 of 3
(2,148 Views)

This article states:

“Depending on the loading of the system (e.g. long periods of time spent in high priority tasks or loops), you may be more likely to starve serial hardware processing tasks.”

 

Apparently, USB connect/disconnect events (Windows 7 on Dell Optiplex 780) are higher priority than the NI serial receive task.  That article says to set the receive FIFO as low as possible so interrupts occur as soon as possible but for faster baud rates it still overruns. Either the PCI-8433 FIFO needs to be bigger or the priority of the receive task needs to be elevated. Is there a driver configuration file/setting to increase the priority of the receive task?

0 Kudos
Message 2 of 3
(2,109 Views)

This post confirms my suspicion this is a problem with the FIFO buffer size on the card or interrupt priority level of the NI driver read task. The commonality is the use of a very fast baud rate (don’t know what card they used). The difference is my setup only fails when a USB drive or device is inserted or removed. I’ve ruled out the possibility the problem is related to the COM receive buffer size because the number of bytes transferred can be received in its entirety without any intermediate reads by my application.

 

At 1.8432MBaud, 1 stop bit and no parity, the 128 byte FIFO in the card must be read by the driver at least every 694 usec. The IRQ System Information on my PC shows this card at IRQ 16 which is also shared with some USB ports.

Post.png

 

I tried inserting the USB drive in other ports but still had the problem.

 

This post describes how to increase the priority of a particular IRQ so I tried this for IRQ 16 but it didn’t help.

 

It never fails if the transfer size is less than the FIFO buffer size (128 bytes).

 

115.2KBaud always works properly regardless of the transfer size or which USB devices I insert or remove.

0 Kudos
Message 3 of 3
(2,092 Views)