When running on Windows (.NET 4.0), this will happen after a brief period of time:
- Display stops updating
- 9 out of 10 times, the display backlight starts flickering like mad
- The virtual COM port locks up
Subsequent writing to the Port raises an exception:
After stopping the debugger, Visual Studio will not respond until the USB connection to the display is severed.System.IO.IOException was unhandled
HResult=-2147024865
Message=A device attached to the system is not functioning.
Source=System
StackTrace:
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream.EndWrite(IAsyncResult asyncResult)
at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialPort.Write(Byte[] buffer, Int32 offset, Int32 count)
at sndchk.Display.Send(Byte[] Command) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 215
at sndchk.Display.DrawBar(Int32 top, Int32 left, Int32 height, Int32 maxWidth, Int32 percent) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 302
at sndchk.Display.set_LevelLeft(Int32 value) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 65
at sndchk.Program.Main(String[] args) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Program.cs:line 258
InnerException:
The exact same software runs flawlessly for hours on a Raspberry Pi (ARMv6 Linux, mono), with the same display connected to it via /dev/ttyUSB0.
So I suspect there's a problem with the 64bit Windows FTDI driver that I'm using (DriverVer=03/18/2014,2.08.30.6).
Is there a newer driver available? On ftdichip.com, there's a download for DriverVer=01/27/2014,2.10.00.